mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 19:12:56 +02:00
For PR1319: Upgrade to new test harness.
llvm-svn: 36091
This commit is contained in:
parent
601aa5b489
commit
9d19c17dab
@ -1,3 +1,3 @@
|
|||||||
load_lib llvm-dg.exp
|
load_lib llvm.exp
|
||||||
|
|
||||||
llvm-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
|
RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep '.byte[[:space:]]*true'
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | \
|
||||||
|
; RUN: not grep {.byte\[\[:space:\]\]*true}
|
||||||
|
|
||||||
%X = global bool true
|
%X = global bool true
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep '(%esp'
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep {(%esp}
|
||||||
|
|
||||||
declare sbyte* %llvm.returnaddress(uint)
|
declare sbyte* %llvm.returnaddress(uint)
|
||||||
declare sbyte* %llvm.frameaddress(uint)
|
declare sbyte* %llvm.frameaddress(uint)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep 'j[lgbe]'
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep {j\[lgbe\]}
|
||||||
|
|
||||||
int %max(int %A, int %B) {
|
int %max(int %A, int %B) {
|
||||||
%gt = setgt int %A, %B
|
%gt = setgt int %A, %B
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
; overlapping live intervals. When two overlapping intervals have the same
|
; overlapping live intervals. When two overlapping intervals have the same
|
||||||
; value, they can be joined though.
|
; value, they can be joined though.
|
||||||
;
|
;
|
||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -regalloc=linearscan | not grep 'mov %[A-Z]\{2,3\}, %[A-Z]\{2,3\}'
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -regalloc=linearscan | \
|
||||||
|
; RUN: not grep {mov %\[A-Z\]\\\{2,3\\\}, %\[A-Z\]\\\{2,3\\\}}
|
||||||
|
|
||||||
long %test(long %x) {
|
long %test(long %x) {
|
||||||
entry:
|
entry:
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep 'shld' | wc -l | grep 1
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | \
|
||||||
|
; RUN: grep shld | wc -l | grep 1
|
||||||
;
|
;
|
||||||
; Check that the isel does not fold the shld, which already folds a load
|
; Check that the isel does not fold the shld, which already folds a load
|
||||||
; and has two uses, into a store.
|
; and has two uses, into a store.
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mtriple=i686-apple-darwin8 -relocation-model=static | grep 'movl _last' | wc -l | grep 1 &&
|
; RUN: llvm-upgrade < %s | llvm-as | \
|
||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mtriple=i686-apple-darwin8 -relocation-model=static | grep 'cmpl.*_last' | wc -l | grep 1
|
; RUN: llc -march=x86 -mtriple=i686-apple-darwin8 -relocation-model=static | \
|
||||||
|
; RUN: grep {movl _last} | wc -l | grep 1
|
||||||
|
; RUN: llvm-upgrade < %s | llvm-as | \
|
||||||
|
; RUN: llc -march=x86 -mtriple=i686-apple-darwin8 -relocation-model=static | \
|
||||||
|
; RUN: grep {cmpl.*_last} | wc -l | grep 1
|
||||||
|
|
||||||
%block = external global ubyte* ; <ubyte**> [#uses=1]
|
%block = external global ubyte* ; <ubyte**> [#uses=1]
|
||||||
%last = external global int ; <int*> [#uses=3]
|
%last = external global int ; <int*> [#uses=3]
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
; Coalescing from R32 to a subset R32_. Once another register coalescer bug is
|
; Coalescing from R32 to a subset R32_. Once another register coalescer bug is
|
||||||
; fixed, the movb should go away as well.
|
; fixed, the movb should go away as well.
|
||||||
|
|
||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -relocation-model=static | grep 'movl' | wc -l
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -relocation-model=static | \
|
||||||
|
; RUN: grep movl | wc -l
|
||||||
|
|
||||||
%B = external global uint
|
%B = external global uint
|
||||||
%C = external global ushort*
|
%C = external global ushort*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -stats 2>&1 |\
|
; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -stats |&\
|
||||||
; RUN: grep 'asm-printer' | grep 35
|
; RUN: grep {asm-printer} | grep 35
|
||||||
|
|
||||||
target datalayout = "e-p:32:32"
|
target datalayout = "e-p:32:32"
|
||||||
define void @foo(i32* %mc, i32* %bp, i32* %ms, i32* %xmb, i32* %mpp, i32* %tpmm, i32* %ip, i32* %tpim, i32* %dpp, i32* %tpdm, i32* %bpi, i32 %M) {
|
define void @foo(i32* %mc, i32* %bp, i32* %ms, i32* %xmb, i32* %mpp, i32* %tpmm, i32* %ip, i32* %tpim, i32* %dpp, i32* %tpdm, i32* %bpi, i32 %M) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 &&
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep setnp
|
||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep 'setnp'
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -enable-unsafe-fp-math | \
|
||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -enable-unsafe-fp-math | not grep 'setnp'
|
; RUN: not grep setnp
|
||||||
|
|
||||||
uint %test(float %f) {
|
uint %test(float %f) {
|
||||||
%tmp = seteq float %f, 0.000000e+00
|
%tmp = seteq float %f, 0.000000e+00
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=att | grep 'movl 4(%eax),%ebp' &&
|
|
||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=att | grep 'movl 0(%eax), %ebx'
|
|
||||||
|
|
||||||
; PR850
|
; PR850
|
||||||
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=att | \
|
||||||
|
; RUN: grep {movl 4(%eax),%ebp}
|
||||||
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=att | \
|
||||||
|
; RUN: grep {movl 0(%eax), %ebx}
|
||||||
|
|
||||||
int %foo(int %__s.i.i, int %tmp5.i.i, int %tmp6.i.i, int %tmp7.i.i, int %tmp8.i.i ) {
|
int %foo(int %__s.i.i, int %tmp5.i.i, int %tmp6.i.i, int %tmp7.i.i, int %tmp8.i.i ) {
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=i386 | not grep 'movl %eax, %edx'
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=i386 | \
|
||||||
|
; RUN: not grep {movl %eax, %edx}
|
||||||
|
|
||||||
int %foo(int %t, int %C) {
|
int %foo(int %t, int %C) {
|
||||||
entry:
|
entry:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep 'subl $4, %esp'
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep {subl \$4, %esp}
|
||||||
|
|
||||||
target triple = "i686-pc-linux-gnu"
|
target triple = "i686-pc-linux-gnu"
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86-64 &&
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86-64 | \
|
||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86-64 | not grep 'movb %sil, %ah' &&
|
; RUN: not grep {movb %sil, %ah}
|
||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86-64 | grep 'movzbw %al, %ax'
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86-64 | \
|
||||||
|
; RUN: grep {movzbw %al, %ax}
|
||||||
|
|
||||||
void %handle_vector_size_attribute() {
|
void %handle_vector_size_attribute() {
|
||||||
entry:
|
entry:
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 &&
|
; PR1022, PR1023
|
||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep 3721182122 | wc -l | grep 2 &&
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | \
|
||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep -E 'movl _?bytes2' | wc -l | grep 1
|
; RUN: grep 3721182122 | wc -l | grep 2
|
||||||
; PR1022, 1023
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | \
|
||||||
|
; RUN: grep -E {movl _?bytes2} | wc -l | grep 1
|
||||||
|
|
||||||
%fmt = constant [4 x sbyte] c"%x\0A\00"
|
%fmt = constant [4 x sbyte] c"%x\0A\00"
|
||||||
%bytes = constant [4 x sbyte] c"\AA\BB\CC\DD"
|
%bytes = constant [4 x sbyte] c"\AA\BB\CC\DD"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin | \
|
|
||||||
; RUN: %prcontext 'mulss LCPI1_3' 1 | grep mulss | wc -l | grep 1
|
|
||||||
; PR1075
|
; PR1075
|
||||||
|
; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin | \
|
||||||
|
; RUN: %prcontext {mulss LCPI1_3} 1 | grep mulss | wc -l | grep 1
|
||||||
|
|
||||||
define float @foo(float %x) {
|
define float @foo(float %x) {
|
||||||
%tmp1 = mul float %x, 3.000000e+00
|
%tmp1 = mul float %x, 3.000000e+00
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
; RUN: llvm-as < %s | llc -march=x86 | grep 'orl $1, %eax' &&
|
; RUN: llvm-as < %s | llc -march=x86 | grep {orl \$1, %eax}
|
||||||
; RUN: llvm-as < %s | llc -march=x86 | grep 'leal 3(,%eax,8)'
|
; RUN: llvm-as < %s | llc -march=x86 | grep {leal 3(,%eax,8)'
|
||||||
|
|
||||||
;; This example can't fold the or into an LEA.
|
;; This example can't fold the or into an LEA.
|
||||||
define i32 @test(float ** %tmp2, i32 %tmp12) {
|
define i32 @test(float ** %tmp2, i32 %tmp12) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
; RUN: llvm-as < %s | llc &&
|
; RUN: llvm-as < %s | llc -march=x86 -mtriple=i686-darwin | \
|
||||||
; RUN: llvm-as < %s | llc -march=x86 -mtriple=i686-darwin | grep 'addl $12, %esp'
|
; RUN: grep {addl \$12, %esp}
|
||||||
|
|
||||||
define void @foo(i8** %buf, i32 %size, i32 %col, i8* %p) {
|
define void @foo(i8** %buf, i32 %size, i32 %col, i8* %p) {
|
||||||
entry:
|
entry:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
; RUN: llvm-as < %s | llc -march=x86 | grep 'mov %gs:72, %eax'
|
; RUN: llvm-as < %s | llc -march=x86 | grep {mov %gs:72, %eax}
|
||||||
target datalayout = "e-p:32:32"
|
target datalayout = "e-p:32:32"
|
||||||
target triple = "i686-apple-darwin9"
|
target triple = "i686-apple-darwin9"
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
; RUN: llvm-as < %s | llc -mcpu=yonah -march=x86 | grep 'cmpltsd %xmm0, %xmm0'
|
; RUN: llvm-as < %s | llc -mcpu=yonah -march=x86 | \
|
||||||
|
; RUN: grep {cmpltsd %xmm0, %xmm0}
|
||||||
target datalayout = "e-p:32:32"
|
target datalayout = "e-p:32:32"
|
||||||
target triple = "i686-apple-darwin9"
|
target triple = "i686-apple-darwin9"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
; RUN: llvm-as < %s | llc -march=x86 | grep 'psrlw $8, %xmm0'
|
; RUN: llvm-as < %s | llc -march=x86 | grep {psrlw \$8, %xmm0}
|
||||||
target datalayout = "e-p:32:32"
|
target datalayout = "e-p:32:32"
|
||||||
target triple = "i686-apple-darwin9"
|
target triple = "i686-apple-darwin9"
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -relocation-model=static | grep 'test1 $_GV' &&
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -relocation-model=static | \
|
||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -relocation-model=static | grep 'test2 _GV'
|
; RUN: grep {test1 \$_GV}
|
||||||
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -relocation-model=static | \
|
||||||
|
; RUN: grep {test2 _GV}
|
||||||
; PR882
|
; PR882
|
||||||
|
|
||||||
target datalayout = "e-p:32:32"
|
target datalayout = "e-p:32:32"
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
; insertion of register-register copies.
|
; insertion of register-register copies.
|
||||||
|
|
||||||
; Make sure there are only 3 mov's for each testcase
|
; Make sure there are only 3 mov's for each testcase
|
||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep 'mov ' | wc -l | grep 6
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
|
||||||
|
; RUN: grep {mov } | wc -l | grep 6
|
||||||
|
|
||||||
|
|
||||||
target triple = "i686-pc-linux-gnu"
|
target triple = "i686-pc-linux-gnu"
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
load_lib llvm-dg.exp
|
load_lib llvm.exp
|
||||||
|
|
||||||
llvm-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
|
RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
; Make sure this testcase codegens to the fabs instruction, not a call to fabsf
|
; Make sure this testcase codegens to the fabs instruction, not a call to fabsf
|
||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=-sse2,-sse3 | grep 'fabs$' | wc -l | grep 1 &&
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=-sse2,-sse3 | \
|
||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=-sse2,-sse3 -enable-unsafe-fp-math | grep 'fabs$' | wc -l | grep 2
|
; RUN: grep fabs\$ | wc -l | grep 1
|
||||||
|
; RUN: llvm-upgrade < %s | llvm-as | \
|
||||||
|
; RUN: llc -march=x86 -mattr=-sse2,-sse3 -enable-unsafe-fp-math | \
|
||||||
|
; RUN: grep fabs\$ | wc -l | grep 2
|
||||||
|
|
||||||
target endian = little
|
target endian = little
|
||||||
target pointersize = 32
|
target pointersize = 32
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel -mcpu=yonah | grep 'ret 20'
|
; RUN: llvm-upgrade < %s | llvm-as | \
|
||||||
|
; RUN: llc -march=x86 -x86-asm-syntax=intel -mcpu=yonah | grep {ret 20}
|
||||||
|
|
||||||
; Check that a fastcc function pops its stack variables before returning.
|
; Check that a fastcc function pops its stack variables before returning.
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep 'add ESP, 8'
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
|
||||||
|
; RUN: grep {add ESP, 8}
|
||||||
|
|
||||||
target triple = "i686-pc-linux-gnu"
|
target triple = "i686-pc-linux-gnu"
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | grep 'mov EDX, 1'
|
; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | \
|
||||||
|
; RUN: grep {mov EDX, 1}
|
||||||
; check that fastcc is passing stuff in regs.
|
; check that fastcc is passing stuff in regs.
|
||||||
|
|
||||||
declare x86_fastcallcc i64 @callee(i64)
|
declare x86_fastcallcc i64 @callee(i64)
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mtriple=mingw32 | grep '@12'
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mtriple=mingw32 | \
|
||||||
|
; RUN: grep {@12}
|
||||||
|
|
||||||
; Check that a fastcall function gets correct mangling
|
; Check that a fastcall function gets correct mangling
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
;; Test that this FP immediate is stored in the constant pool as a float.
|
;; Test that this FP immediate is stored in the constant pool as a float.
|
||||||
|
|
||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=-sse2,-sse3 | grep '.long.1123418112'
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=-sse2,-sse3 | \
|
||||||
|
; RUN: grep {.long.1123418112}
|
||||||
|
|
||||||
double %D() { ret double 123.0 }
|
double %D() { ret double 123.0 }
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=i386 | grep fucomi.*st.[12]
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=i386 | \
|
||||||
|
; RUN: grep {fucomi.*st.\[12\]}
|
||||||
; PR1012
|
; PR1012
|
||||||
|
|
||||||
float %foo(float *%col.2.0) {
|
float %foo(float *%col.2.0) {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep ST | not grep 'fadd\|fsub\|fdiv\|fmul'
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
|
||||||
|
; RUN: grep ST | not grep {fadd\\|fsub\\|fdiv\\|fmul}
|
||||||
|
|
||||||
; Test that the load of the constant is folded into the operation.
|
; Test that the load of the constant is folded into the operation.
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep ST | not grep 'fadd\|fsub\|fdiv\|fmul'
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
|
||||||
|
; RUN: grep ST | not grep {fadd\\|fsub\\|fdiv\\|fmul}
|
||||||
|
|
||||||
; Test that the load of the memory location is folded into the operation.
|
; Test that the load of the memory location is folded into the operation.
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
; RUN: llvm-as < %s | llc -march=x86-64 | grep 'movq 8(%rdi), %rdx' &&
|
; RUN: llvm-as < %s | llc -march=x86-64 | grep {movq 8(%rdi), %rdx}
|
||||||
; RUN: llvm-as < %s | llc -march=x86-64 | grep 'movq (%rdi), %rax'
|
; RUN: llvm-as < %s | llc -march=x86-64 | grep {movq (%rdi), %rax}
|
||||||
|
|
||||||
define i128 @test(i128 *%P) {
|
define i128 @test(i128 *%P) {
|
||||||
%A = load i128* %P
|
%A = load i128* %P
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
; RUN: llvm-as < %s | llc -march=x86 | not grep lea &&
|
; RUN: llvm-as < %s | llc -march=x86 | not grep lea
|
||||||
; RUN: llvm-as < %s | llc -march=x86 -mtriple=i686-apple-darwin8 | grep 'movl $4, (%ecx,%eax,4)'
|
; RUN: llvm-as < %s | llc -march=x86 -mtriple=i686-apple-darwin8 | \
|
||||||
|
; RUN: grep {movl \$4, (%ecx,%eax,4)}
|
||||||
|
|
||||||
define i32 @test(i32* %X, i32 %B) {
|
define i32 @test(i32* %X, i32 %B) {
|
||||||
; This gep should be sunk out of this block into the load/store users.
|
; This gep should be sunk out of this block into the load/store users.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep call
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep call
|
||||||
declare bool %llvm.isunordered(double)
|
declare bool %llvm.isunordered.f64(double)
|
||||||
|
|
||||||
bool %test_isnan(double %X) {
|
bool %test_isnan(double %X) {
|
||||||
%R = call bool %llvm.isunordered(double %X, double %X)
|
%R = call bool %llvm.isunordered.f64(double %X, double %X)
|
||||||
ret bool %R
|
ret bool %R
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep 'lea EAX, DWORD PTR \[... + 4\*... - 5\]' &&
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
|
||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | not grep add
|
; RUN: grep {lea EAX, DWORD PTR \\\[... + 4\\*... - 5\\\]}
|
||||||
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
|
||||||
|
; RUN: not grep add
|
||||||
|
|
||||||
int %test1(int %A, int %B) {
|
int %test1(int %A, int %B) {
|
||||||
%tmp1 = shl int %A, ubyte 2 ; <int> [#uses=1]
|
%tmp1 = shl int %A, ubyte 2 ; <int> [#uses=1]
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
|
|
||||||
; RUN: llvm-as < %s | llc -march=x86-64 | grep 'leal (%rdi,%rdi,2), %eax' &&
|
; RUN: llvm-as < %s | llc -march=x86-64 | grep {leal (%rdi,%rdi,2), %eax}
|
||||||
define i32 @test(i32 %a) {
|
define i32 @test(i32 %a) {
|
||||||
%tmp2 = mul i32 %a, 3 ; <i32> [#uses=1]
|
%tmp2 = mul i32 %a, 3 ; <i32> [#uses=1]
|
||||||
ret i32 %tmp2
|
ret i32 %tmp2
|
||||||
}
|
}
|
||||||
|
|
||||||
; RUN: llvm-as < %s | llc -march=x86-64 | grep 'leaq (,%rdi,4), %rax'
|
; RUN: llvm-as < %s | llc -march=x86-64 | grep {leaq (,%rdi,4), %rax}
|
||||||
define i64 @test2(i64 %a) {
|
define i64 @test2(i64 %a) {
|
||||||
%tmp2 = shl i64 %a, 2
|
%tmp2 = shl i64 %a, 2
|
||||||
%tmp3 = or i64 %tmp2, %a
|
%tmp3 = or i64 %tmp2, %a
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | \
|
; RUN: llvm-upgrade < %s | llvm-as | \
|
||||||
; RUN: llc -relocation-model=dynamic-no-pic -mtriple=i686-apple-darwin8.7.2 |\
|
; RUN: llc -relocation-model=dynamic-no-pic -mtriple=i686-apple-darwin8.7.2 |\
|
||||||
; RUN: grep L_Arr.non_lazy_ptr &&
|
; RUN: grep L_Arr.non_lazy_ptr
|
||||||
; RUN: llvm-upgrade < %s | llvm-as | \
|
; RUN: llvm-upgrade < %s | llvm-as | \
|
||||||
; RUN: llc -relocation-model=dynamic-no-pic -mtriple=i686-apple-darwin8.7.2 |\
|
; RUN: llc -relocation-model=dynamic-no-pic -mtriple=i686-apple-darwin8.7.2 |\
|
||||||
; RUN: %prcontext L_Arr.non_lazy_ptr 1 | grep '4(%esp)'
|
; RUN: %prcontext L_Arr.non_lazy_ptr 1 | grep {4(%esp)}
|
||||||
|
|
||||||
%Arr = external global [0 x int] ; <[0 x int]*> [#uses=2]
|
%Arr = external global [0 x int] ; <[0 x int]*> [#uses=2]
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep 'A(' | wc -l | grep 1
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | \
|
||||||
|
; RUN: grep {A(} | wc -l | grep 1
|
||||||
;
|
;
|
||||||
; Make sure the common loop invariant _A(reg) is hoisted up to preheader.
|
; Make sure the common loop invariant _A(reg) is hoisted up to preheader.
|
||||||
|
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
|
|
||||||
; Check that the shift gets turned into an LEA.
|
; Check that the shift gets turned into an LEA.
|
||||||
|
|
||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | not grep 'mov E.X, E.X'
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
|
||||||
|
; RUN: not grep {mov E.X, E.X}
|
||||||
|
|
||||||
%G = external global int
|
%G = external global int
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
;; Both functions in this testcase should codegen to the same function, and
|
;; Both functions in this testcase should codegen to the same function, and
|
||||||
;; neither of them should require spilling anything to the stack.
|
;; neither of them should require spilling anything to the stack.
|
||||||
|
|
||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -stats 2>&1 | not grep 'Number of register spills'
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -stats |& \
|
||||||
|
; RUN: not grep {Number of register spills}
|
||||||
|
|
||||||
;; This can be compiled to use three registers if the loads are not
|
;; This can be compiled to use three registers if the loads are not
|
||||||
;; folded into the multiplies, 2 registers otherwise.
|
;; folded into the multiplies, 2 registers otherwise.
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 &&
|
|
||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep div
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep div
|
||||||
|
|
||||||
int %test1(int %X) {
|
int %test1(int %X) {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep ro[rl] | wc -l | grep 12
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
|
||||||
|
; RUN: grep {ro\[rl\]} | wc -l | grep 12
|
||||||
|
|
||||||
uint %rotl32(uint %A, ubyte %Amt) {
|
uint %rotl32(uint %A, ubyte %Amt) {
|
||||||
%B = shl uint %A, ubyte %Amt
|
%B = shl uint %A, ubyte %Amt
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep 'shld.*CL' &&
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
|
||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | not grep 'mov CL, BL'
|
; RUN: grep {shld.*CL}
|
||||||
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
|
||||||
|
; RUN: not grep {mov CL, BL}
|
||||||
|
|
||||||
; PR687
|
; PR687
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
; RUN: llvm-as < %s | llc -relocation-model=static -march=x86 | grep 'shll $3' | wc -l | grep 2
|
; RUN: llvm-as < %s | llc -relocation-model=static -march=x86 | \
|
||||||
|
; RUN: grep {shll \$3} | wc -l | grep 2
|
||||||
|
|
||||||
; This should produce two shll instructions, not any lea's.
|
; This should produce two shll instructions, not any lea's.
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep sh[lr]d | wc -l | grep 5
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
|
||||||
|
; RUN: grep {sh\[lr\]d} | wc -l | grep 5
|
||||||
|
|
||||||
long %test1(long %X, ubyte %C) {
|
long %test1(long %X, ubyte %C) {
|
||||||
%Y = shl long %X, ubyte %C
|
%Y = shl long %X, ubyte %C
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep 's[ah][rl]l' | wc -l | grep 1
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | \
|
||||||
|
; RUN: grep {s\[ah\]\[rl\]l} | wc -l | grep 1
|
||||||
|
|
||||||
int* %test1(int *%P, uint %X) {
|
int* %test1(int *%P, uint %X) {
|
||||||
%Y = shr uint %X, ubyte 2
|
%Y = shr uint %X, ubyte 2
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 &&
|
; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not grep test
|
||||||
; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not getp test
|
|
||||||
|
|
||||||
define float @test1(float %a, float %b) {
|
define float @test1(float %a, float %b) {
|
||||||
%tmp = tail call float @copysignf( float %b, float %a )
|
%tmp = tail call float @copysignf( float %b, float %a )
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep 'mov'
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep mov
|
||||||
;
|
;
|
||||||
; Test the add and load are folded into the store instruction.
|
; Test the add and load are folded into the store instruction.
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep 'and DWORD PTR' | wc -l | grep 2
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
|
||||||
|
; RUN: grep {and DWORD PTR} | wc -l | grep 2
|
||||||
|
|
||||||
target endian = little
|
target endian = little
|
||||||
target pointersize = 32
|
target pointersize = 32
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic &&
|
; RUN: llvm-as < %s | \
|
||||||
; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep _GLOBAL_OFFSET_TABLE_ &&
|
; RUN: llc -mtriple=i686-pc-linux-gnu -relocation-model=pic -o %t -f
|
||||||
; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep piclabel | wc -l | grep 3 &&
|
; RUN: grep _GLOBAL_OFFSET_TABLE_ %t
|
||||||
; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep GOT | wc -l | grep 3 &&
|
; RUN: grep piclabel %t | wc -l | grep 3
|
||||||
; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep GOTOFF | wc -l | grep 0
|
; RUN: grep GOT %t | wc -l | grep 3
|
||||||
|
; RUN: not grep GOTOFF %t | wc -l
|
||||||
|
|
||||||
@ptr = external global i32*
|
@ptr = external global i32*
|
||||||
@dst = external global i32
|
@dst = external global i32
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic &&
|
; RUN: llvm-as < %s | \
|
||||||
; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep _GLOBAL_OFFSET_TABLE_ &&
|
; RUN: llc -mtriple=i686-pc-linux-gnu -relocation-model=pic -o %t -f
|
||||||
; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep piclabel | wc -l | grep 3 &&
|
; RUN: grep _GLOBAL_OFFSET_TABLE_ %t
|
||||||
; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep PLT | wc -l | grep 1 &&
|
; RUN: grep piclabel %t | wc -l | grep 3
|
||||||
; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep "GOT" | wc -l | grep 1 &&
|
; RUN: grep PLT %t | wc -l | grep 1
|
||||||
; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep "GOTOFF" | wc -l | grep 0
|
; RUN: grep "GOT" %t | wc -l | grep 1
|
||||||
|
; RUN: not grep "GOTOFF" %t
|
||||||
|
|
||||||
@pfoo = external global void(...)*
|
@pfoo = external global void(...)*
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep 'subl.*60'
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | \
|
||||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep 'movdqa.*32'
|
; RUN: grep {subl.*60}
|
||||||
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | \
|
||||||
|
; RUN: grep {movdqa.*32}
|
||||||
|
|
||||||
void %test() {
|
void %test() {
|
||||||
tail call void %xx( int 1, int 2, int 3, int 4, int 5, int 6, int 7, <2 x long> cast (<4 x int> < int 4, int 3, int 2, int 1 > to <2 x long>), <2 x long> cast (<4 x int> < int 8, int 7, int 6, int 5 > to <2 x long>), <2 x long> cast (<4 x int> < int 6, int 4, int 2, int 0 > to <2 x long>), <2 x long> cast (<4 x int> < int 8, int 4, int 2, int 1 > to <2 x long>), <2 x long> cast (<4 x int> < int 0, int 1, int 3, int 9 > to <2 x long>) )
|
tail call void %xx( int 1, int 2, int 3, int 4, int 5, int 6, int 7, <2 x long> cast (<4 x int> < int 4, int 3, int 2, int 1 > to <2 x long>), <2 x long> cast (<4 x int> < int 8, int 7, int 6, int 5 > to <2 x long>), <2 x long> cast (<4 x int> < int 6, int 4, int 2, int 0 > to <2 x long>), <2 x long> cast (<4 x int> < int 8, int 4, int 2, int 1 > to <2 x long>), <2 x long> cast (<4 x int> < int 0, int 1, int 3, int 9 > to <2 x long>) )
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
; RUN: llvm-as < %s | llc | grep 'movl %edi, %eax'
|
; RUN: llvm-as < %s | llc | grep {movl %edi, %eax}
|
||||||
; The input value is already sign extended, don't re-extend it.
|
; The input value is already sign extended, don't re-extend it.
|
||||||
; This testcase corresponds to:
|
; This testcase corresponds to:
|
||||||
; int test(short X) { return (int)X; }
|
; int test(short X) { return (int)X; }
|
||||||
|
Loading…
Reference in New Issue
Block a user