The code responsible for shl folding in the DAGCombiner was assuming incorrectly that all constants are less than 64 bits. This patch simply changes the way values are compared.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Hi Pawel,
The change looks good to me.
You can simplify the test case (see comment below).
Thanks,
Andrea
test/CodeGen/X86/fold-vector-shl-crash.ll | ||
---|---|---|
4–8 ↗ | (On Diff #28109) | if you define @test as a function returning a <2 x i256> vector value, then you can get rid of basic block 'Loop' and simply return %B. |