test: Prefer CHECK-LABEL to CHECK in branchweight tests
[oota-llvm.git] / test / Transforms / ConstProp / logicaltest.ll
index 8e9d4160900603ac62649a7a8f8b81736471e984..abd3275a4f7441fcb0b58f722197373221d9f53d 100644 (file)
@@ -1,13 +1,35 @@
-; Ensure constant propogation of logical instructions is working correctly.
+; Ensure constant propagation of logical instructions is working correctly.
 
-; RUN: as < %s | opt -constprop -die | dis | not ggrep -E 'and|or|xor'
+; RUN: opt < %s -constprop -die -S | FileCheck %s
+; CHECK-NOT:     {{and|or|xor}}
 
+define i32 @test1() {
+        %R = and i32 4, 1234            ; <i32> [#uses=1]
+        ret i32 %R
+}
 
-int  "test1"() { %R = and int 4,1234          ret int  %R }
-bool "test1"() { %R = and bool true, false    ret bool %R }
+define i1 @test1.upgrd.1() {
+        %R = and i1 true, false         ; <i1> [#uses=1]
+        ret i1 %R
+}
 
-int  "test2"() { %R = or int 4,1234          ret int  %R }
-bool "test2"() { %R = or bool true, false    ret bool %R }
+define i32 @test2() {
+        %R = or i32 4, 1234             ; <i32> [#uses=1]
+        ret i32 %R
+}
+
+define i1 @test2.upgrd.2() {
+        %R = or i1 true, false          ; <i1> [#uses=1]
+        ret i1 %R
+}
+
+define i32 @test3() {
+        %R = xor i32 4, 1234            ; <i32> [#uses=1]
+        ret i32 %R
+}
+
+define i1 @test3.upgrd.3() {
+        %R = xor i1 true, false         ; <i1> [#uses=1]
+        ret i1 %R
+}
 
-int  "test3"() { %R = xor int 4,1234          ret int  %R }
-bool "test3"() { %R = xor bool true, false    ret bool %R }