https://llvm.org/bugs/show_bug.cgi?id=31770
Bug ID: 31770 Summary: [InstCombine] fold extractelt(trunc(bitcast X))) -> extractelt 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 We're missing a vector fold as Zvi noted here: http://lists.llvm.org/pipermail/llvm-dev/2017-January/109539.html define i32 @B(<8 x i32> %V) { %B = bitcast <8 x i32> %V to <4 x i64> %T = trunc <4 x i64> %B to <4 x i32> %E = extractelement <4 x i32> %T, i32 1 ret i32 %E } On little-endian, this should be: define i32 @B(<8 x i32> %V) { %E = extractelement <8 x i32> %V, i32 2 ret i32 %E } There's a similar-looking fold already in InstCombine called "foldVecTruncToExtElt()". -- 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