Filecheck-ize this test so that it actually tests something reasonable.
authorChandler Carruth <chandlerc@gmail.com>
Thu, 29 Mar 2012 22:01:41 +0000 (22:01 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 29 Mar 2012 22:01:41 +0000 (22:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153697 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/apint-shl-trunc.ll

index 8163e6d527d77f399149555798d29ec2e91625a3..f2dc7d5130a9e2e13b34c1e24cd4d0e8a682e517 100644 (file)
@@ -1,13 +1,24 @@
-; RUN: opt < %s -instcombine -S | grep shl
-; END.
+; RUN: opt < %s -instcombine -S | FileCheck %s
 
 define i1 @test0(i39 %X, i39 %A) {
+; CHECK: @test0
+; CHECK: %[[V1:.*]] = shl i39 1, %A
+; CHECK: %[[V2:.*]] = and i39 %[[V1]], %X
+; CHECK: %[[V3:.*]] = icmp ne i39 %[[V2]], 0
+; CHECK: ret i1 %[[V3]]
+
        %B = lshr i39 %X, %A
        %D = trunc i39 %B to i1
        ret i1 %D
 }
 
 define i1 @test1(i799 %X, i799 %A) {
+; CHECK: @test1
+; CHECK: %[[V1:.*]] = shl i799 1, %A
+; CHECK: %[[V2:.*]] = and i799 %[[V1]], %X
+; CHECK: %[[V3:.*]] = icmp ne i799 %[[V2]], 0
+; CHECK: ret i1 %[[V3]]
+
        %B = lshr i799 %X, %A
        %D = trunc i799 %B to i1
        ret i1 %D