summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-11-27 01:05:10 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-11-27 01:05:10 +0000
commit3da59db637a887474c1b1346c1f3ccf53b6c4663 (patch)
treeb061e2133efdb9ea9bb334c1b15ceea881bb88f8 /test
parent5fed9b90447a9a95a1f670ccd9c23aea8c937451 (diff)
downloadllvm-3da59db637a887474c1b1346c1f3ccf53b6c4663.tar.gz
llvm-3da59db637a887474c1b1346c1f3ccf53b6c4663.tar.bz2
llvm-3da59db637a887474c1b1346c1f3ccf53b6c4663.tar.xz
For PR950:
The long awaited CAST patch. This introduces 12 new instructions into LLVM to replace the cast instruction. Corresponding changes throughout LLVM are provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the exception of 175.vpr which fails only on a slight floating point output difference. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31931 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Analysis/LoadVN/casts.ll12
-rw-r--r--test/Assembler/2003-11-12-ConstantExprCast.llx2
-rw-r--r--test/CFrontend/cast-to-bool.c16
-rw-r--r--test/CodeGen/CBackend/2003-06-23-PromotedExprs.llx2
-rw-r--r--test/CodeGen/X86/trunc-to-bool.ll32
-rw-r--r--test/Feature/casttest.ll16
-rw-r--r--test/Transforms/IPConstantProp/return-constant.ll2
-rw-r--r--test/Transforms/Inline/casts.ll20
-rw-r--r--test/Transforms/InstCombine/2003-11-03-VarargsCallBug.ll2
-rw-r--r--test/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst-2.ll2
-rw-r--r--test/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst.ll9
-rw-r--r--test/Transforms/InstCombine/binop-cast.ll7
-rw-r--r--test/Transforms/InstCombine/call-cast-target.ll2
-rw-r--r--test/Transforms/InstCombine/cast-malloc.ll8
-rw-r--r--test/Transforms/InstCombine/cast.ll8
-rw-r--r--test/Transforms/InstCombine/cast_ptr.ll2
-rw-r--r--test/Transforms/InstCombine/fpcast.ll14
-rw-r--r--test/Transforms/InstCombine/getelementptr_cast.ll6
-rw-r--r--test/Transforms/InstCombine/getelementptr_index.ll2
-rw-r--r--test/Transforms/InstCombine/narrow.ll6
-rw-r--r--test/Transforms/InstCombine/setcc-cast-cast.ll42
-rw-r--r--test/Transforms/InstCombine/zext.ll9
-rw-r--r--test/Transforms/LevelRaise/2002-03-21-MissedRaise.ll6
-rw-r--r--test/Transforms/LevelRaise/2002-03-21-MissedRaise2.ll2
-rw-r--r--test/Transforms/LevelRaise/2002-03-21-MissedRaise3.ll2
-rw-r--r--test/Transforms/LevelRaise/2002-04-16-MissedRaise.ll2
-rw-r--r--test/Transforms/LevelRaise/2002-05-02-MissedRaise.ll2
-rw-r--r--test/Transforms/LevelRaise/2002-05-10-LoadPeephole.ll2
-rw-r--r--test/Transforms/LevelRaise/2002-05-23-MissedRaise.ll2
-rw-r--r--test/Transforms/LevelRaise/2002-07-16-MissedRaise.ll2
-rw-r--r--test/Transforms/LevelRaise/2002-07-18-MissedAllocaRaise.ll2
31 files changed, 211 insertions, 32 deletions
diff --git a/test/Analysis/LoadVN/casts.ll b/test/Analysis/LoadVN/casts.ll
new file mode 100644
index 0000000000..462338d0d8
--- /dev/null
+++ b/test/Analysis/LoadVN/casts.ll
@@ -0,0 +1,12 @@
+; Check to make sure that Value Numbering doesn't merge casts of different
+; flavors.
+; RUN: llvm-as < %s | opt -load-vn -gcse | llvm-dis | grep '[sz]ext' | wc -l | grep 2
+
+declare void %external(int)
+
+int %test_casts(short %x) {
+ %a = sext short %x to int
+ %b = zext short %x to int
+ call void %external(int %a)
+ ret int %b
+}
diff --git a/test/Assembler/2003-11-12-ConstantExprCast.llx b/test/Assembler/2003-11-12-ConstantExprCast.llx
index bceae9f388..8b3f05128b 100644
--- a/test/Assembler/2003-11-12-ConstantExprCast.llx
+++ b/test/Assembler/2003-11-12-ConstantExprCast.llx
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llvm-dis | grep ' cast ('
+; RUN: llvm-as < %s | llvm-dis | grep ' bitcast ('
%.Base64_1 = external constant [4 x sbyte]
diff --git a/test/CFrontend/cast-to-bool.c b/test/CFrontend/cast-to-bool.c
new file mode 100644
index 0000000000..ddf21b0854
--- /dev/null
+++ b/test/CFrontend/cast-to-bool.c
@@ -0,0 +1,16 @@
+// RUN: %llvmgcc -S %s -o - | grep 'trunc.*to bool'
+// RUN: %llvmgcc -S %s -o - | llvm-as | llc -march=x86 | grep and
+int
+main ( int argc, char** argv)
+{
+ int i;
+ int result = 1;
+ for (i = 2; i <= 3; i++)
+ {
+ if ((i & 1) == 0)
+ {
+ result = result + 17;
+ }
+ }
+ return result;
+}
diff --git a/test/CodeGen/CBackend/2003-06-23-PromotedExprs.llx b/test/CodeGen/CBackend/2003-06-23-PromotedExprs.llx
index d3ad57fc11..286d65b345 100644
--- a/test/CodeGen/CBackend/2003-06-23-PromotedExprs.llx
+++ b/test/CodeGen/CBackend/2003-06-23-PromotedExprs.llx
@@ -5,7 +5,7 @@
bool %doTest(ubyte %x) {
%dec.0 = add ubyte %x, 255
- %tmp.1001 = cast ubyte %dec.0 to bool
+ %tmp.1001 = trunc ubyte %dec.0 to bool
ret bool %tmp.1001
}
diff --git a/test/CodeGen/X86/trunc-to-bool.ll b/test/CodeGen/X86/trunc-to-bool.ll
new file mode 100644
index 0000000000..693b94c773
--- /dev/null
+++ b/test/CodeGen/X86/trunc-to-bool.ll
@@ -0,0 +1,32 @@
+; An integer truncation to bool 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\)' | wc -l | grep 3
+bool %test1(int %X) {
+ %Y = trunc int %X to bool
+ ret bool %Y
+}
+
+bool %test2(int %val, int %mask) {
+entry:
+ %mask = trunc int %mask to ubyte
+ %shifted = ashr int %val, ubyte %mask
+ %anded = and int %shifted, 1
+ %trunced = trunc int %anded to bool
+ br bool %trunced, label %ret_true, label %ret_false
+ret_true:
+ ret bool true
+ret_false:
+ ret bool false
+}
+
+int %test3(sbyte* %ptr) {
+ %val = load sbyte* %ptr
+ %tmp = trunc sbyte %val to bool ; %<bool> [#uses=1]
+ br bool %tmp, label %cond_true, label %cond_false
+cond_true:
+ ret int 21
+cond_false:
+ ret int 42
+}
diff --git a/test/Feature/casttest.ll b/test/Feature/casttest.ll
index acd47e575b..e7d8756791 100644
--- a/test/Feature/casttest.ll
+++ b/test/Feature/casttest.ll
@@ -2,7 +2,21 @@
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
; RUN: diff %t1.ll %t2.ll
-implementation
+void "NewCasts" (short %x) {
+ %a = zext short %x to int
+ %b = sext short %x to uint
+ %c = trunc short %x to ubyte
+ %d = uitofp short %x to float
+ %e = sitofp short %x to double
+ %f = fptoui float %d to short
+ %g = fptosi double %e to short
+ %i = fpext float %d to double
+ %j = fptrunc double %i to float
+ %k = bitcast int %a to float
+ %l = inttoptr short %x to int*
+ %m = ptrtoint int* %l to long
+ ret void
+}
short "FunFunc"(long %x, sbyte %z)
begin
diff --git a/test/Transforms/IPConstantProp/return-constant.ll b/test/Transforms/IPConstantProp/return-constant.ll
index a3e2832c5e..f779d76af1 100644
--- a/test/Transforms/IPConstantProp/return-constant.ll
+++ b/test/Transforms/IPConstantProp/return-constant.ll
@@ -11,6 +11,6 @@ F:
bool %caller(bool %C) {
%X = call int %foo(bool %C)
- %Y = cast int %X to bool
+ %Y = trunc int %X to bool
ret bool %Y
}
diff --git a/test/Transforms/Inline/casts.ll b/test/Transforms/Inline/casts.ll
new file mode 100644
index 0000000000..8b597adca0
--- /dev/null
+++ b/test/Transforms/Inline/casts.ll
@@ -0,0 +1,20 @@
+; RUN: llvm-as < %s | opt -inline | llvm-dis | grep 'ret int 1'
+; ModuleID = 'short.opt.bc'
+
+implementation ; Functions:
+
+int %testBool(bool %X) {
+ %tmp = zext bool %X to int ; <int> [#uses=1]
+ ret int %tmp
+}
+
+int %testByte(sbyte %X) {
+ %tmp = setne sbyte %X, 0 ; <bool> [#uses=1]
+ %tmp.i = zext bool %tmp to int ; <int> [#uses=1]
+ ret int %tmp.i
+}
+
+int %main() {
+ %rslt = call int %testByte( sbyte 123)
+ ret int %rslt
+}
diff --git a/test/Transforms/InstCombine/2003-11-03-VarargsCallBug.ll b/test/Transforms/InstCombine/2003-11-03-VarargsCallBug.ll
index 051add8c0b..7e045d8541 100644
--- a/test/Transforms/InstCombine/2003-11-03-VarargsCallBug.ll
+++ b/test/Transforms/InstCombine/2003-11-03-VarargsCallBug.ll
@@ -1,5 +1,5 @@
; The cast in this testcase is not eliminatable on a 32-bit target!
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep cast
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep inttoptr
target endian = little
target pointersize = 32
diff --git a/test/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst-2.ll b/test/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst-2.ll
index c10e62db8e..f7925e138d 100644
--- a/test/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst-2.ll
+++ b/test/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst-2.ll
@@ -1,5 +1,5 @@
; The optimizer should be able to remove cast operation here.
-; RUN: llvm-as %s -o - | opt -instcombine | llvm-dis | not grep 'cast.*int'
+; RUN: llvm-as %s -o - | opt -instcombine | llvm-dis | not grep 'sext.*int'
bool %eq_signed_to_small_unsigned(sbyte %SB) {
%Y = cast sbyte %SB to uint ; <uint> [#uses=1]
diff --git a/test/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst.ll b/test/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst.ll
index e35c36694f..f23f5fb229 100644
--- a/test/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst.ll
+++ b/test/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst.ll
@@ -1,8 +1,9 @@
; This test case is reduced from llvmAsmParser.cpp
; The optimizer should not remove the cast here.
-; RUN: llvm-as %s -o - | opt -instcombine | llvm-dis | grep 'cast.*int'
+; RUN: llvm-as %s -o - | opt -instcombine | llvm-dis | grep 'sext.*int'
+
bool %test(short %X) {
-%A = cast short %X to uint
-%B = setgt uint %A, 1330
-ret bool %B
+ %A = cast short %X to uint
+ %B = setgt uint %A, 1330
+ ret bool %B
}
diff --git a/test/Transforms/InstCombine/binop-cast.ll b/test/Transforms/InstCombine/binop-cast.ll
new file mode 100644
index 0000000000..13404df941
--- /dev/null
+++ b/test/Transforms/InstCombine/binop-cast.ll
@@ -0,0 +1,7 @@
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | notcast
+
+uint %testAdd(int %X, int %Y) {
+ %tmp = add int %X, %Y
+ %tmp.l = sext int %tmp to uint
+ ret uint %tmp.l
+}
diff --git a/test/Transforms/InstCombine/call-cast-target.ll b/test/Transforms/InstCombine/call-cast-target.ll
index a197742a66..77097caf29 100644
--- a/test/Transforms/InstCombine/call-cast-target.ll
+++ b/test/Transforms/InstCombine/call-cast-target.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep call | not grep cast
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep call | not grep bitcast
target endian = little
target pointersize = 32
diff --git a/test/Transforms/InstCombine/cast-malloc.ll b/test/Transforms/InstCombine/cast-malloc.ll
new file mode 100644
index 0000000000..25eb4367c6
--- /dev/null
+++ b/test/Transforms/InstCombine/cast-malloc.ll
@@ -0,0 +1,8 @@
+; test that casted mallocs get converted to malloc of the right type
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep bitcast
+
+int* %test(uint %size) {
+ %X = malloc long, uint %size
+ %ret = bitcast long* %X to int*
+ ret int* %ret
+}
diff --git a/test/Transforms/InstCombine/cast.ll b/test/Transforms/InstCombine/cast.ll
index ba0b30452c..4accb47af2 100644
--- a/test/Transforms/InstCombine/cast.ll
+++ b/test/Transforms/InstCombine/cast.ll
@@ -1,6 +1,6 @@
; Tests to make sure elimination of casts is working correctly
; RUN: llvm-as < %s | opt -instcombine -disable-output &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep '%c' | not grep cast
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep '%c' | notcast
%inbuf = external global [32832 x ubyte]
@@ -104,7 +104,6 @@ bool %test16(int* %P) {
ret bool %c
}
-
short %test17(bool %tmp3) {
%c = cast bool %tmp3 to int
%t86 = cast int %c to short
@@ -207,3 +206,8 @@ void %test32(double** %tmp) {
ret void
}
+uint %test33(uint %c1) {
+ %x = bitcast uint %c1 to float
+ %y = bitcast float %x to uint
+ ret uint %y
+}
diff --git a/test/Transforms/InstCombine/cast_ptr.ll b/test/Transforms/InstCombine/cast_ptr.ll
index be0a8970dc..7b572560e4 100644
--- a/test/Transforms/InstCombine/cast_ptr.ll
+++ b/test/Transforms/InstCombine/cast_ptr.ll
@@ -1,6 +1,6 @@
; Tests to make sure elimination of casts is working correctly
; RUN: llvm-as < %s | opt -instcombine -disable-output &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep cast
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep '\([sz]ext\)\|\(trunc\)'
target pointersize = 32
diff --git a/test/Transforms/InstCombine/fpcast.ll b/test/Transforms/InstCombine/fpcast.ll
new file mode 100644
index 0000000000..31cd47f619
--- /dev/null
+++ b/test/Transforms/InstCombine/fpcast.ll
@@ -0,0 +1,14 @@
+; Test some floating point casting cases
+; RUN: llvm-as %s -o - | opt -instcombine | llvm-dis | notcast
+; RUN: llvm-as %s -o - | opt -instcombine | llvm-dis | \
+; RUN: grep 'ret [us]byte \(-1\)\|\(255\)'
+
+sbyte %test() {
+ %x = fptoui float 255.0 to sbyte
+ ret sbyte %x
+}
+
+ubyte %test() {
+ %x = fptosi float -1.0 to ubyte
+ ret ubyte %x
+}
diff --git a/test/Transforms/InstCombine/getelementptr_cast.ll b/test/Transforms/InstCombine/getelementptr_cast.ll
index ece73f7710..b600874e12 100644
--- a/test/Transforms/InstCombine/getelementptr_cast.ll
+++ b/test/Transforms/InstCombine/getelementptr_cast.ll
@@ -1,9 +1,9 @@
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 'getelementptr.*cast'
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | notcast '' 'getelementptr.*'
%G = external global [3 x sbyte]
implementation
ubyte *%foo(uint %Idx) {
-%tmp = getelementptr ubyte* cast ([3 x sbyte]* %G to ubyte*), uint %Idx
-ret ubyte* %tmp
+ %tmp = getelementptr ubyte* cast ([3 x sbyte]* %G to ubyte*), uint %Idx
+ ret ubyte* %tmp
}
diff --git a/test/Transforms/InstCombine/getelementptr_index.ll b/test/Transforms/InstCombine/getelementptr_index.ll
index ca7d6e0465..8346fa5191 100644
--- a/test/Transforms/InstCombine/getelementptr_index.ll
+++ b/test/Transforms/InstCombine/getelementptr_index.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep cast
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep trunc
target endian = little
target pointersize = 32
diff --git a/test/Transforms/InstCombine/narrow.ll b/test/Transforms/InstCombine/narrow.ll
index b8be8c3055..75a78a3f8b 100644
--- a/test/Transforms/InstCombine/narrow.ll
+++ b/test/Transforms/InstCombine/narrow.ll
@@ -8,10 +8,10 @@
;
bool %test1(int %A, int %B) {
%C1 = setlt int %A, %B
- %ELIM1 = cast bool %C1 to uint
+ %ELIM1 = zext bool %C1 to uint
%C2 = setgt int %A, %B
- %ELIM2 = cast bool %C2 to uint
+ %ELIM2 = zext bool %C2 to uint
%C3 = and uint %ELIM1, %ELIM2
- %ELIM3 = cast uint %C3 to bool
+ %ELIM3 = trunc uint %C3 to bool
ret bool %ELIM3
}
diff --git a/test/Transforms/InstCombine/setcc-cast-cast.ll b/test/Transforms/InstCombine/setcc-cast-cast.ll
new file mode 100644
index 0000000000..e311c523fb
--- /dev/null
+++ b/test/Transforms/InstCombine/setcc-cast-cast.ll
@@ -0,0 +1,42 @@
+; This test case was reduced from MultiSource/Applications/hbd. It makes sure
+; that folding doesn't happen in case a zext is applied where a sext should have
+; been when a setcc is used with two casts.
+; RUN: llvm-as < %s | llc -instcombine | llvm-dis | not grep 'br bool false'
+int %bug(ubyte %inbuff) {
+entry:
+ %tmp = bitcast ubyte %inbuff to sbyte ; <sbyte> [#uses=1]
+ %tmp = sext sbyte %tmp to int ; <int> [#uses=3]
+ %tmp = seteq int %tmp, 1 ; <bool> [#uses=1]
+ br bool %tmp, label %cond_true, label %cond_next
+
+cond_true: ; preds = %entry
+ br label %bb
+
+cond_next: ; preds = %entry
+ %tmp3 = seteq int %tmp, -1 ; <bool> [#uses=1]
+ br bool %tmp3, label %cond_true4, label %cond_next5
+
+cond_true4: ; preds = %cond_next
+ br label %bb
+
+cond_next5: ; preds = %cond_next
+ %tmp7 = setgt int %tmp, 1 ; <bool> [#uses=1]
+ br bool %tmp7, label %cond_true8, label %cond_false
+
+cond_true8: ; preds = %cond_next5
+ br label %cond_next9
+
+cond_false: ; preds = %cond_next5
+ br label %cond_next9
+
+cond_next9: ; preds = %cond_false, %cond_true8
+ %iftmp.1.0 = phi int [ 42, %cond_true8 ], [ 23, %cond_false ] ; <int> [#uses=1]
+ br label %return
+
+bb: ; preds = %cond_true4, %cond_true
+ br label %return
+
+return: ; preds = %bb, %cond_next9
+ %retval.0 = phi int [ 17, %bb ], [ %iftmp.1.0, %cond_next9 ] ; <int> [#uses=1]
+ ret int %retval.0
+}
diff --git a/test/Transforms/InstCombine/zext.ll b/test/Transforms/InstCombine/zext.ll
new file mode 100644
index 0000000000..27442aab61
--- /dev/null
+++ b/test/Transforms/InstCombine/zext.ll
@@ -0,0 +1,9 @@
+; Tests to make sure elimination of casts is working correctly
+; RUN: llvm-as < %s | opt -instcombine -disable-output &&
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | notcast '' '%c1.*'
+
+long %test_sext_zext(short %A) {
+ %c1 = zext short %A to uint
+ %c2 = sext uint %c1 to long
+ ret long %c2
+}
diff --git a/test/Transforms/LevelRaise/2002-03-21-MissedRaise.ll b/test/Transforms/LevelRaise/2002-03-21-MissedRaise.ll
index 61c39723c1..5f6250ef33 100644
--- a/test/Transforms/LevelRaise/2002-03-21-MissedRaise.ll
+++ b/test/Transforms/LevelRaise/2002-03-21-MissedRaise.ll
@@ -1,8 +1,8 @@
-; This example should be raised to return a Hash directly without casting. To
-; successful, all cast instructions should be eliminated from this testcase.
+; This example should be raised to return a Hash directly without casting.
+; LevelRaise should eliminate all cast instructions from this testcase.
;
; XFAIL: *
-; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep cast
+; RUN: llvm-as < %s | opt -raise | llvm-dis | notcast
%Hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int } *
%hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int }
diff --git a/test/Transforms/LevelRaise/2002-03-21-MissedRaise2.ll b/test/Transforms/LevelRaise/2002-03-21-MissedRaise2.ll
index be25022e49..4a778ea0e5 100644
--- a/test/Transforms/LevelRaise/2002-03-21-MissedRaise2.ll
+++ b/test/Transforms/LevelRaise/2002-03-21-MissedRaise2.ll
@@ -3,7 +3,7 @@
; prevented reg115 from being able to change.
;
; XFAIL: *
-; RUN: llvm-as < %s | opt -raise | llvm-dis | grep '= cast' | not grep \*
+; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep bitcast
%Hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int } *
%HashEntry = type { uint, sbyte *, \2 } *
diff --git a/test/Transforms/LevelRaise/2002-03-21-MissedRaise3.ll b/test/Transforms/LevelRaise/2002-03-21-MissedRaise3.ll
index b3e42cc9dc..6379ab5848 100644
--- a/test/Transforms/LevelRaise/2002-03-21-MissedRaise3.ll
+++ b/test/Transforms/LevelRaise/2002-03-21-MissedRaise3.ll
@@ -1,5 +1,5 @@
; XFAIL: *
-; RUN: llvm-as < %s | opt -raise | llvm-dis | grep '= cast' | not grep \*
+; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep bitcast
%Hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int } *
%HashEntry = type { uint, sbyte *, \2 } *
diff --git a/test/Transforms/LevelRaise/2002-04-16-MissedRaise.ll b/test/Transforms/LevelRaise/2002-04-16-MissedRaise.ll
index c1a4e056a9..1fa2fd8253 100644
--- a/test/Transforms/LevelRaise/2002-04-16-MissedRaise.ll
+++ b/test/Transforms/LevelRaise/2002-04-16-MissedRaise.ll
@@ -6,7 +6,7 @@
; return (int*)malloc(i+j);
; }
-; RUN: llvm-as < %s | opt -raise | llvm-dis | grep ' cast ' | not grep '*'
+; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep bitcast
implementation
diff --git a/test/Transforms/LevelRaise/2002-05-02-MissedRaise.ll b/test/Transforms/LevelRaise/2002-05-02-MissedRaise.ll
index 615217e09c..64000918de 100644
--- a/test/Transforms/LevelRaise/2002-05-02-MissedRaise.ll
+++ b/test/Transforms/LevelRaise/2002-05-02-MissedRaise.ll
@@ -1,6 +1,6 @@
; This testcase is not level raised properly...
; XFAIL: *
-; RUN: llvm-as < %s | opt -raise | llvm-dis | grep ' cast ' | not grep '*'
+; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep bitcast
%List = type { int, %List* }
diff --git a/test/Transforms/LevelRaise/2002-05-10-LoadPeephole.ll b/test/Transforms/LevelRaise/2002-05-10-LoadPeephole.ll
index 1e2ca0e0e9..102b57431f 100644
--- a/test/Transforms/LevelRaise/2002-05-10-LoadPeephole.ll
+++ b/test/Transforms/LevelRaise/2002-05-10-LoadPeephole.ll
@@ -1,7 +1,7 @@
; This testcase should have the cast propogated through the load
; just like a store does...
;
-; RUN: llvm-as < %s | opt -raise | llvm-dis | grep ' cast ' | not grep '*'
+; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep 'bitcast uint \*'
int "test"(uint * %Ptr) {
%P2 = cast uint *%Ptr to int *
diff --git a/test/Transforms/LevelRaise/2002-05-23-MissedRaise.ll b/test/Transforms/LevelRaise/2002-05-23-MissedRaise.ll
index c092e6b181..59a4248d5a 100644
--- a/test/Transforms/LevelRaise/2002-05-23-MissedRaise.ll
+++ b/test/Transforms/LevelRaise/2002-05-23-MissedRaise.ll
@@ -1,5 +1,5 @@
; XFAIL: *
-; RUN: llvm-as < %s | opt -raise | llvm-dis | grep '= cast' | not grep \*
+; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep bitcast
%FILE = type { int, ubyte*, ubyte*, ubyte, ubyte, uint, uint, uint }
diff --git a/test/Transforms/LevelRaise/2002-07-16-MissedRaise.ll b/test/Transforms/LevelRaise/2002-07-16-MissedRaise.ll
index c3406bab72..a5ed52ccb5 100644
--- a/test/Transforms/LevelRaise/2002-07-16-MissedRaise.ll
+++ b/test/Transforms/LevelRaise/2002-07-16-MissedRaise.ll
@@ -5,7 +5,7 @@
; This could be fixed by making all stores add themselves to a list, and check
; their arguments are consistent AFTER all other values are propogated.
; XFAIL: *
-; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep '= cast'
+; RUN: llvm-as < %s | opt -raise | llvm-dis | notcast
%Tree = type %struct.tree*
%struct.tree = type { int, double, double, %Tree, %Tree, %Tree, %Tree }
diff --git a/test/Transforms/LevelRaise/2002-07-18-MissedAllocaRaise.ll b/test/Transforms/LevelRaise/2002-07-18-MissedAllocaRaise.ll
index 422b977e24..91301f0510 100644
--- a/test/Transforms/LevelRaise/2002-07-18-MissedAllocaRaise.ll
+++ b/test/Transforms/LevelRaise/2002-07-18-MissedAllocaRaise.ll
@@ -1,6 +1,6 @@
; Looks like we don't raise alloca's like we do mallocs
; XFAIL: *
-; RUN: llvm-as < %s | opt -raise | llvm-dis | grep '= cast' | not grep \*
+; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep bitcast
implementation ; Functions: