https://llvm.org/bugs/show_bug.cgi?id=30264
Bug ID: 30264 Summary: [InstCombine] reduce shuffles with constants to a single shuffle Product: libraries Version: trunk Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: Scalar Optimizations Assignee: unassignedb...@nondot.org Reporter: spatel+l...@rotateright.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified I noticed this case in https://reviews.llvm.org/D24182 : define <4 x float> @insertConstants(<4 x float> %x) { %shuf1 = shufflevector <4 x float> %x, <4 x float> <float undef, float 0.0, float undef, float undef>, <4 x i32> <i32 0, i32 5, i32 undef, i32 undef> %shuf2 = shufflevector <4 x float> %shuf1, <4 x float> <float undef, float undef, float 4.0, float 1.0>, <4 x i32> <i32 0, i32 1, i32 6, i32 7> ret <4 x float> %shuf2 } This can be combined into one shuffle instruction that we can assume is as cheap as either of the original ones: shufflevector <4 x float> %x, <4 x float> <float undef, float 0.0, float 4.0, float 1.0>, <4 x i32> <i32 0, i32 5, i32 6, i32 7> -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs