[llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/2006-05-02-InstrSched1.ll 2006-08-07-CycleInDAG.ll loop-hoist.ll loop-strength-reduce.ll trunc-to-bool.ll vec_ins_extract.ll
Reid Spencer
reid at x10sys.com
Sat Dec 30 22:03:27 PST 2006
Changes in directory llvm/test/Regression/CodeGen/X86:
2006-05-02-InstrSched1.ll updated: 1.2 -> 1.3
2006-08-07-CycleInDAG.ll updated: 1.2 -> 1.3
loop-hoist.ll updated: 1.3 -> 1.4
loop-strength-reduce.ll updated: 1.3 -> 1.4
trunc-to-bool.ll updated: 1.4 -> 1.5
vec_ins_extract.ll updated: 1.3 -> 1.4
---
Log message:
For PR950: http://llvm.org/PR950 :
Update the test suite to accommodate the change from signed integer types
to signless integer types. The changes were of only a few kinds:
1. Make sure llvm-upgrade is run on the source which does the bulk of the
changes automatically.
2. Change things like "grep 'int'" to "grep 'i32'"
3. In several tests bitcasting caused the same name to be reused in the
same type plane. These had to be manually fixed. The fix was (generally)
to leave the bitcast and provide the instruction with a new name. This
should not affect the semantics of the test. In a few cases, the
bitcasts were known to be superfluous and irrelevant to the test case
so they were removed.
4. One test case uses a bytecode file which needed to be updated to the
latest bytecode format.
---
Diffs of the changes: (+38 -37)
2006-05-02-InstrSched1.ll | 6 +----
2006-08-07-CycleInDAG.ll | 4 +--
loop-hoist.ll | 4 +--
loop-strength-reduce.ll | 6 ++---
trunc-to-bool.ll | 51 ++++++++++++++++++++++++----------------------
vec_ins_extract.ll | 4 +--
6 files changed, 38 insertions(+), 37 deletions(-)
Index: llvm/test/Regression/CodeGen/X86/2006-05-02-InstrSched1.ll
diff -u llvm/test/Regression/CodeGen/X86/2006-05-02-InstrSched1.ll:1.2 llvm/test/Regression/CodeGen/X86/2006-05-02-InstrSched1.ll:1.3
--- llvm/test/Regression/CodeGen/X86/2006-05-02-InstrSched1.ll:1.2 Fri Dec 1 22:23:08 2006
+++ llvm/test/Regression/CodeGen/X86/2006-05-02-InstrSched1.ll Sun Dec 31 00:01:59 2006
@@ -11,10 +11,8 @@
%tmp4 = getelementptr ubyte* %tmp, uint %tmp3 ; <ubyte*> [#uses=1]
%tmp7 = load uint* %tmp ; <uint> [#uses=1]
%tmp8 = getelementptr ubyte* %tmp, uint %tmp7 ; <ubyte*> [#uses=1]
- %tmp8 = cast ubyte* %tmp8 to sbyte* ; <sbyte*> [#uses=1]
- %tmp4 = cast ubyte* %tmp4 to sbyte* ; <sbyte*> [#uses=1]
- %tmp = tail call int %memcmp( sbyte* %tmp8, sbyte* %tmp4, uint %tmp ) ; <int> [#uses=1]
- ret int %tmp
+ %result = tail call int %memcmp( sbyte* %tmp8, sbyte* %tmp4, uint %tmp ) ; <int> [#uses=1]
+ ret int %result
}
declare int %memcmp(sbyte*, sbyte*, uint)
Index: llvm/test/Regression/CodeGen/X86/2006-08-07-CycleInDAG.ll
diff -u llvm/test/Regression/CodeGen/X86/2006-08-07-CycleInDAG.ll:1.2 llvm/test/Regression/CodeGen/X86/2006-08-07-CycleInDAG.ll:1.3
--- llvm/test/Regression/CodeGen/X86/2006-08-07-CycleInDAG.ll:1.2 Fri Dec 1 22:23:08 2006
+++ llvm/test/Regression/CodeGen/X86/2006-08-07-CycleInDAG.ll Sun Dec 31 00:01:59 2006
@@ -10,8 +10,8 @@
%tmp24.i = load int* null ; <int> [#uses=1]
%tmp13.i12.i = tail call double %ldexp( double 0.000000e+00, int 0 ) ; <double> [#uses=1]
%tmp13.i13.i = cast double %tmp13.i12.i to float ; <float> [#uses=1]
- %tmp11.i = load int* null ; <int> [#uses=1]
- %tmp11.i = cast int %tmp11.i to uint ; <uint> [#uses=1]
+ %tmp11.s = load int* null ; <int> [#uses=1]
+ %tmp11.i = cast int %tmp11.s to uint ; <uint> [#uses=1]
%n.i = cast int %tmp24.i to uint ; <uint> [#uses=1]
%tmp13.i7 = mul uint %tmp11.i, %n.i ; <uint> [#uses=1]
%tmp.i8 = tail call sbyte* %calloc( uint %tmp13.i7, uint 4 ) ; <sbyte*> [#uses=0]
Index: llvm/test/Regression/CodeGen/X86/loop-hoist.ll
diff -u llvm/test/Regression/CodeGen/X86/loop-hoist.ll:1.3 llvm/test/Regression/CodeGen/X86/loop-hoist.ll:1.4
--- llvm/test/Regression/CodeGen/X86/loop-hoist.ll:1.3 Sat Dec 2 14:39:25 2006
+++ llvm/test/Regression/CodeGen/X86/loop-hoist.ll Sun Dec 31 00:01:59 2006
@@ -5,9 +5,9 @@
implementation ; Functions:
-void %foo(int %N) {
+void %foo(int %N.in) {
entry:
- %N = cast int %N to uint ; <uint> [#uses=1]
+ %N = cast int %N.in to uint ; <uint> [#uses=1]
br label %cond_true
cond_true: ; preds = %cond_true, %entry
Index: llvm/test/Regression/CodeGen/X86/loop-strength-reduce.ll
diff -u llvm/test/Regression/CodeGen/X86/loop-strength-reduce.ll:1.3 llvm/test/Regression/CodeGen/X86/loop-strength-reduce.ll:1.4
--- llvm/test/Regression/CodeGen/X86/loop-strength-reduce.ll:1.3 Fri Dec 1 22:23:08 2006
+++ llvm/test/Regression/CodeGen/X86/loop-strength-reduce.ll Sun Dec 31 00:01:59 2006
@@ -4,10 +4,10 @@
%A = internal global [16 x [16 x int]] zeroinitializer, align 32
-void %test(int %row, int %N) {
+void %test(int %row, int %N.in) {
entry:
- %N = cast int %N to uint
- %tmp5 = setgt int %N, 0
+ %N = cast int %N.in to uint
+ %tmp5 = setgt int %N.in, 0
br bool %tmp5, label %cond_true, label %return
cond_true:
Index: llvm/test/Regression/CodeGen/X86/trunc-to-bool.ll
diff -u llvm/test/Regression/CodeGen/X86/trunc-to-bool.ll:1.4 llvm/test/Regression/CodeGen/X86/trunc-to-bool.ll:1.5
--- llvm/test/Regression/CodeGen/X86/trunc-to-bool.ll:1.4 Fri Dec 1 22:23:08 2006
+++ llvm/test/Regression/CodeGen/X86/trunc-to-bool.ll Sun Dec 31 00:01:59 2006
@@ -1,19 +1,21 @@
; 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-upgrade < %s | llvm-as | llc -march=x86 &&
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep '\(and\)\|\(test.*\$1\)' | wc -l | grep 6
-bool %test1(int %X) {
- %Y = trunc int %X to bool
+; 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 @zext %test1(i32 %X) {
+ %Y = trunc i32 %X to bool
ret bool %Y
}
-bool %test2(int %val, int %mask) {
+define bool %test2(i32 %val, i32 %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
+ %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
ret_true:
ret bool true
@@ -21,39 +23,40 @@
ret bool false
}
-int %test3(sbyte* %ptr) {
- %val = load sbyte* %ptr
- %tmp = trunc sbyte %val to bool ; %<bool> [#uses=1]
+define i32 %test3(i8* %ptr) {
+ %val = load i8* %ptr
+ %tmp = trunc i8 %val to bool
br bool %tmp, label %cond_true, label %cond_false
cond_true:
- ret int 21
+ ret i32 21
cond_false:
- ret int 42
+ ret i32 42
}
-int %test4(sbyte* %ptr) {
- %tmp = ptrtoint sbyte* %ptr to bool
+define i32 %test4(i8* %ptr) {
+ %tmp = ptrtoint i8* %ptr to bool
br bool %tmp, label %cond_true, label %cond_false
cond_true:
- ret int 21
+ ret i32 21
cond_false:
- ret int 42
+ ret i32 42
}
-int %test5(float %f) {
+define i32 %test5(float %f) {
%tmp = fptoui float %f to bool
br bool %tmp, label %cond_true, label %cond_false
cond_true:
- ret int 21
+ ret i32 21
cond_false:
- ret int 42
+ ret i32 42
}
-int %test6(double %d) {
+define i32 %test6(double %d) {
%tmp = fptosi double %d to bool
br bool %tmp, label %cond_true, label %cond_false
cond_true:
- ret int 21
+ ret i32 21
cond_false:
- ret int 42
+ ret i32 42
}
+
Index: llvm/test/Regression/CodeGen/X86/vec_ins_extract.ll
diff -u llvm/test/Regression/CodeGen/X86/vec_ins_extract.ll:1.3 llvm/test/Regression/CodeGen/X86/vec_ins_extract.ll:1.4
--- llvm/test/Regression/CodeGen/X86/vec_ins_extract.ll:1.3 Fri Dec 29 14:01:32 2006
+++ llvm/test/Regression/CodeGen/X86/vec_ins_extract.ll Sun Dec 31 00:01:59 2006
@@ -1,7 +1,7 @@
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl -instcombine | \
-; RUN: llc -march=x86 -mcpu=yonah &&
+; RUN: llc -march=x86 -mcpu=yonah &&
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl -instcombine | \
-; RUN: llc -march=x86 -mcpu=yonah | not grep sub.*esp
+; RUN: llc -march=x86 -mcpu=yonah | not grep sub.*esp
; This checks that various insert/extract idiom work without going to the
; stack.
More information about the llvm-commits
mailing list