[PATCH] D19874: [InstSimplify] use computeKnownBits on shift amount operands

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Tue May 10 13:23:49 PDT 2016


majnemer added inline comments.

================
Comment at: test/Transforms/InstSimplify/shift-knownbits.ll:115-125
@@ +114,13 @@
+
+; FIXME: This is not a shift, but computeKnownBits doesn't handle weird vector types.
+define <2 x i15> @shl_vector_zero(<2 x i15> %a, <2 x i15> %b) {
+; CHECK-LABEL: @shl_vector_zero(
+; CHECK-NEXT:    [[AND:%.*]] = and <2 x i15> %b, <i15 1024, i15 1024>
+; CHECK-NEXT:    [[SHL:%.*]] = shl <2 x i15> %a, [[AND]]
+; CHECK-NEXT:    ret <2 x i15> [[SHL]]
+;
+  %and = and <2 x i15> %b, <i15 1024, i15 1024>
+  %shl = shl <2 x i15> %a, %and
+  ret <2 x i15> %shl
+}
+
----------------
Is this still true?  I might have changed this recently...


http://reviews.llvm.org/D19874





More information about the llvm-commits mailing list