diff options
| author | Reid Spencer <rspencer@reidspencer.com> | 2006-12-31 06:02:00 +0000 |
|---|---|---|
| committer | Reid Spencer <rspencer@reidspencer.com> | 2006-12-31 06:02:00 +0000 |
| commit | eacb7020ec7b0a6a0078f1be7bfd77bf6fe1ff06 (patch) | |
| tree | ac1b0bfa8c340bb02ac25f991a1ee28b216de458 /test/CodeGen | |
| parent | 47857812e29324a9d1560796a05b53d3a9217fd9 (diff) | |
For 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32789 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
| -rw-r--r-- | test/CodeGen/ARM/vargs2.ll | 6 | ||||
| -rw-r--r-- | test/CodeGen/Alpha/zapnot.ll | 9 | ||||
| -rw-r--r-- | test/CodeGen/Generic/2005-10-21-longlonggtu.ll | 4 | ||||
| -rw-r--r-- | test/CodeGen/Generic/2006-06-28-SimplifySetCCCrash.ll | 10 | ||||
| -rw-r--r-- | test/CodeGen/Generic/SwitchLowering.ll | 1 | ||||
| -rw-r--r-- | test/CodeGen/PowerPC/2006-01-20-ShiftPartsCrash.ll | 14 | ||||
| -rw-r--r-- | test/CodeGen/PowerPC/and-elim.ll | 3 | ||||
| -rw-r--r-- | test/CodeGen/PowerPC/branch-opt.ll | 17 | ||||
| -rw-r--r-- | test/CodeGen/PowerPC/rotl.ll | 20 | ||||
| -rw-r--r-- | test/CodeGen/PowerPC/small-arguments.ll | 10 | ||||
| -rw-r--r-- | test/CodeGen/PowerPC/vec_spat.ll | 8 | ||||
| -rw-r--r-- | test/CodeGen/X86/2006-05-02-InstrSched1.ll | 6 | ||||
| -rw-r--r-- | test/CodeGen/X86/2006-08-07-CycleInDAG.ll | 4 | ||||
| -rw-r--r-- | test/CodeGen/X86/loop-hoist.ll | 4 | ||||
| -rw-r--r-- | test/CodeGen/X86/loop-strength-reduce.ll | 6 | ||||
| -rw-r--r-- | test/CodeGen/X86/trunc-to-bool.ll | 51 | ||||
| -rw-r--r-- | test/CodeGen/X86/vec_ins_extract.ll | 4 |
17 files changed, 85 insertions, 92 deletions
diff --git a/test/CodeGen/ARM/vargs2.ll b/test/CodeGen/ARM/vargs2.ll index 1404a412ee..9a6dbd27dc 100644 --- a/test/CodeGen/ARM/vargs2.ll +++ b/test/CodeGen/ARM/vargs2.ll @@ -3,14 +3,14 @@ implementation ; Functions: -void %f(int %a, ...) { +void %f(int %a_arg, ...) { entry: - %a = cast int %a to uint ; <uint> [#uses=1] + %a = cast int %a_arg to uint ; <uint> [#uses=1] %l1 = alloca sbyte*, align 4 ; <sbyte**> [#uses=5] %l2 = alloca sbyte*, align 4 ; <sbyte**> [#uses=4] %memtmp = alloca sbyte* ; <sbyte**> [#uses=2] call void %llvm.va_start( sbyte** %l1 ) - %tmp22 = seteq int %a, 0 ; <bool> [#uses=1] + %tmp22 = seteq int %a_arg, 0 ; <bool> [#uses=1] %tmp23 = volatile load sbyte** %l1 ; <sbyte*> [#uses=2] br bool %tmp22, label %bb8, label %bb diff --git a/test/CodeGen/Alpha/zapnot.ll b/test/CodeGen/Alpha/zapnot.ll index 057d16b1b9..aaeaa115d4 100644 --- a/test/CodeGen/Alpha/zapnot.ll +++ b/test/CodeGen/Alpha/zapnot.ll @@ -1,11 +1,10 @@ ; Make sure this testcase codegens to the bic instruction -; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 'zapnot' +; RUN: llvm-as < %s | llc -march=alpha | grep 'zapnot' implementation ; Functions: -ushort %foo(long %y) { +define i16 @zext %foo(i64 %y) { entry: - %tmp.1 = cast long %y to ushort ; <ushort> [#uses=1] - ret ushort %tmp.1 + %tmp.1 = trunc i64 %y to i16 ; <ushort> [#uses=1] + ret i16 %tmp.1 } - diff --git a/test/CodeGen/Generic/2005-10-21-longlonggtu.ll b/test/CodeGen/Generic/2005-10-21-longlonggtu.ll index 602321398a..d445e5920f 100644 --- a/test/CodeGen/Generic/2005-10-21-longlonggtu.ll +++ b/test/CodeGen/Generic/2005-10-21-longlonggtu.ll @@ -1,6 +1,6 @@ ; RUN: llvm-upgrade < %s | llvm-as | llc -float %t(long %u) { - %u = cast long %u to ulong ; <ulong> [#uses=1] +float %t(long %u_arg) { + %u = cast long %u_arg to ulong ; <ulong> [#uses=1] %tmp5 = add ulong %u, 9007199254740991 ; <ulong> [#uses=1] %tmp = setgt ulong %tmp5, 18014398509481982 ; <bool> [#uses=1] br bool %tmp, label %T, label %F diff --git a/test/CodeGen/Generic/2006-06-28-SimplifySetCCCrash.ll b/test/CodeGen/Generic/2006-06-28-SimplifySetCCCrash.ll index f5d0fb35c4..1fe13f8f9b 100644 --- a/test/CodeGen/Generic/2006-06-28-SimplifySetCCCrash.ll +++ b/test/CodeGen/Generic/2006-06-28-SimplifySetCCCrash.ll @@ -239,19 +239,19 @@ cond_next1834: ; preds = %bb1808 ret void bb1876: ; preds = %bb1808 - %tmp1877 = load int* %which_alternative ; <int> [#uses=4] - %tmp1877 = cast int %tmp1877 to uint ; <uint> [#uses=1] + %tmp1877signed = load int* %which_alternative ; <int> [#uses=4] + %tmp1877 = cast int %tmp1877signed to uint ; <uint> [#uses=1] %bothcond699 = setlt uint %tmp1877, 2 ; <bool> [#uses=1] - %tmp1888 = seteq int %tmp1877, 2 ; <bool> [#uses=1] + %tmp1888 = seteq int %tmp1877signed, 2 ; <bool> [#uses=1] %bothcond700 = or bool %bothcond699, %tmp1888 ; <bool> [#uses=1] %bothcond700.not = xor bool %bothcond700, true ; <bool> [#uses=1] - %tmp1894 = seteq int %tmp1877, 3 ; <bool> [#uses=1] + %tmp1894 = seteq int %tmp1877signed, 3 ; <bool> [#uses=1] %bothcond701 = or bool %tmp1894, %bothcond700.not ; <bool> [#uses=1] %bothcond702 = or bool %bothcond701, false ; <bool> [#uses=1] br bool %bothcond702, label %UnifiedReturnBlock, label %cond_next1902 cond_next1902: ; preds = %bb1876 - switch int %tmp1877, label %cond_next1937 [ + switch int %tmp1877signed, label %cond_next1937 [ int 0, label %bb1918 int 1, label %bb1918 int 2, label %bb1918 diff --git a/test/CodeGen/Generic/SwitchLowering.ll b/test/CodeGen/Generic/SwitchLowering.ll index 37bfffaa02..4eef03079f 100644 --- a/test/CodeGen/Generic/SwitchLowering.ll +++ b/test/CodeGen/Generic/SwitchLowering.ll @@ -19,7 +19,6 @@ bb: ; preds = %bb, %entry ] bb7: ; preds = %bb, %bb - %tmp = cast sbyte %tmp to ubyte ; <ubyte> [#uses=1] tail call void %foo( ubyte %tmp ) ret sbyte* %tmp2 } diff --git a/test/CodeGen/PowerPC/2006-01-20-ShiftPartsCrash.ll b/test/CodeGen/PowerPC/2006-01-20-ShiftPartsCrash.ll index 8edb96284e..7700459328 100644 --- a/test/CodeGen/PowerPC/2006-01-20-ShiftPartsCrash.ll +++ b/test/CodeGen/PowerPC/2006-01-20-ShiftPartsCrash.ll @@ -1,16 +1,16 @@ ; RUN: llvm-upgrade < %s | llvm-as | llc void %iterative_hash_host_wide_int() { - %zero = alloca int ; <int*> [#uses=2] - %b = alloca uint ; <uint*> [#uses=1] + %zero = alloca int ; <int*> [#uses=2] + %b = alloca uint ; <uint*> [#uses=1] store int 0, int* %zero - %tmp = load int* %zero ; <int> [#uses=1] + %tmp = load int* %zero ; <int> [#uses=1] %tmp5 = cast int %tmp to uint ; <uint> [#uses=1] - %tmp6 = add uint %tmp5, 32 ; <uint> [#uses=1] - %tmp6 = cast uint %tmp6 to int ; <int> [#uses=1] - %tmp7 = load long* null ; <long> [#uses=1] + %tmp6.u = add uint %tmp5, 32 ; <uint> [#uses=1] + %tmp6 = cast uint %tmp6.u to int ; <int> [#uses=1] + %tmp7 = load long* null ; <long> [#uses=1] %tmp6 = cast int %tmp6 to ubyte ; <ubyte> [#uses=1] - %tmp8 = shr long %tmp7, ubyte %tmp6 ; <long> [#uses=1] + %tmp8 = shr long %tmp7, ubyte %tmp6 ; <long> [#uses=1] %tmp8 = cast long %tmp8 to uint ; <uint> [#uses=1] store uint %tmp8, uint* %b unreachable diff --git a/test/CodeGen/PowerPC/and-elim.ll b/test/CodeGen/PowerPC/and-elim.ll index ae1f57d07d..c866d6e097 100644 --- a/test/CodeGen/PowerPC/and-elim.ll +++ b/test/CodeGen/PowerPC/and-elim.ll @@ -10,7 +10,8 @@ void %test(ubyte* %P) { ret void } -ushort %test2(ushort %crc) { ; No and's should be needed for the ushorts here. +ushort @zext %test2(ushort @zext %crc) { + ; No and's should be needed for the ushorts here. %tmp.1 = shr ushort %crc, ubyte 1 %tmp.7 = xor ushort %tmp.1, 40961 ret ushort %tmp.7 diff --git a/test/CodeGen/PowerPC/branch-opt.ll b/test/CodeGen/PowerPC/branch-opt.ll index 7f40a2d866..1f94169cb9 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 = cast int %X to uint ; <uint> [#uses=1] - %Y = cast int %Y to uint ; <uint> [#uses=1] - %Z = cast int %Z to uint ; <uint> [#uses=1] - %W = cast int %W to uint ; <uint> [#uses=1] + %X.u = cast int %X to uint ; <uint> [#uses=1] + %Y.u = cast int %Y to uint ; <uint> [#uses=1] + %Z.u = cast int %Z to uint ; <uint> [#uses=1] + %W.u = cast int %W to uint ; <uint> [#uses=1] %tmp1 = and int %W, 1 ; <int> [#uses=1] %tmp1 = seteq int %tmp1, 0 ; <bool> [#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 ] ; <uint> [#uses=1] %tmp2 = tail call int (...)* %bar( ) ; <int> [#uses=0] %indvar.next78 = add uint %indvar77, 1 ; <uint> [#uses=2] - %exitcond79 = seteq uint %indvar.next78, %X ; <bool> [#uses=1] + %exitcond79 = seteq uint %indvar.next78, %X.u ; <bool> [#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 ] ; <uint> [#uses=1] %tmp13 = tail call int (...)* %bar( ) ; <int> [#uses=0] %indvar.next73 = add uint %indvar72, 1 ; <uint> [#uses=2] - %exitcond74 = seteq uint %indvar.next73, %Y ; <bool> [#uses=1] + %exitcond74 = seteq uint %indvar.next73, %Y.u ; <bool> [#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 ] ; <uint> [#uses=1] %tmp26 = tail call int (...)* %bar( ) ; <int> [#uses=0] %indvar.next68 = add uint %indvar67, 1 ; <uint> [#uses=2] - %exitcond69 = seteq uint %indvar.next68, %Z ; <bool> [#uses=1] + %exitcond69 = seteq uint %indvar.next68, %Z.u ; <bool> [#uses=1] br bool %exitcond69, label %cond_next48, label %bb25 bb29: ; preds = %cond_false20 @@ -72,9 +72,8 @@ bb38: ; preds = %bb42 bb42: ; preds = %cond_false33, %bb38 %indvar = phi uint [ %indvar.next, %bb38 ], [ 0, %cond_false33 ] ; <uint> [#uses=3] - %indvar = cast uint %indvar to int ; <int> [#uses=1] %W_addr.0 = sub int %W, %indvar ; <int> [#uses=1] - %exitcond = seteq uint %indvar, %W ; <bool> [#uses=1] + %exitcond = seteq uint %indvar, %W.u ; <bool> [#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 fc3a6bc6ac..e2045feb92 100644 --- a/test/CodeGen/PowerPC/rotl.ll +++ b/test/CodeGen/PowerPC/rotl.ll @@ -7,12 +7,11 @@ implementation ; Functions: int %rotlw(uint %x, int %sh) { entry: %tmp.3 = cast int %sh to ubyte ; <ubyte> [#uses=1] - %x = cast uint %x to int ; <int> [#uses=1] + %x.s = cast uint %x to int ; <int> [#uses=1] %tmp.7 = sub int 32, %sh ; <int> [#uses=1] %tmp.9 = cast int %tmp.7 to ubyte ; <ubyte> [#uses=1] %tmp.10 = shr uint %x, ubyte %tmp.9 ; <uint> [#uses=1] - %tmp.4 = shl int %x, ubyte %tmp.3 ; <int> [#uses=1] - %tmp.10 = cast uint %tmp.10 to int ; <int> [#uses=1] + %tmp.4 = shl int %x.s, ubyte %tmp.3 ; <int> [#uses=1] %tmp.12 = or int %tmp.10, %tmp.4 ; <int> [#uses=1] ret int %tmp.12 } @@ -23,19 +22,17 @@ entry: %tmp.4 = shr uint %x, ubyte %tmp.3 ; <uint> [#uses=1] %tmp.7 = sub int 32, %sh ; <int> [#uses=1] %tmp.9 = cast int %tmp.7 to ubyte ; <ubyte> [#uses=1] - %x = cast uint %x to int ; <int> [#uses=1] - %tmp.4 = cast uint %tmp.4 to int ; <int> [#uses=1] - %tmp.10 = shl int %x, ubyte %tmp.9 ; <int> [#uses=1] + %x.s = cast uint %x to int ; <int> [#uses=1] + %tmp.10 = shl int %x.s, ubyte %tmp.9 ; <int> [#uses=1] %tmp.12 = or int %tmp.4, %tmp.10 ; <int> [#uses=1] ret int %tmp.12 } int %rotlwi(uint %x) { entry: - %x = cast uint %x to int ; <int> [#uses=1] + %x.s = cast uint %x to int ; <int> [#uses=1] %tmp.7 = shr uint %x, ubyte 27 ; <uint> [#uses=1] - %tmp.3 = shl int %x, ubyte 5 ; <int> [#uses=1] - %tmp.7 = cast uint %tmp.7 to int ; <int> [#uses=1] + %tmp.3 = shl int %x.s, ubyte 5 ; <int> [#uses=1] %tmp.9 = or int %tmp.3, %tmp.7 ; <int> [#uses=1] ret int %tmp.9 } @@ -43,9 +40,8 @@ entry: int %rotrwi(uint %x) { entry: %tmp.3 = shr uint %x, ubyte 5 ; <uint> [#uses=1] - %x = cast uint %x to int ; <int> [#uses=1] - %tmp.3 = cast uint %tmp.3 to int ; <int> [#uses=1] - %tmp.7 = shl int %x, ubyte 27 ; <int> [#uses=1] + %x.s = cast uint %x to int ; <int> [#uses=1] + %tmp.7 = shl int %x.s, ubyte 27 ; <int> [#uses=1] %tmp.9 = or int %tmp.3, %tmp.7 ; <int> [#uses=1] ret int %tmp.9 } diff --git a/test/CodeGen/PowerPC/small-arguments.ll b/test/CodeGen/PowerPC/small-arguments.ll index 40217f6556..aa0d5b6d1b 100644 --- a/test/CodeGen/PowerPC/small-arguments.ll +++ b/test/CodeGen/PowerPC/small-arguments.ll @@ -1,15 +1,14 @@ - ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 && ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'extsh\|rlwinm' -declare short %foo() +declare short @sext %foo() -int %test1(short %X) { +int %test1(short @sext %X) { %Y = cast short %X to int ;; dead ret int %Y } -int %test2(ushort %X) { +int %test2(ushort @zext %X) { %Y = cast ushort %X to int %Z = and int %Y, 65535 ;; dead ret int %Z @@ -48,8 +47,7 @@ uint %test6(uint* %P) { ret uint %tmp.2 } -ushort %test7(float %a) { +ushort @zext %test7(float %a) { %tmp.1 = cast float %a to ushort ret ushort %tmp.1 } - diff --git a/test/CodeGen/PowerPC/vec_spat.ll b/test/CodeGen/PowerPC/vec_spat.ll index fb25402b17..6691995357 100644 --- a/test/CodeGen/PowerPC/vec_spat.ll +++ b/test/CodeGen/PowerPC/vec_spat.ll @@ -62,10 +62,10 @@ void %splat_h(short %tmp, <16 x ubyte>* %dst) { void %spltish(<16 x ubyte>* %A, <16 x ubyte>* %B) { ; Gets converted to 16 x ubyte %tmp = load <16 x ubyte>* %B - %tmp = cast <16 x ubyte> %tmp to <16 x sbyte> - %tmp4 = sub <16 x sbyte> %tmp, cast (<8 x short> < short 15, short 15, short 15, short 15, short 15, short 15, short 15, short 15 > to <16 x sbyte>) - %tmp4 = cast <16 x sbyte> %tmp4 to <16 x ubyte> - store <16 x ubyte> %tmp4, <16 x ubyte>* %A + %tmp.s = cast <16 x ubyte> %tmp to <16 x sbyte> + %tmp4 = sub <16 x sbyte> %tmp.s, cast (<8 x short> < short 15, short 15, short 15, short 15, short 15, short 15, short 15, short 15 > to <16 x sbyte>) + %tmp4.u = cast <16 x sbyte> %tmp4 to <16 x ubyte> + store <16 x ubyte> %tmp4.u, <16 x ubyte>* %A ret void } diff --git a/test/CodeGen/X86/2006-05-02-InstrSched1.ll b/test/CodeGen/X86/2006-05-02-InstrSched1.ll index 631e416836..47118970c3 100644 --- a/test/CodeGen/X86/2006-05-02-InstrSched1.ll +++ b/test/CodeGen/X86/2006-05-02-InstrSched1.ll @@ -11,10 +11,8 @@ int %compare(sbyte* %a, sbyte* %b) { %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) diff --git a/test/CodeGen/X86/2006-08-07-CycleInDAG.ll b/test/CodeGen/X86/2006-08-07-CycleInDAG.ll index 1de402858e..6cc548e479 100644 --- a/test/CodeGen/X86/2006-08-07-CycleInDAG.ll +++ b/test/CodeGen/X86/2006-08-07-CycleInDAG.ll @@ -10,8 +10,8 @@ ilog2.exit: ; preds = %entry %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] diff --git a/test/CodeGen/X86/loop-hoist.ll b/test/CodeGen/X86/loop-hoist.ll index 3ee0cbc469..ccbf53fe49 100644 --- a/test/CodeGen/X86/loop-hoist.ll +++ b/test/CodeGen/X86/loop-hoist.ll @@ -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 diff --git a/test/CodeGen/X86/loop-strength-reduce.ll b/test/CodeGen/X86/loop-strength-reduce.ll index a54d907e59..b0f576622b 100644 --- a/test/CodeGen/X86/loop-strength-reduce.ll +++ b/test/CodeGen/X86/loop-strength-reduce.ll @@ -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: diff --git a/test/CodeGen/X86/trunc-to-bool.ll b/test/CodeGen/X86/trunc-to-bool.ll index 3e00975b24..f4fa9c6503 100644 --- a/test/CodeGen/X86/trunc-to-bool.ll +++ b/test/CodeGen/X86/trunc-to-bool.ll @@ -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_false: 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 } + diff --git a/test/CodeGen/X86/vec_ins_extract.ll b/test/CodeGen/X86/vec_ins_extract.ll index 9d9f17e746..b2435063a5 100644 --- a/test/CodeGen/X86/vec_ins_extract.ll +++ b/test/CodeGen/X86/vec_ins_extract.ll @@ -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. |
