diff --git a/test/CodeGen/Generic/SwitchLowering.ll b/test/CodeGen/Generic/SwitchLowering.ll index 4eef03079f2..37bfffaa026 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 1f94169cb91..7f40a2d8668 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 e2045feb920..fc3a6bc6ac4 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 47118970c39..631e416836d 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) diff --git a/test/Transforms/InstCombine/2006-05-06-Infloop.ll b/test/Transforms/InstCombine/2006-05-06-Infloop.ll index 3b708cd59dc..ef05e6b3542 100644 --- a/test/Transforms/InstCombine/2006-05-06-Infloop.ll +++ b/test/Transforms/InstCombine/2006-05-06-Infloop.ll @@ -10,7 +10,7 @@ implementation ; Functions: int %mem_mono_copy_mono(%struct.gx_device* %dev, ubyte* %base, int %sourcex, int %raster, int %x, int %y, int %w, int %h, uint %zero, uint %one) { entry: - %raster.ui = cast int %raster to uint ; [#uses=3] + %raster = cast int %raster to uint ; [#uses=3] %tmp = seteq uint %one, %zero ; [#uses=1] br bool %tmp, label %cond_true, label %cond_next @@ -146,6 +146,7 @@ cond_true249: ; preds = %cond_true249, %cond_true249.preheader %optr.3.2 = phi ubyte* [ %tmp232, %cond_true249 ], [ %dest.1.0, %cond_true249.preheader ] ; [#uses=1] %bptr.3.2 = phi ubyte* [ %tmp226, %cond_true249 ], [ %line.1.0, %cond_true249.preheader ] ; [#uses=1] %tmp. = add int %tmp109, %w ; [#uses=1] + %indvar = cast uint %indvar to int ; [#uses=1] %tmp.58 = mul int %indvar, -8 ; [#uses=1] %tmp.57 = add int %tmp., -16 ; [#uses=1] %tmp246.2 = add int %tmp.58, %tmp.57 ; [#uses=1] @@ -235,8 +236,10 @@ cond_true295.us: ; preds = %cond_next280.us, %cond_true295.preheader.split.us %dest.1.0.us = phi ubyte* [ %tmp286.us, %cond_next280.us ], [ %tmp100, %cond_true295.preheader.split.us ] ; [#uses=3] %dest_line.1.0.us = phi ubyte** [ %tmp282.us, %cond_next280.us ], [ %tmp96, %cond_true295.preheader.split.us ] ; [#uses=1] %tmp.89 = sub uint 0, %indvar86 ; [#uses=1] + %tmp.89 = cast uint %tmp.89 to int ; [#uses=1] %tmp292.0.us = add int %tmp.89, %tmp29222 ; [#uses=1] - %tmp.91 = mul uint %indvar86, %raster.ui ; [#uses=1] + %tmp.91 = mul uint %indvar86, %raster ; [#uses=1] + %tmp.91 = cast uint %tmp.91 to int ; [#uses=1] %tmp104.sum101 = add int %tmp102, %tmp.91 ; [#uses=1] %line.1.0.us = getelementptr ubyte* %base, int %tmp104.sum101 ; [#uses=2] %tmp.us = load ubyte* %line.1.0.us ; [#uses=1] @@ -310,8 +313,10 @@ cond_true295: ; preds = %cond_true295.preheader.split, %cond_next280 %dest.1.0 = phi ubyte* [ %tmp286, %cond_next280 ], [ %tmp100, %cond_true295.preheader.split ] ; [#uses=4] %dest_line.1.0 = phi ubyte** [ %tmp282, %cond_next280 ], [ %tmp96, %cond_true295.preheader.split ] ; [#uses=1] %tmp.63 = sub uint 0, %indvar60 ; [#uses=1] + %tmp.63 = cast uint %tmp.63 to int ; [#uses=1] %tmp292.0 = add int %tmp.63, %tmp29222 ; [#uses=1] - %tmp.65 = mul uint %indvar60, %raster.ui ; [#uses=1] + %tmp.65 = mul uint %indvar60, %raster ; [#uses=1] + %tmp.65 = cast uint %tmp.65 to int ; [#uses=1] %tmp104.sum97 = add int %tmp102, %tmp.65 ; [#uses=1] %line.1.0 = getelementptr ubyte* %base, int %tmp104.sum97 ; [#uses=3] %tmp = load ubyte* %line.1.0 ; [#uses=1] @@ -381,6 +386,7 @@ cond_true398: ; preds = %cond_true398, %cond_true398.preheader %optr309.3.0 = phi ubyte* [ %optr309.3, %cond_true398 ], [ %optr309.353, %cond_true398.preheader ] ; [#uses=2] %optr309.3.in.0 = add uint %indvar66, %optr309.3.in51 ; [#uses=1] %tmp.70 = add int %tmp109, %w ; [#uses=1] + %indvar66 = cast uint %indvar66 to int ; [#uses=1] %tmp.72 = mul int %indvar66, -8 ; [#uses=1] %tmp.71 = add int %tmp.70, -8 ; [#uses=1] %count308.3.0 = add int %tmp.72, %tmp.71 ; [#uses=1] @@ -434,6 +440,7 @@ cond_true414: ; preds = %cond_true404 %tmp416 = load ubyte* %tmp410 ; [#uses=1] %tmp416 = cast ubyte %tmp416 to uint ; [#uses=1] %tmp418 = shr uint %tmp416, ubyte %tmp319 ; [#uses=1] + %tmp418 = cast uint %tmp418 to int ; [#uses=1] %tmp420 = add int %tmp418, %tmp408 ; [#uses=1] br label %cond_next422 @@ -472,6 +479,7 @@ cond_true457.preheader: ; preds = %cond_false299 %tmp354 = and uint %iftmp.37.0, %mask.1.1 ; [#uses=1] %tmp361 = sub int %w, %tmp110 ; [#uses=2] %tmp39755 = setgt int %tmp361, 7 ; [#uses=1] + %iftmp.35.0 = cast uint %iftmp.35.0 to int ; [#uses=1] %tmp426 = cast uint %rmask.0.1 to ubyte ; [#uses=1] %tmp426not = xor ubyte %tmp426, 255 ; [#uses=1] %tmp428 = or ubyte %tmp347, %tmp426not ; [#uses=1] @@ -484,8 +492,10 @@ cond_true457: ; preds = %cond_true457.preheader, %cond_next442 %dest.3.0 = phi ubyte* [ %tmp448, %cond_next442 ], [ %tmp100, %cond_true457.preheader ] ; [#uses=3] %dest_line.3.0 = phi ubyte** [ %tmp444, %cond_next442 ], [ %tmp96, %cond_true457.preheader ] ; [#uses=1] %tmp.77 = sub uint 0, %indvar74 ; [#uses=1] + %tmp.77 = cast uint %tmp.77 to int ; [#uses=1] %tmp454.0 = add int %tmp.77, %tmp45438 ; [#uses=1] - %tmp.79 = mul uint %indvar74, %raster.ui ; [#uses=1] + %tmp.79 = mul uint %indvar74, %raster ; [#uses=1] + %tmp.79 = cast uint %tmp.79 to int ; [#uses=1] %tmp104.sum = add int %tmp102, %tmp.79 ; [#uses=1] %line.3.0 = getelementptr ubyte* %base, int %tmp104.sum ; [#uses=3] %tmp318 = load ubyte* %line.3.0 ; [#uses=2]