summaryrefslogtreecommitdiffstats
path: root/test/Transforms/InstCombine
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/InstCombine')
-rw-r--r--test/Transforms/InstCombine/2006-05-06-Infloop.ll18
-rw-r--r--test/Transforms/InstCombine/2006-06-28-infloop.ll4
-rw-r--r--test/Transforms/InstCombine/2006-09-15-CastToBool.ll8
-rw-r--r--test/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst-2.ll2
-rw-r--r--test/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst.ll2
-rw-r--r--test/Transforms/InstCombine/deadcode.ll2
-rw-r--r--test/Transforms/InstCombine/fpcast.ll6
-rw-r--r--test/Transforms/InstCombine/shift-sra.ll2
-rw-r--r--test/Transforms/InstCombine/sub.ll2
-rw-r--r--test/Transforms/InstCombine/zeroext-and-reduce.ll2
10 files changed, 19 insertions, 29 deletions
diff --git a/test/Transforms/InstCombine/2006-05-06-Infloop.ll b/test/Transforms/InstCombine/2006-05-06-Infloop.ll
index ef05e6b..3b708cd 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 = cast int %raster to uint ; <uint> [#uses=3]
+ %raster.ui = cast int %raster to uint ; <uint> [#uses=3]
%tmp = seteq uint %one, %zero ; <bool> [#uses=1]
br bool %tmp, label %cond_true, label %cond_next
@@ -146,7 +146,6 @@ cond_true249: ; preds = %cond_true249, %cond_true249.preheader
%optr.3.2 = phi ubyte* [ %tmp232, %cond_true249 ], [ %dest.1.0, %cond_true249.preheader ] ; <ubyte*> [#uses=1]
%bptr.3.2 = phi ubyte* [ %tmp226, %cond_true249 ], [ %line.1.0, %cond_true249.preheader ] ; <ubyte*> [#uses=1]
%tmp. = add int %tmp109, %w ; <int> [#uses=1]
- %indvar = cast uint %indvar to int ; <int> [#uses=1]
%tmp.58 = mul int %indvar, -8 ; <int> [#uses=1]
%tmp.57 = add int %tmp., -16 ; <int> [#uses=1]
%tmp246.2 = add int %tmp.58, %tmp.57 ; <int> [#uses=1]
@@ -236,10 +235,8 @@ 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 ] ; <ubyte*> [#uses=3]
%dest_line.1.0.us = phi ubyte** [ %tmp282.us, %cond_next280.us ], [ %tmp96, %cond_true295.preheader.split.us ] ; <ubyte**> [#uses=1]
%tmp.89 = sub uint 0, %indvar86 ; <uint> [#uses=1]
- %tmp.89 = cast uint %tmp.89 to int ; <int> [#uses=1]
%tmp292.0.us = add int %tmp.89, %tmp29222 ; <int> [#uses=1]
- %tmp.91 = mul uint %indvar86, %raster ; <uint> [#uses=1]
- %tmp.91 = cast uint %tmp.91 to int ; <int> [#uses=1]
+ %tmp.91 = mul uint %indvar86, %raster.ui ; <uint> [#uses=1]
%tmp104.sum101 = add int %tmp102, %tmp.91 ; <int> [#uses=1]
%line.1.0.us = getelementptr ubyte* %base, int %tmp104.sum101 ; <ubyte*> [#uses=2]
%tmp.us = load ubyte* %line.1.0.us ; <ubyte> [#uses=1]
@@ -313,10 +310,8 @@ cond_true295: ; preds = %cond_true295.preheader.split, %cond_next280
%dest.1.0 = phi ubyte* [ %tmp286, %cond_next280 ], [ %tmp100, %cond_true295.preheader.split ] ; <ubyte*> [#uses=4]
%dest_line.1.0 = phi ubyte** [ %tmp282, %cond_next280 ], [ %tmp96, %cond_true295.preheader.split ] ; <ubyte**> [#uses=1]
%tmp.63 = sub uint 0, %indvar60 ; <uint> [#uses=1]
- %tmp.63 = cast uint %tmp.63 to int ; <int> [#uses=1]
%tmp292.0 = add int %tmp.63, %tmp29222 ; <int> [#uses=1]
- %tmp.65 = mul uint %indvar60, %raster ; <uint> [#uses=1]
- %tmp.65 = cast uint %tmp.65 to int ; <int> [#uses=1]
+ %tmp.65 = mul uint %indvar60, %raster.ui ; <uint> [#uses=1]
%tmp104.sum97 = add int %tmp102, %tmp.65 ; <int> [#uses=1]
%line.1.0 = getelementptr ubyte* %base, int %tmp104.sum97 ; <ubyte*> [#uses=3]
%tmp = load ubyte* %line.1.0 ; <ubyte> [#uses=1]
@@ -386,7 +381,6 @@ cond_true398: ; preds = %cond_true398, %cond_true398.preheader
%optr309.3.0 = phi ubyte* [ %optr309.3, %cond_true398 ], [ %optr309.353, %cond_true398.preheader ] ; <ubyte*> [#uses=2]
%optr309.3.in.0 = add uint %indvar66, %optr309.3.in51 ; <uint> [#uses=1]
%tmp.70 = add int %tmp109, %w ; <int> [#uses=1]
- %indvar66 = cast uint %indvar66 to int ; <int> [#uses=1]
%tmp.72 = mul int %indvar66, -8 ; <int> [#uses=1]
%tmp.71 = add int %tmp.70, -8 ; <int> [#uses=1]
%count308.3.0 = add int %tmp.72, %tmp.71 ; <int> [#uses=1]
@@ -440,7 +434,6 @@ cond_true414: ; preds = %cond_true404
%tmp416 = load ubyte* %tmp410 ; <ubyte> [#uses=1]
%tmp416 = cast ubyte %tmp416 to uint ; <uint> [#uses=1]
%tmp418 = shr uint %tmp416, ubyte %tmp319 ; <uint> [#uses=1]
- %tmp418 = cast uint %tmp418 to int ; <int> [#uses=1]
%tmp420 = add int %tmp418, %tmp408 ; <int> [#uses=1]
br label %cond_next422
@@ -479,7 +472,6 @@ cond_true457.preheader: ; preds = %cond_false299
%tmp354 = and uint %iftmp.37.0, %mask.1.1 ; <uint> [#uses=1]
%tmp361 = sub int %w, %tmp110 ; <int> [#uses=2]
%tmp39755 = setgt int %tmp361, 7 ; <bool> [#uses=1]
- %iftmp.35.0 = cast uint %iftmp.35.0 to int ; <int> [#uses=1]
%tmp426 = cast uint %rmask.0.1 to ubyte ; <ubyte> [#uses=1]
%tmp426not = xor ubyte %tmp426, 255 ; <ubyte> [#uses=1]
%tmp428 = or ubyte %tmp347, %tmp426not ; <ubyte> [#uses=1]
@@ -492,10 +484,8 @@ cond_true457: ; preds = %cond_true457.preheader, %cond_next442
%dest.3.0 = phi ubyte* [ %tmp448, %cond_next442 ], [ %tmp100, %cond_true457.preheader ] ; <ubyte*> [#uses=3]
%dest_line.3.0 = phi ubyte** [ %tmp444, %cond_next442 ], [ %tmp96, %cond_true457.preheader ] ; <ubyte**> [#uses=1]
%tmp.77 = sub uint 0, %indvar74 ; <uint> [#uses=1]
- %tmp.77 = cast uint %tmp.77 to int ; <int> [#uses=1]
%tmp454.0 = add int %tmp.77, %tmp45438 ; <int> [#uses=1]
- %tmp.79 = mul uint %indvar74, %raster ; <uint> [#uses=1]
- %tmp.79 = cast uint %tmp.79 to int ; <int> [#uses=1]
+ %tmp.79 = mul uint %indvar74, %raster.ui ; <uint> [#uses=1]
%tmp104.sum = add int %tmp102, %tmp.79 ; <int> [#uses=1]
%line.3.0 = getelementptr ubyte* %base, int %tmp104.sum ; <ubyte*> [#uses=3]
%tmp318 = load ubyte* %line.3.0 ; <ubyte> [#uses=2]
diff --git a/test/Transforms/InstCombine/2006-06-28-infloop.ll b/test/Transforms/InstCombine/2006-06-28-infloop.ll
index beb4489..bd1dbd0 100644
--- a/test/Transforms/InstCombine/2006-06-28-infloop.ll
+++ b/test/Transforms/InstCombine/2006-06-28-infloop.ll
@@ -9,8 +9,8 @@ void %test() {
entry:
%tmp = getelementptr { long, long, long, long }* null, int 0, uint 3
%tmp = load long* %tmp ; <long> [#uses=1]
- %tmp8 = load ulong* null ; <ulong> [#uses=1]
- %tmp8 = cast ulong %tmp8 to long ; <long> [#uses=1]
+ %tmp8.ui = load ulong* null ; <ulong> [#uses=1]
+ %tmp8 = cast ulong %tmp8.ui to long ; <long> [#uses=1]
%tmp9 = and long %tmp8, %tmp ; <long> [#uses=1]
%sext = cast long %tmp9 to int ; <int> [#uses=1]
%tmp27.i = cast int %sext to long ; <long> [#uses=1]
diff --git a/test/Transforms/InstCombine/2006-09-15-CastToBool.ll b/test/Transforms/InstCombine/2006-09-15-CastToBool.ll
index c38b325..051d91f 100644
--- a/test/Transforms/InstCombine/2006-09-15-CastToBool.ll
+++ b/test/Transforms/InstCombine/2006-09-15-CastToBool.ll
@@ -2,10 +2,10 @@
; PR913
int %test(int* %tmp1) {
- %tmp = load int* %tmp1 ; <int> [#uses=1]
- %tmp = cast int %tmp to uint ; <uint> [#uses=1]
- %tmp2 = shr uint %tmp, ubyte 5 ; <uint> [#uses=1]
- %tmp2 = cast uint %tmp2 to int ; <int> [#uses=1]
+ %tmp.i = load int* %tmp1 ; <int> [#uses=1]
+ %tmp = cast int %tmp.i to uint ; <uint> [#uses=1]
+ %tmp2.ui = shr uint %tmp, ubyte 5 ; <uint> [#uses=1]
+ %tmp2 = cast uint %tmp2.ui to int ; <int> [#uses=1]
%tmp3 = and int %tmp2, 1 ; <int> [#uses=1]
%tmp3 = cast int %tmp3 to bool ; <bool> [#uses=1]
%tmp34 = cast bool %tmp3 to int ; <int> [#uses=1]
diff --git a/test/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst-2.ll b/test/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst-2.ll
index d3bfdfa..89ec03d 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-upgrade %s -o - | llvm-as | opt -instcombine | llvm-dis | not grep 'sext.*int'
+; RUN: llvm-upgrade %s -o - | llvm-as | opt -instcombine | llvm-dis | not grep 'sext.*i32'
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 cab0b94..edd9054 100644
--- a/test/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst.ll
+++ b/test/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst.ll
@@ -1,6 +1,6 @@
; This test case is reduced from llvmAsmParser.cpp
; The optimizer should not remove the cast here.
-; RUN: llvm-upgrade %s -o - | llvm-as | opt -instcombine | llvm-dis | grep 'sext.*int'
+; RUN: llvm-upgrade %s -o - | llvm-as | opt -instcombine | llvm-dis | grep 'sext.*i32'
bool %test(short %X) {
%A = cast short %X to uint
diff --git a/test/Transforms/InstCombine/deadcode.ll b/test/Transforms/InstCombine/deadcode.ll
index fbd3c0c..836d614 100644
--- a/test/Transforms/InstCombine/deadcode.ll
+++ b/test/Transforms/InstCombine/deadcode.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 'ret int %A'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 'ret i32 %A'
int %test(int %A) {
%X = or bool false, false
diff --git a/test/Transforms/InstCombine/fpcast.ll b/test/Transforms/InstCombine/fpcast.ll
index dedcd13..1da8e42 100644
--- a/test/Transforms/InstCombine/fpcast.ll
+++ b/test/Transforms/InstCombine/fpcast.ll
@@ -1,14 +1,14 @@
; Test some floating point casting cases
; RUN: llvm-upgrade %s -o - | llvm-as | opt -instcombine | llvm-dis | notcast
; RUN: llvm-upgrade %s -o - | llvm-as | opt -instcombine | llvm-dis | \
-; RUN: grep 'ret [us]byte \(-1\)\|\(255\)'
+; RUN: grep 'ret i8 \(-1\)\|\(255\)'
-sbyte %test() {
+sbyte %test1() {
%x = fptoui float 255.0 to sbyte
ret sbyte %x
}
-ubyte %test() {
+ubyte %test2() {
%x = fptosi float -1.0 to ubyte
ret ubyte %x
}
diff --git a/test/Transforms/InstCombine/shift-sra.ll b/test/Transforms/InstCombine/shift-sra.ll
index 43a4ebd..a887d61 100644
--- a/test/Transforms/InstCombine/shift-sra.ll
+++ b/test/Transforms/InstCombine/shift-sra.ll
@@ -1,5 +1,5 @@
; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output &&
-; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 'lshr int' | wc -l | grep 2 &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 'lshr i32' | wc -l | grep 2 &&
; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep ashr
int %test1(int %X, ubyte %A) {
diff --git a/test/Transforms/InstCombine/sub.ll b/test/Transforms/InstCombine/sub.ll
index 8ca2e78..ebc1a6d 100644
--- a/test/Transforms/InstCombine/sub.ll
+++ b/test/Transforms/InstCombine/sub.ll
@@ -1,7 +1,7 @@
; This test makes sure that these instructions are properly eliminated.
;
-; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep -v 'sub int %Cok, %Bok' | not grep sub
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep -v 'sub i32 %Cok, %Bok' | not grep sub
implementation
diff --git a/test/Transforms/InstCombine/zeroext-and-reduce.ll b/test/Transforms/InstCombine/zeroext-and-reduce.ll
index e32f4b9..2d30f91 100644
--- a/test/Transforms/InstCombine/zeroext-and-reduce.ll
+++ b/test/Transforms/InstCombine/zeroext-and-reduce.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 'and int %Y, 8'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 'and i32 %Y, 8'
int %test1(ubyte %X) {
%Y = cast ubyte %X to int