Make foldVectorBinop return null if the instruction type is a scalable
vector. It is unclear what, if any, of this function works with scalable
vectors.
Identified by test LLVM.Transforms/InstCombine::nsw.ll
Paths
| Differential D79196
[SVE] Fix invalid usage of VectorType::getNumElements() in InstCombine ClosedPublic Authored by ctetreau on Apr 30 2020, 12:54 PM.
Details Summary Make foldVectorBinop return null if the instruction type is a scalable Identified by test LLVM.Transforms/InstCombine::nsw.ll
Diff Detail
Event Timelinectetreau added a child revision: D79053: [SVE] Fix invalid uses of VectorType::getNumElements() in ValueTracking. This revision is now accepted and ready to land.Apr 30 2020, 1:09 PM Closed by commit rGbeeabe382dda: [SVE] Fix invalid usage of VectorType::getNumElements() in InstCombine (authored by ctetreau). · Explain WhyMay 1 2020, 5:25 PM This revision was automatically updated to reflect the committed changes. ctetreau removed a child revision: D79053: [SVE] Fix invalid uses of VectorType::getNumElements() in ValueTracking.May 6 2020, 8:45 AM
Revision Contents
Diff 261580 llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
|
the reasoning for the change to getElementCount is to ensure that the LHS and RHS are the same sort of vector as the Inst vector. (i.e., not scalable)