Don't try to fold away shuffles which can't be folded. Fix creation of shufflevector constant expressions.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Similar to D70985 - LGTM.
I haven't looked at scalable vectors very much though, so I'm not sure if there are still problems for any other opcodes. Eg, ConstantFoldSelectInstruction can iterate based on number of elements.
llvm/test/Analysis/ConstantFolding/shufflevector.ll | ||
---|---|---|
4 | Can reduce this to a single shuffle and still get the same crash? define <vscale x 4 x i32> @shufflevector_scalable_constant() { %r = shufflevector <vscale x 4 x i32> undef, <vscale x 4 x i32> undef, <vscale x 4 x i32> zeroinitializer ret <vscale x 4 x i32> %r } |
Comment Actions
I haven't looked at scalable vectors very much though, so I'm not sure if there are still problems for any other opcodes.
There are; Huihui is going to look into this. This particular case happened to be blocking some other work I'm doing.
llvm/test/Analysis/ConstantFolding/shufflevector.ll | ||
---|---|---|
4 | We'll probably fold that to undef at some point. |
Can reduce this to a single shuffle and still get the same crash?