llvm.org GIT mirror llvm / 49b2803
Prepare remaining tests for -join-physreg going away. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130893 91177308-0d34-0410-b5e6-96231b3b80d8 Jakob Stoklund Olesen 8 years ago
15 changed file(s) with 48 addition(s) and 34 deletion(s). Raw diff Collapse all Expand all
33
44 ; CHECK: ## InlineAsm End
55 ; CHECK-NEXT: BB0_2:
6 ; CHECK-NEXT: movl %esi, %eax
6 ; CHECK-NEXT: {{movl %esi, %eax|addl %edi, %esi}}
77
88
99 @"\01LC" = internal constant [7 x i8] c"n0=%d\0A\00" ; <[7 x i8]*> [#uses=1]
2727 }
2828
2929 ; CHECK: call{{.*}}f
30 ; CHECK-NEXT: Ltmp0:
31 ; CHECK-NEXT: movl %eax, %esi
30 ; CHECK: movl %eax, %esi
31 ; CHECK: call{{.*}}g
1111 ; RUN: llc < %s -asm-verbose=0 -mtriple=x86_64-apple-darwin -march=x86-64 -relocation-model=dynamic-no-pic -code-model=small | FileCheck %s -check-prefix=DARWIN-64-DYNAMIC
1212 ; RUN: llc < %s -asm-verbose=0 -mtriple=x86_64-apple-darwin -march=x86-64 -relocation-model=pic -code-model=small | FileCheck %s -check-prefix=DARWIN-64-PIC
1313
14 ; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=i686-unknown-linux-gnu -march=x86 -relocation-model=static -code-model=small | FileCheck %s -check-prefix=LINUX-32-STATIC
15 ; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=i686-unknown-linux-gnu -march=x86 -relocation-model=static -code-model=small | FileCheck %s -check-prefix=LINUX-32-PIC
16 ; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=x86_64-unknown-linux-gnu -march=x86-64 -relocation-model=static -code-model=small | FileCheck %s -check-prefix=LINUX-64-STATIC
17 ; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=x86_64-unknown-linux-gnu -march=x86-64 -relocation-model=pic -code-model=small | FileCheck %s -check-prefix=LINUX-64-PIC
18 ; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=i686-apple-darwin -march=x86 -relocation-model=static -code-model=small | FileCheck %s -check-prefix=DARWIN-32-STATIC
19 ; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=i686-apple-darwin -march=x86 -relocation-model=dynamic-no-pic -code-model=small | FileCheck %s -check-prefix=DARWIN-32-DYNAMIC
20 ; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=i686-apple-darwin -march=x86 -relocation-model=pic -code-model=small | FileCheck %s -check-prefix=DARWIN-32-PIC
21 ; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=x86_64-apple-darwin -march=x86-64 -relocation-model=static -code-model=small | FileCheck %s -check-prefix=DARWIN-64-STATIC
22 ; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=x86_64-apple-darwin -march=x86-64 -relocation-model=dynamic-no-pic -code-model=small | FileCheck %s -check-prefix=DARWIN-64-DYNAMIC
23 ; RUN: llc < %s -asm-verbose=0 -regalloc=basic -mtriple=x86_64-apple-darwin -march=x86-64 -relocation-model=pic -code-model=small | FileCheck %s -check-prefix=DARWIN-64-PIC
14 ; RUN: llc < %s -asm-verbose=0 -regalloc=basic -join-physregs -mtriple=i686-unknown-linux-gnu -march=x86 -relocation-model=static -code-model=small | FileCheck %s -check-prefix=LINUX-32-STATIC
15 ; RUN: llc < %s -asm-verbose=0 -regalloc=basic -join-physregs -mtriple=i686-unknown-linux-gnu -march=x86 -relocation-model=static -code-model=small | FileCheck %s -check-prefix=LINUX-32-PIC
16 ; RUN: llc < %s -asm-verbose=0 -regalloc=basic -join-physregs -mtriple=x86_64-unknown-linux-gnu -march=x86-64 -relocation-model=static -code-model=small | FileCheck %s -check-prefix=LINUX-64-STATIC
17 ; RUN: llc < %s -asm-verbose=0 -regalloc=basic -join-physregs -mtriple=x86_64-unknown-linux-gnu -march=x86-64 -relocation-model=pic -code-model=small | FileCheck %s -check-prefix=LINUX-64-PIC
18 ; RUN: llc < %s -asm-verbose=0 -regalloc=basic -join-physregs -mtriple=i686-apple-darwin -march=x86 -relocation-model=static -code-model=small | FileCheck %s -check-prefix=DARWIN-32-STATIC
19 ; RUN: llc < %s -asm-verbose=0 -regalloc=basic -join-physregs -mtriple=i686-apple-darwin -march=x86 -relocation-model=dynamic-no-pic -code-model=small | FileCheck %s -check-prefix=DARWIN-32-DYNAMIC
20 ; RUN: llc < %s -asm-verbose=0 -regalloc=basic -join-physregs -mtriple=i686-apple-darwin -march=x86 -relocation-model=pic -code-model=small | FileCheck %s -check-prefix=DARWIN-32-PIC
21 ; RUN: llc < %s -asm-verbose=0 -regalloc=basic -join-physregs -mtriple=x86_64-apple-darwin -march=x86-64 -relocation-model=static -code-model=small | FileCheck %s -check-prefix=DARWIN-64-STATIC
22 ; RUN: llc < %s -asm-verbose=0 -regalloc=basic -join-physregs -mtriple=x86_64-apple-darwin -march=x86-64 -relocation-model=dynamic-no-pic -code-model=small | FileCheck %s -check-prefix=DARWIN-64-DYNAMIC
23 ; RUN: llc < %s -asm-verbose=0 -regalloc=basic -join-physregs -mtriple=x86_64-apple-darwin -march=x86-64 -relocation-model=pic -code-model=small | FileCheck %s -check-prefix=DARWIN-64-PIC
2424
2525 @src = external global [131072 x i32]
2626 @dst = external global [131072 x i32]
0 ; RUN: llc < %s -march=x86 | FileCheck %s -check-prefix=X32
1 ; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s -check-prefix=X64
2 ; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s -check-prefix=X64
1 ; RUN: llc < %s -mtriple=x86_64-linux -join-physregs | FileCheck %s -check-prefix=X64
2 ; RUN: llc < %s -mtriple=x86_64-win32 -join-physregs | FileCheck %s -check-prefix=X64
3
4 ; Some of these tests depend on -join-physregs to commute instructions.
35
46 ; The immediate can be encoded in a smaller way if the
57 ; instruction is a sub instead of an add.
None ; RUN: llc < %s -march=x86-64 -mtriple=x86_64-pc-linux-gnu -show-mc-encoding | FileCheck %s
0 ; RUN: llc < %s -march=x86-64 -mtriple=x86_64-pc-linux-gnu -show-mc-encoding -join-physregs | FileCheck %s
11
22 ; PR8365
33 ; CHECK: andl $-64, %edi # encoding: [0x83,0xe7,0xc0]
88 ; CHECK: main:
99 ; CHECK: movl $1, (%esp)
1010 ; CHECK: leal 16(%esp), %edi
11 ; CHECK: movl $36, %ecx
1211 ; CHECK: leal 160(%esp), %esi
1312 ; CHECK: rep;movsl
1413 %s = alloca %struct.S ; <%struct.S*> [#uses=2]
None ; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
0 ; RUN: llc < %s -mtriple=x86_64-linux -join-physregs | FileCheck %s
11 ; CHECK-NOT: mov
22 ; CHECK: paddw
33 ; CHECK-NOT: mov
0 ; RUN: llc -mtriple=x86_64-apple-darwin10 < %s | FileCheck %s
1 ; RUN: llc -mtriple=x86_64-apple-darwin10 -regalloc=basic < %s | FileCheck %s
1 ; RUN: llc -mtriple=x86_64-apple-darwin10 -regalloc=basic -join-physregs < %s | FileCheck %s
22
33 %struct.a = type { i32 }
44
4040
4141 ; CHECK: jle
4242 ; CHECK-NOT: cmov
43 ; CHECK: xorl {{%edi, %edi|%ecx, %ecx}}
43 ; CHECK: xorl {{%edi, %edi|%ecx, %ecx|%eax, %eax}}
4444 ; CHECK-NEXT: align
4545 ; CHECK-NEXT: BB1_2:
46 ; CHECK-NEXT: callq
46 ; CHECK: callq
4747 ; CHECK-NEXT: incl [[BX:%[a-z0-9]+]]
4848 ; CHECK-NEXT: cmpl [[R14:%[a-z0-9]+]], [[BX]]
49 ; CHECK-NEXT: movq %rax, %r{{di|cx}}
50 ; CHECK-NEXT: jl
49 ; CHECK: jl
5150
5251 define void @_Z18GenerateStatusPagei(i32 %jobs_to_display) nounwind {
5352 entry:
None ; RUN: llc < %s -march=x86 | grep mov | count 4
0 ; RUN: llc < %s -march=x86 | FileCheck %s
11 ; PR2659
22
33 define i32 @binomial(i32 %n, i32 %k) nounwind {
1111
1212 ifthen: ; preds = %entry
1313 ret i32 0
14
14 ; CHECK: forbody
15 ; CHECK-NOT: mov
1516 forbody: ; preds = %forbody, %forcond.preheader
1617 %indvar = phi i32 [ 0, %forcond.preheader ], [ %divisor.02, %forbody ] ; [#uses=3]
1718 %accumulator.01 = phi i32 [ 1, %forcond.preheader ], [ %div, %forbody ] ; [#uses=1]
None ; RUN: llc < %s -mtriple=i386-apple-darwin | FileCheck %s
0 ; RUN: llc < %s -mtriple=i386-apple-darwin -join-physregs | FileCheck %s
11 ; rdar://5571034
2
3 ; This requires physreg joining, %vreg13 is live everywhere:
4 ; 304L %CL = COPY %vreg13:sub_8bit; GR32_ABCD:%vreg13
5 ; 320L %vreg15 = COPY %vreg19; GR32:%vreg15 GR32_NOSP:%vreg19
6 ; 336L %vreg15 = SAR32rCL %vreg15, %EFLAGS, %CL; GR32:%vreg15
27
38 define void @foo(i32* nocapture %quadrant, i32* nocapture %ptr, i32 %bbSize, i32 %bbStart, i32 %shifts) nounwind ssp {
49 ; CHECK: foo:
None ; RUN: llc < %s -march=x86 -mattr=sse41 -stack-alignment=16 > %t
0 ; RUN: llc < %s -march=x86 -mattr=sse41 -stack-alignment=16 -join-physregs > %t
11 ; RUN: grep pmul %t | count 12
22 ; RUN: grep mov %t | count 11
3
4 ; The f() arguments in %xmm0 and %xmm1 cause an extra movdqa without -join-physregs.
35
46 define <4 x i32> @a(<4 x i32> %i) nounwind {
57 %A = mul <4 x i32> %i, < i32 117, i32 117, i32 117, i32 117 >
None ; RUN: llc < %s -march=x86 -mtriple=i686-apple-darwin9.4.0 | grep movl | count 4
1 ; RUN: llc < %s -march=x86 -mtriple=i686-apple-darwin9.4.0 | FileCheck %s
0 ; RUN: llc < %s -march=x86 -mtriple=i686-apple-darwin9.4.0 -disable-branch-fold | FileCheck %s
21 ; PR2659
32
43 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
1817 ; CHECK-NOT: xorl
1918 ; CHECK-NOT: movl
2019 ; CHECK-NOT: LBB
21 ; CHECK: je
20 ; CHECK: jne
21
22 ; There should be no moves required in the for loop body.
23 ; CHECK: %forbody
24 ; CHECK-NOT: mov
2225
2326 ifthen: ; preds = %entry
2427 ret i32 0
228228 ; 64: t14:
229229 ; 64: movq 32(%rdi)
230230 ; 64-NOT: movq 16(%rdi)
231 ; 64: jmpq *16(%rdi)
231 ; 64: jmpq *16({{%rdi|%rax}})
232232 %0 = getelementptr inbounds %struct.__block_literal_2* %.block_descriptor, i64 0, i32 5 ; [#uses=1]
233233 %1 = load void ()** %0, align 8 ; [#uses=2]
234234 %2 = bitcast void ()* %1 to %struct.__block_literal_1* ; <%struct.__block_literal_1*> [#uses=1]
None ; RUN: llc < %s -march=x86-64 -asm-verbose=false | FileCheck %s
1 ; RUN: llc < %s -march=x86-64 -asm-verbose=false -enable-unsafe-fp-math -enable-no-nans-fp-math | FileCheck -check-prefix=UNSAFE %s
2 ; RUN: llc < %s -march=x86-64 -asm-verbose=false -enable-no-nans-fp-math | FileCheck -check-prefix=FINITE %s
0 ; RUN: llc < %s -march=x86-64 -asm-verbose=false -join-physregs | FileCheck %s
1 ; RUN: llc < %s -march=x86-64 -asm-verbose=false -join-physregs -enable-unsafe-fp-math -enable-no-nans-fp-math | FileCheck -check-prefix=UNSAFE %s
2 ; RUN: llc < %s -march=x86-64 -asm-verbose=false -join-physregs -enable-no-nans-fp-math | FileCheck -check-prefix=FINITE %s
33
44 ; Some of these patterns can be matched as SSE min or max. Some of
55 ; then can be matched provided that the operands are swapped.
1010 ; x_ : use 0.0 instead of %y
1111 ; y_ : use -0.0 instead of %y
1212 ; _inverse : swap the arms of the select.
13
14 ; Some of these tests depend on -join-physregs commuting instructions to
15 ; eliminate copies.
1316
1417 ; CHECK: ogt:
1518 ; CHECK-NEXT: maxsd %xmm1, %xmm0