As it can be clearly seen from the diff, this results in nicer IR.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/Transforms/Scalarizer/basic.ll | ||
---|---|---|
624 | Previously we'd end up with https://godbolt.org/z/NyExWc %val0 = load <4 x i32>, <4 x i32>* %src, align 16 %val1 = insertelement <4 x i32> %val0, i32 %repl, i32 3 %val0.i0 = extractelement <4 x i32> %val0, i32 0 %val2.i0 = shl i32 1, %val0.i0 %val0.i1 = extractelement <4 x i32> %val0, i32 1 %val2.i1 = shl i32 2, %val0.i1 %val0.i2 = extractelement <4 x i32> %val0, i32 2 %val2.i2 = shl i32 3, %val0.i2 %val2.i3 = shl i32 4, %repl %val2.upto0 = insertelement <4 x i32> undef, i32 %val2.i0, i32 0 %val2.upto1 = insertelement <4 x i32> %val2.upto0, i32 %val2.i1, i32 1 %val2.upto2 = insertelement <4 x i32> %val2.upto1, i32 %val2.i2, i32 2 %val2 = insertelement <4 x i32> %val2.upto2, i32 %val2.i3, i32 3 ret <4 x i32> %val2 |
Previously we'd end up with https://godbolt.org/z/NyExWc