From 8aabc9eb23cd0f09a865e71a052eb2f6f51ea6df Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Tue, 2 Jan 2007 05:53:06 +0000 Subject: For PR1070: Revert previous patch now that llvm-upgrade can handle collapsed type plane conversion properly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32814 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/Generic/SwitchLowering.ll | 1 + test/CodeGen/PowerPC/branch-opt.ll | 17 +++++++++-------- test/CodeGen/PowerPC/rotl.ll | 20 ++++++++++++-------- test/CodeGen/X86/2006-05-02-InstrSched1.ll | 6 ++++-- 4 files changed, 26 insertions(+), 18 deletions(-) (limited to 'test/CodeGen') diff --git a/test/CodeGen/Generic/SwitchLowering.ll b/test/CodeGen/Generic/SwitchLowering.ll index 4eef03079f..37bfffaa02 100644 --- a/test/CodeGen/Generic/SwitchLowering.ll +++ b/test/CodeGen/Generic/SwitchLowering.ll @@ -19,6 +19,7 @@ bb: ; preds = %bb, %entry ] bb7: ; preds = %bb, %bb + %tmp = cast sbyte %tmp to ubyte ; [#uses=1] tail call void %foo( ubyte %tmp ) ret sbyte* %tmp2 } diff --git a/test/CodeGen/PowerPC/branch-opt.ll b/test/CodeGen/PowerPC/branch-opt.ll index 1f94169cb9..7f40a2d866 100644 --- a/test/CodeGen/PowerPC/branch-opt.ll +++ b/test/CodeGen/PowerPC/branch-opt.ll @@ -9,10 +9,10 @@ implementation ; Functions: void %foo(int %W, int %X, int %Y, int %Z) { entry: - %X.u = cast int %X to uint ; [#uses=1] - %Y.u = cast int %Y to uint ; [#uses=1] - %Z.u = cast int %Z to uint ; [#uses=1] - %W.u = cast int %W to uint ; [#uses=1] + %X = cast int %X to uint ; [#uses=1] + %Y = cast int %Y to uint ; [#uses=1] + %Z = cast int %Z to uint ; [#uses=1] + %W = cast int %W to uint ; [#uses=1] %tmp1 = and int %W, 1 ; [#uses=1] %tmp1 = seteq int %tmp1, 0 ; [#uses=1] br bool %tmp1, label %cond_false, label %bb5 @@ -21,7 +21,7 @@ bb: ; preds = %bb5, %bb %indvar77 = phi uint [ %indvar.next78, %bb ], [ 0, %bb5 ] ; [#uses=1] %tmp2 = tail call int (...)* %bar( ) ; [#uses=0] %indvar.next78 = add uint %indvar77, 1 ; [#uses=2] - %exitcond79 = seteq uint %indvar.next78, %X.u ; [#uses=1] + %exitcond79 = seteq uint %indvar.next78, %X ; [#uses=1] br bool %exitcond79, label %cond_next48, label %bb bb5: ; preds = %entry @@ -37,7 +37,7 @@ bb12: ; preds = %bb16, %bb12 %indvar72 = phi uint [ %indvar.next73, %bb12 ], [ 0, %bb16 ] ; [#uses=1] %tmp13 = tail call int (...)* %bar( ) ; [#uses=0] %indvar.next73 = add uint %indvar72, 1 ; [#uses=2] - %exitcond74 = seteq uint %indvar.next73, %Y.u ; [#uses=1] + %exitcond74 = seteq uint %indvar.next73, %Y ; [#uses=1] br bool %exitcond74, label %cond_next48, label %bb12 bb16: ; preds = %cond_false @@ -53,7 +53,7 @@ bb25: ; preds = %bb29, %bb25 %indvar67 = phi uint [ %indvar.next68, %bb25 ], [ 0, %bb29 ] ; [#uses=1] %tmp26 = tail call int (...)* %bar( ) ; [#uses=0] %indvar.next68 = add uint %indvar67, 1 ; [#uses=2] - %exitcond69 = seteq uint %indvar.next68, %Z.u ; [#uses=1] + %exitcond69 = seteq uint %indvar.next68, %Z ; [#uses=1] br bool %exitcond69, label %cond_next48, label %bb25 bb29: ; preds = %cond_false20 @@ -72,8 +72,9 @@ bb38: ; preds = %bb42 bb42: ; preds = %cond_false33, %bb38 %indvar = phi uint [ %indvar.next, %bb38 ], [ 0, %cond_false33 ] ; [#uses=3] + %indvar = cast uint %indvar to int ; [#uses=1] %W_addr.0 = sub int %W, %indvar ; [#uses=1] - %exitcond = seteq uint %indvar, %W.u ; [#uses=1] + %exitcond = seteq uint %indvar, %W ; [#uses=1] br bool %exitcond, label %cond_next48, label %bb38 cond_next48: ; preds = %bb, %bb12, %bb25, %bb42, %cond_false33, %bb29, %bb16, %bb5 diff --git a/test/CodeGen/PowerPC/rotl.ll b/test/CodeGen/PowerPC/rotl.ll index e2045feb92..fc3a6bc6ac 100644 --- a/test/CodeGen/PowerPC/rotl.ll +++ b/test/CodeGen/PowerPC/rotl.ll @@ -7,11 +7,12 @@ implementation ; Functions: int %rotlw(uint %x, int %sh) { entry: %tmp.3 = cast int %sh to ubyte ; [#uses=1] - %x.s = cast uint %x to int ; [#uses=1] + %x = cast uint %x to int ; [#uses=1] %tmp.7 = sub int 32, %sh ; [#uses=1] %tmp.9 = cast int %tmp.7 to ubyte ; [#uses=1] %tmp.10 = shr uint %x, ubyte %tmp.9 ; [#uses=1] - %tmp.4 = shl int %x.s, ubyte %tmp.3 ; [#uses=1] + %tmp.4 = shl int %x, ubyte %tmp.3 ; [#uses=1] + %tmp.10 = cast uint %tmp.10 to int ; [#uses=1] %tmp.12 = or int %tmp.10, %tmp.4 ; [#uses=1] ret int %tmp.12 } @@ -22,17 +23,19 @@ entry: %tmp.4 = shr uint %x, ubyte %tmp.3 ; [#uses=1] %tmp.7 = sub int 32, %sh ; [#uses=1] %tmp.9 = cast int %tmp.7 to ubyte ; [#uses=1] - %x.s = cast uint %x to int ; [#uses=1] - %tmp.10 = shl int %x.s, ubyte %tmp.9 ; [#uses=1] + %x = cast uint %x to int ; [#uses=1] + %tmp.4 = cast uint %tmp.4 to int ; [#uses=1] + %tmp.10 = shl int %x, ubyte %tmp.9 ; [#uses=1] %tmp.12 = or int %tmp.4, %tmp.10 ; [#uses=1] ret int %tmp.12 } int %rotlwi(uint %x) { entry: - %x.s = cast uint %x to int ; [#uses=1] + %x = cast uint %x to int ; [#uses=1] %tmp.7 = shr uint %x, ubyte 27 ; [#uses=1] - %tmp.3 = shl int %x.s, ubyte 5 ; [#uses=1] + %tmp.3 = shl int %x, ubyte 5 ; [#uses=1] + %tmp.7 = cast uint %tmp.7 to int ; [#uses=1] %tmp.9 = or int %tmp.3, %tmp.7 ; [#uses=1] ret int %tmp.9 } @@ -40,8 +43,9 @@ entry: int %rotrwi(uint %x) { entry: %tmp.3 = shr uint %x, ubyte 5 ; [#uses=1] - %x.s = cast uint %x to int ; [#uses=1] - %tmp.7 = shl int %x.s, ubyte 27 ; [#uses=1] + %x = cast uint %x to int ; [#uses=1] + %tmp.3 = cast uint %tmp.3 to int ; [#uses=1] + %tmp.7 = shl int %x, ubyte 27 ; [#uses=1] %tmp.9 = or int %tmp.3, %tmp.7 ; [#uses=1] ret int %tmp.9 } diff --git a/test/CodeGen/X86/2006-05-02-InstrSched1.ll b/test/CodeGen/X86/2006-05-02-InstrSched1.ll index 47118970c3..631e416836 100644 --- a/test/CodeGen/X86/2006-05-02-InstrSched1.ll +++ b/test/CodeGen/X86/2006-05-02-InstrSched1.ll @@ -11,8 +11,10 @@ int %compare(sbyte* %a, sbyte* %b) { %tmp4 = getelementptr ubyte* %tmp, uint %tmp3 ; [#uses=1] %tmp7 = load uint* %tmp ; [#uses=1] %tmp8 = getelementptr ubyte* %tmp, uint %tmp7 ; [#uses=1] - %result = tail call int %memcmp( sbyte* %tmp8, sbyte* %tmp4, uint %tmp ) ; [#uses=1] - ret int %result + %tmp8 = cast ubyte* %tmp8 to sbyte* ; [#uses=1] + %tmp4 = cast ubyte* %tmp4 to sbyte* ; [#uses=1] + %tmp = tail call int %memcmp( sbyte* %tmp8, sbyte* %tmp4, uint %tmp ) ; [#uses=1] + ret int %tmp } declare int %memcmp(sbyte*, sbyte*, uint) -- cgit v1.2.3-70-g09d2