From: Sanjay Patel Date: Sun, 14 Aug 2016 21:05:08 +0000 (+0000) Subject: [InstCombine] add test for missing vector icmp fold X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bbb3dffd0acac9097917a1e3a3e3f81e8c5d3433;p=platform%2Fupstream%2Fllvm.git [InstCombine] add test for missing vector icmp fold llvm-svn: 278631 --- diff --git a/llvm/test/Transforms/InstCombine/apint-shl-trunc.ll b/llvm/test/Transforms/InstCombine/apint-shl-trunc.ll index 44a640d..c13ecb4 100644 --- a/llvm/test/Transforms/InstCombine/apint-shl-trunc.ll +++ b/llvm/test/Transforms/InstCombine/apint-shl-trunc.ll @@ -25,3 +25,16 @@ define i1 @test1(i799 %X, i799 %A) { ret i1 %D } +; FIXME: Vectors should fold the same way. +define <2 x i1> @test0vec(<2 x i39> %X, <2 x i39> %A) { +; CHECK-LABEL: @test0vec( +; CHECK-NEXT: [[B:%.*]] = lshr <2 x i39> %X, %A +; CHECK-NEXT: [[TMP1:%.*]] = and <2 x i39> [[B]], +; CHECK-NEXT: [[D:%.*]] = icmp ne <2 x i39> [[TMP1]], zeroinitializer +; CHECK-NEXT: ret <2 x i1> [[D]] +; + %B = lshr <2 x i39> %X, %A + %D = trunc <2 x i39> %B to <2 x i1> + ret <2 x i1> %D +} +