For PR1043:
authorReid Spencer <rspencer@reidspencer.com>
Sat, 13 Jan 2007 05:06:52 +0000 (05:06 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Sat, 13 Jan 2007 05:06:52 +0000 (05:06 +0000)
Bye, Bye Booly. Remove the use of the bool type from non-upgraded test
cases and from grep expressions. The parser doesn't accept it and the
asm writer doesn't produce it any more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33183 91177308-0d34-0410-b5e6-96231b3b80d8

18 files changed:
test/Analysis/Andersens/modreftest.ll
test/Assembler/2006-12-09-Cast-To-Bool.ll
test/Assembler/2007-01-02-Undefined-Arg-Type.ll
test/CodeGen/ARM/fcopysign.ll
test/CodeGen/ARM/fpcmp_ueq.ll
test/CodeGen/PowerPC/small-arguments.ll
test/CodeGen/X86/test-pic-cpool.ll
test/CodeGen/X86/trunc-to-bool.ll
test/Transforms/ConstProp/2006-12-01-TruncBoolBug.ll
test/Transforms/GlobalOpt/integer-bool.ll
test/Transforms/IPConstantProp/return-constant.ll
test/Transforms/IndVarsSimplify/2007-01-06-TripCount.ll
test/Transforms/IndVarsSimplify/2007-01-08-X86-64-Pointer.ll
test/Transforms/InstCombine/2004-08-10-BoolSetCC.ll
test/Transforms/InstCombine/2005-06-16-SetCCOrSetCCMiscompile.ll
test/Transforms/InstCombine/narrow.ll
test/Transforms/LoopStrengthReduce/exit_compare_live_range.ll
test/Transforms/SCCP/2006-12-19-UndefBug.ll

index 488c6f54733fe89492b45b7fcc32269f0659ec11..fcef0d17cc235bf2c60d06a109692e34ad83126d 100644 (file)
@@ -1,4 +1,6 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -anders-aa -load-vn -gcse -instcombine | llvm-dis | grep 'ret bool true'
+; RUN: llvm-upgrade < %s | llvm-as | \
+; RUN:   opt -anders-aa -load-vn -gcse -instcombine | llvm-dis | \
+; RUN:   grep 'ret i1 true'
 
 %G = internal global int* null
 declare int *%ext()
index 7264918a427e75ad61623e2d0ceb2e9fca9fd757..3fc4d23070c5668939aad727611a4810faece4e6 100644 (file)
@@ -1,5 +1,5 @@
 ; RUN: llvm-as < %s | llvm-dis | grep bitcast
-define bool %main(i32 %X) {
-  %res = bitcast bool true to bool
-  ret bool %res
+define i1 %main(i32 %X) {
+  %res = bitcast i1 true to i1
+  ret i1 %res
 }
index b12a897e7abd3ef812e85726845e418c222fa235..96e6d6c4e981dd6b1484634b29fff5d8b40493ca 100644 (file)
@@ -5,6 +5,6 @@
 
 implementation   ; Functions:
 
-define bool %someFunc(i32* %tmp.71.reload, %typedef.bc_struct* %n1) {
-       ret bool true
+define i1 %someFunc(i32* %tmp.71.reload, %typedef.bc_struct* %n1) {
+       ret i1 true
 }
index 331ab93d0e3bf6ca321222777048e1a6a95a2ef3..66b639e9969c2f12a80d0edfe0f90e23cdf73124 100644 (file)
@@ -2,7 +2,7 @@
 
 define csretcc void %__divsc3({ float, float }* %agg.result, float %a, float %b, float %c, float %d) {
 entry:
-       br bool false, label %bb, label %cond_next375
+       br i1 false, label %bb, label %cond_next375
 
 bb:            ; preds = %entry
        %tmp81 = tail call float %copysignf( float 0x7FF0000000000000, float %c )               ; <float> [#uses=1]
@@ -16,6 +16,6 @@ cond_next375:         ; preds = %bb, %entry
 
 declare float %fabsf(float)
 
-declare bool %llvm.isunordered.f32(float, float)
+declare i1 %llvm.isunordered.f32(float, float)
 
 declare float %copysignf(float, float)
index 2bbaa5c34b816916d8235ffae370b52ee0496f30..0c2d4658a762c1a0107de895254becbcbe9d7e88 100644 (file)
@@ -5,7 +5,7 @@
 define i32 %f7(float %a, float %b) {
 entry:
     %tmp = fcmp ueq float %a,%b
-    %retval = select bool %tmp, i32 666, i32 42
+    %retval = select i1 %tmp, i32 666, i32 42
     ret i32 %retval
 }
 
index ab5ee17eed506666f2cf14a0c09ef9306f45dffc..0068427772b6e545e7d880fab9f6062f1bbbc70f 100644 (file)
@@ -17,7 +17,7 @@ define i32 %test2(i16 zext %X) {
 define void %test3() {
        %tmp.0 = call i16 %foo() sext            ;; no extsh!
        %tmp.1 = icmp slt i16 %tmp.0, 1234
-       br bool %tmp.1, label %then, label %UnifiedReturnBlock
+       br i1 %tmp.1, label %then, label %UnifiedReturnBlock
 
 then:  
        call i32 %test1(i16 0 sext)
index 7a9df5301df8e28c2bcf32dd9ab4d0215dcdf8ae..3911c698dce36d68e8dbcf72bdf4d44d42ef1196 100644 (file)
@@ -7,7 +7,7 @@
 define double %foo(i32 %a.u) {
 entry:
     %tmp = icmp eq i32 %a.u,0
-    %retval = select bool %tmp, double 4.561230e+02, double 1.234560e+02
+    %retval = select i1 %tmp, double 4.561230e+02, double 1.234560e+02
     ret double %retval
 }
 
index e9c18c55d15e82f21cdc6a6f6e248f6c0099a31d..a9ac6c1b297c4fc18d664f0470bf07b2b0054aab 100644 (file)
@@ -1,32 +1,32 @@
-; An integer truncation to bool should be done with an and instruction to make
+; An integer truncation to i1 should be done with an and instruction to make
 ; sure only the LSBit survives. Test that this is the case both for a returned
 ; value and as the operand of a branch.
 ; RUN: llvm-as < %s | llc -march=x86 &&
 ; RUN: llvm-as < %s | llc -march=x86 | grep '\(and\)\|\(test.*\$1\)' | \
 ; RUN:   wc -l | grep 6
 
-define bool %test1(i32 %X) zext {
-    %Y = trunc i32 %X to bool
-    ret bool %Y
+define i1 %test1(i32 %X) zext {
+    %Y = trunc i32 %X to i1
+    ret i1 %Y
 }
 
-define bool %test2(i32 %val, i32 %mask) {
+define i1 %test2(i32 %val, i32 %mask) {
 entry:
     %mask = trunc i32 %mask to i8
     %shifted = ashr i32 %val, i8 %mask
     %anded = and i32 %shifted, 1
-    %trunced = trunc i32 %anded to bool
-    br bool %trunced, label %ret_true, label %ret_false
+    %trunced = trunc i32 %anded to i1
+    br i1 %trunced, label %ret_true, label %ret_false
 ret_true:
-    ret bool true
+    ret i1 true
 ret_false:
-    ret bool false
+    ret i1 false
 }
 
 define i32 %test3(i8* %ptr) {
     %val = load i8* %ptr
-    %tmp = trunc i8 %val to bool
-    br bool %tmp, label %cond_true, label %cond_false
+    %tmp = trunc i8 %val to i1
+    br i1 %tmp, label %cond_true, label %cond_false
 cond_true:
     ret i32 21
 cond_false:
@@ -34,8 +34,8 @@ cond_false:
 }
 
 define i32 %test4(i8* %ptr) {
-    %tmp = ptrtoint i8* %ptr to bool
-    br bool %tmp, label %cond_true, label %cond_false
+    %tmp = ptrtoint i8* %ptr to i1
+    br i1 %tmp, label %cond_true, label %cond_false
 cond_true:
     ret i32 21
 cond_false:
@@ -43,8 +43,8 @@ cond_false:
 }
 
 define i32 %test5(float %f) {
-    %tmp = fptoui float %f to bool
-    br bool %tmp, label %cond_true, label %cond_false
+    %tmp = fptoui float %f to i1
+    br i1 %tmp, label %cond_true, label %cond_false
 cond_true:
     ret i32 21
 cond_false:
@@ -52,8 +52,8 @@ cond_false:
 }
 
 define i32 %test6(double %d) {
-    %tmp = fptosi double %d to bool
-    br bool %tmp, label %cond_true, label %cond_false
+    %tmp = fptosi double %d to i1
+    br i1 %tmp, label %cond_true, label %cond_false
 cond_true:
     ret i32 21
 cond_false:
index 659900ba8979ed3e333133667089bccd85264a66..df727dbe15ac0eb37ca4ccf0d26aaaa2fc1bcd2c 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 'ret bool false'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 'ret i1 false'
 bool %test() {
   %X = trunc uint 320 to bool
   ret bool %X
index 4c1fcb6ecef728b97a18dd0dda3e2f893b7d4e25..29cb4f5d34c8d4419f77e64855f65033b5414ba6 100644 (file)
@@ -1,4 +1,5 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt -instcombine | llvm-dis | grep 'ret bool true'
+; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt -instcombine | \
+; RUN:    llvm-dis | grep 'ret i1 true'
 
 ;; check that global opt turns integers that only hold 0 or 1 into bools.
 
index 3518a25c16b6bed430e68d7cc23b35e2e76821dd..50e6a77a5b8731463c89b28ae750a41c39c3719a 100644 (file)
@@ -1,4 +1,5 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -ipconstprop -instcombine | llvm-dis | grep 'ret bool true'
+; RUN: llvm-upgrade < %s | llvm-as | opt -ipconstprop -instcombine | \
+; RUN:    llvm-dis | grep 'ret i1 true'
 implementation
 
 internal int %foo(bool %C) {
index 0acaee1d27edb46abf0a1d1e18466f90c6872626..727572278306cd487f9bd16aacafaacb7bf5d845 100644 (file)
@@ -21,8 +21,8 @@ bb:           ; preds = %cond_next, %cond_true
 
 bb2:           ; preds = %bb, %entry
        %i.0 = phi i32 [ 0, %entry ], [ %tmp1, %bb ]            ; <i32> [#uses=4]
-       %tmp = icmp eq i32 %i.0, 0              ; <bool> [#uses=1]
-       br bool %tmp, label %cond_true, label %cond_next
+       %tmp = icmp eq i32 %i.0, 0              ; <i1> [#uses=1]
+       br i1 %tmp, label %cond_true, label %cond_next
 
 cond_true:             ; preds = %bb2
        br label %bb
@@ -30,8 +30,8 @@ cond_true:            ; preds = %bb2
 cond_next:             ; preds = %bb2
        %tmp = getelementptr [5 x i8]* %foo, i32 0, i32 %i.0            ; <i8*> [#uses=1]
        %tmp = load i8* %tmp            ; <i8> [#uses=1]
-       %tmp5 = icmp eq i8 %tmp, 0              ; <bool> [#uses=1]
-       br bool %tmp5, label %bb6, label %bb
+       %tmp5 = icmp eq i8 %tmp, 0              ; <i1> [#uses=1]
+       br i1 %tmp5, label %bb6, label %bb
 
 bb6:           ; preds = %cond_next
        br label %return
index 9b6ae8261b2bead51781397c6f912501d479c9fe..028e81f61cbd5fd696ae9322e755a6207b747d85 100644 (file)
@@ -11,7 +11,7 @@ bb:
         store double 0.000000e+00, double* %j
         %k = add i64 %i, 1
         %n = icmp eq i64 %k, 0
-        br bool %n, label %return, label %bb
+        br i1 %n, label %return, label %bb
 
 return:
         ret void
index 88c4cc43153f6130c200d4fb2ee58f40e91c792f..e1144b61b0ee8dc116d8765cc137b827138fce9d 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 'ret bool false'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 'ret i1 false'
 bool %test(bool %V) {
        %Y = setlt bool %V, false
        ret bool %Y
index 49abb12e6fcbef132145fc2340c1d7afae3e3f0c..f4d6703873b3125d469ce1bcc34a115aa3010c36 100644 (file)
@@ -1,4 +1,5 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 'ret bool true'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
+; RUN:   grep 'ret i1 true'
 ; PR586
 
 %g_07918478 = external global uint             ; <uint*> [#uses=1]
index c382575f3f4e059235a71b8fb72af8cd06c77460..bff2b88a5db11eecea7438dcdb97f2157a06cab8 100644 (file)
@@ -1,7 +1,8 @@
 ; This file contains various testcases that check to see that instcombine
 ; is narrowing computations when possible.
 
-; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 'ret bool false'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
+; RUN:    grep 'ret i1 false'
 
 ; test1 - Eliminating the casts in this testcase (by narrowing the AND
 ; operation) allows instcombine to realize the function always returns false.
index 5a34a2a31404d1c17c366d428f5d73388b8f6f3e..79beb0bff748eed67d0cdda4d61eb74fb22b3206 100644 (file)
@@ -1,8 +1,9 @@
 ; Make sure that the compare instruction occurs after the increment to avoid
-; having overlapping live ranges that result in copies.  We want the setcc instruction
-; immediately before the conditional branch.
+; having overlapping live ranges that result in copies.  We want the setcc 
+; instruction immediately before the conditional branch.
 ;
-; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | %prcontext 'br bool' 1 | grep icmp
+; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | \
+; RUN:    %prcontext 'br i1' 1 | grep icmp
 
 void %foo(float* %D, uint %E) {
 entry:
index 388b9abb29f9e5d72d079a3525558f9b34eabc04..e991818b6c92e6c2ef3524e4cef4b1843835afb2 100644 (file)
@@ -1,5 +1,5 @@
 ; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | \
-; RUN:   grep 'ret bool false'
+; RUN:   grep 'ret i1 false'
 
 bool %foo() {
        %X = and bool false, undef