[PATCH] D24279: [InstCombine] canonicalize vector select with constant vector condition to shuffle

Michael Kuperstein via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 13 09:53:42 PDT 2016


mkuper added a comment.

Thanks Sanjay, as I wrote on the email thread, I think this is probably the right canonicalization.
Did you happen to check that we don't regress codegen for the IR tests that changed? At least X86? (This should probably go in even if it does regress some cases, but a PR would be good.)


================
Comment at: test/Transforms/InstCombine/select.ll:1794
@@ +1793,3 @@
+; CHECK-LABEL: @cannot_canonicalize_to_shuffle2(
+; CHECK-NEXT:    [[SEL:%.*]] = select <4 x i1> <i1 true, i1 undef, i1 false, i1 icmp sle (i16 ptrtoint (i32* @g to i16), i16 4)>, <4 x i32> %a, <4 x i32> %b
+; CHECK-NEXT:    ret <4 x i32> [[SEL]]
----------------
Yikes.


https://reviews.llvm.org/D24279





More information about the llvm-commits mailing list