Start function numbering at 0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101638 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2010-04-17 16:29:15 +00:00
parent 383b5f6b91
commit 9f23dee08c
35 changed files with 648 additions and 647 deletions

View File

@ -44,7 +44,8 @@ bool MachineFunctionAnalysis::doInitialization(Module &M) {
MachineModuleInfo *MMI = getAnalysisIfAvailable<MachineModuleInfo>();
assert(MMI && "MMI not around yet??");
MMI->setModule(&M);
NextFnNum = 1; return false;
NextFnNum = 0;
return false;
}

View File

@ -86,7 +86,7 @@ bb: ; preds = %entry
return: ; preds = %bb
ret void
}
;CHECK: L_LSDA_1:
;CHECK: L_LSDA_0:
declare arm_apcscc void @_ZdlPv(i8*) nounwind

View File

@ -11,23 +11,23 @@ define i32 @test1() {
}
; DarwinStatic: _test1:
; DarwinStatic: ldr r0, LCPI1_0
; DarwinStatic: ldr r0, LCPI0_0
; DarwinStatic: ldr r0, [r0]
; DarwinStatic: bx lr
; DarwinStatic: .align 2
; DarwinStatic: LCPI1_0:
; DarwinStatic: LCPI0_0:
; DarwinStatic: .long {{_G$}}
; DarwinDynamic: _test1:
; DarwinDynamic: ldr r0, LCPI1_0
; DarwinDynamic: ldr r0, LCPI0_0
; DarwinDynamic: ldr r0, [r0]
; DarwinDynamic: ldr r0, [r0]
; DarwinDynamic: bx lr
; DarwinDynamic: .align 2
; DarwinDynamic: LCPI1_0:
; DarwinDynamic: LCPI0_0:
; DarwinDynamic: .long L_G$non_lazy_ptr
; DarwinDynamic: .section __DATA,__nl_symbol_ptr,non_lazy_symbol_pointers
@ -39,15 +39,15 @@ define i32 @test1() {
; DarwinPIC: _test1:
; DarwinPIC: ldr r0, LCPI1_0
; DarwinPIC: LPC1_0:
; DarwinPIC: ldr r0, LCPI0_0
; DarwinPIC: LPC0_0:
; DarwinPIC: ldr r0, [pc, r0]
; DarwinPIC: ldr r0, [r0]
; DarwinPIC: bx lr
; DarwinPIC: .align 2
; DarwinPIC: LCPI1_0:
; DarwinPIC: .long L_G$non_lazy_ptr-(LPC1_0+8)
; DarwinPIC: LCPI0_0:
; DarwinPIC: .long L_G$non_lazy_ptr-(LPC0_0+8)
; DarwinPIC: .section __DATA,__nl_symbol_ptr,non_lazy_symbol_pointers
; DarwinPIC: .align 2
@ -58,18 +58,18 @@ define i32 @test1() {
; LinuxPIC: test1:
; LinuxPIC: ldr r0, .LCPI1_0
; LinuxPIC: ldr r1, .LCPI1_1
; LinuxPIC: ldr r0, .LCPI0_0
; LinuxPIC: ldr r1, .LCPI0_1
; LinuxPIC: .LPC1_0:
; LinuxPIC: .LPC0_0:
; LinuxPIC: add r0, pc, r0
; LinuxPIC: ldr r0, [r1, r0]
; LinuxPIC: ldr r0, [r0]
; LinuxPIC: bx lr
; LinuxPIC: .align 2
; LinuxPIC: .LCPI1_0:
; LinuxPIC: .long _GLOBAL_OFFSET_TABLE_-(.LPC1_0+8)
; LinuxPIC: .LCPI0_0:
; LinuxPIC: .long _GLOBAL_OFFSET_TABLE_-(.LPC0_0+8)
; LinuxPIC: .align 2
; LinuxPIC: .LCPI1_1:
; LinuxPIC: .LCPI0_1:
; LinuxPIC: .long G(GOT)

View File

@ -5,9 +5,9 @@
define i32 @t() nounwind readonly {
entry:
; CHECK: LCPI1_0:
; CHECK: LCPI0_0:
; CHECK-NEXT: .long _x
; CHECK: LCPI1_1:
; CHECK: LCPI0_1:
; CHECK-NEXT: .long _y
%0 = load i32* @x, align 4 ; <i32> [#uses=1]

View File

@ -1,8 +1,8 @@
; RUN: llc < %s -march=bfin -verify-machineinstrs | FileCheck %s
; CHECK: .section .rodata
; CHECK: JTI1_0:
; CHECK: .long .BB1_1
; CHECK: JTI0_0:
; CHECK: .long .BB0_1
define i32 @oper(i32 %op, i32 %A, i32 %B) {
entry:

View File

@ -4,7 +4,7 @@ target triple = "mips-unknown-linux"
define float @h() nounwind readnone {
entry:
; CHECK: lw $2, %got($CPI1_0)($gp)
; CHECK: lwc1 $f0, %lo($CPI1_0)($2)
; CHECK: lw $2, %got($CPI0_0)($gp)
; CHECK: lwc1 $f0, %lo($CPI0_0)($2)
ret float 0x400B333340000000
}

View File

@ -43,8 +43,8 @@ L2: ; preds = %L3, %bb2
L1: ; preds = %L2, %bb2
%res.3 = phi i32 [ %phitmp, %L2 ], [ 2, %bb2 ] ; <i32> [#uses=1]
; PIC: addis r4, r4, ha16(Ltmp0-"L1$pb")
; PIC: li r6, lo16(Ltmp0-"L1$pb")
; PIC: addis r4, r4, ha16(Ltmp0-"L0$pb")
; PIC: li r6, lo16(Ltmp0-"L0$pb")
; PIC: add r4, r4, r6
; PIC: stw r4
; STATIC: li r5, lo16(Ltmp0)

View File

@ -15,12 +15,12 @@ entry:
bb.nph: ; preds = %entry
; CHECK: BB#1
; CHECK: ldr.n r2, LCPI1_0
; CHECK: ldr.n r2, LCPI0_0
; CHECK: add r2, pc
; CHECK: ldr r{{[0-9]+}}, [r2]
; CHECK: LBB1_2
; CHECK: LCPI1_0:
; CHECK-NOT: LCPI1_1:
; CHECK: LBB0_2
; CHECK: LCPI0_0:
; CHECK-NOT: LCPI0_1:
; CHECK: .section
%.pre = load i32* @GV, align 4 ; <i32> [#uses=1]
br label %bb

View File

@ -14,7 +14,7 @@ define i32 @test1() {
; PIC: _test1
; PIC: add r0, pc
; PIC: .long L_G$non_lazy_ptr-(LPC1_0+4)
; PIC: .long L_G$non_lazy_ptr-(LPC0_0+4)
; LINUX: test1
; LINUX: .long G(GOT)

View File

@ -19,7 +19,7 @@ entry:
br label %bb
bb: ; preds = %bb, %entry
; CHECK: LBB1_1:
; CHECK: LBB0_1:
; CHECK: cmp r2, #0
; CHECK: sub.w r9, r2, #1
; CHECK: mov r2, r9

View File

@ -17,22 +17,22 @@ entry:
bb.nph: ; preds = %entry
; CHECK: BB#1
; CHECK: ldr.n r2, LCPI1_0
; CHECK: ldr.n r2, LCPI0_0
; CHECK: ldr r2, [r2]
; CHECK: ldr r3, [r2]
; CHECK: LBB1_2
; CHECK: LCPI1_0:
; CHECK: LBB0_2
; CHECK: LCPI0_0:
; CHECK-NOT: LCPI1_1:
; CHECK: .section
; PIC: BB#1
; PIC: ldr.n r2, LCPI1_0
; PIC: ldr.n r2, LCPI0_0
; PIC: add r2, pc
; PIC: ldr r2, [r2]
; PIC: ldr r3, [r2]
; PIC: LBB1_2
; PIC: LCPI1_0:
; PIC-NOT: LCPI1_1:
; PIC: LBB0_2
; PIC: LCPI0_0:
; PIC-NOT: LCPI0_1:
; PIC: .section
%.pre = load i32* @GV, align 4 ; <i32> [#uses=1]
br label %bb

View File

@ -23,7 +23,7 @@ bb52: ; preds = %newFuncRoot
; CHECK: movne
; CHECK: moveq
; CHECK: pop
; CHECK-NEXT: LBB1_1:
; CHECK-NEXT: LBB0_1:
%0 = load i64* @posed, align 4 ; <i64> [#uses=3]
%1 = sub i64 %0, %.reload78 ; <i64> [#uses=1]
%2 = ashr i64 %1, 1 ; <i64> [#uses=3]

View File

@ -11,12 +11,12 @@ define float @foo(float %x) nounwind {
%tmp14 = fadd float %tmp12, %tmp7
ret float %tmp14
; CHECK: mulss LCPI1_0(%rip)
; CHECK: mulss LCPI1_1(%rip)
; CHECK: mulss LCPI0_0(%rip)
; CHECK: mulss LCPI0_1(%rip)
; CHECK: addss
; CHECK: mulss LCPI1_2(%rip)
; CHECK: mulss LCPI0_2(%rip)
; CHECK: addss
; CHECK: mulss LCPI1_3(%rip)
; CHECK: mulss LCPI0_3(%rip)
; CHECK: addss
; CHECK: ret
}

View File

@ -3,7 +3,7 @@
; Make sure the copy after inline asm is not coalesced away.
; CHECK: ## InlineAsm End
; CHECK-NEXT: BB1_2:
; CHECK-NEXT: BB0_2:
; CHECK-NEXT: movl %esi, %eax

View File

@ -15,7 +15,7 @@ bb.nph: ; preds = %entry
br label %bb
bb: ; preds = %bb, %bb.nph
; CHECK: LBB1_2:
; CHECK: LBB0_2:
%indvar = phi i64 [ 0, %bb.nph ], [ %indvar.next, %bb ] ; <i64> [#uses=2]
%tmp9 = shl i64 %indvar, 2 ; <i64> [#uses=4]
%tmp1016 = or i64 %tmp9, 1 ; <i64> [#uses=1]

View File

@ -13,7 +13,7 @@ entry:
br label %bb1
bb1:
; CHECK: LBB1_1:
; CHECK: LBB0_1:
; CHECK: movaps %xmm0, (%rsp)
%tmp2 = phi i32 [ %tmp3, %bb1 ], [ 0, %entry ]
call void @llvm.memcpy.i64(i8* %tmp1, i8* getelementptr inbounds ([28 x i8]* @str, i64 0, i64 0), i64 28, i32 1)

View File

@ -10,7 +10,7 @@ entry:
; CHECK: movl $1
; CHECK: movl (%ebp), %eax
; CHECK: movl 4(%ebp), %edx
; CHECK: LBB1_1:
; CHECK: LBB0_1:
; CHECK-NOT: movl $1
; CHECK-NOT: movl $0
; CHECK: addl

File diff suppressed because it is too large Load Diff

View File

@ -3,9 +3,9 @@
; CodeGen should align the top of the loop, which differs from the loop
; header in this case.
; CHECK: jmp LBB1_2
; CHECK: jmp LBB0_2
; CHECK: .align
; CHECK: LBB1_1:
; CHECK: LBB0_1:
@A = common global [100 x i32] zeroinitializer, align 32 ; <[100 x i32]*> [#uses=1]

View File

@ -46,7 +46,7 @@ return: ; preds = %entry
; CHECK: test2:
; CHECK: movl 4(%esp), %eax
; CHECK-NEXT: orl 8(%esp), %eax
; CHECK-NEXT: jne LBB2_2
; CHECK-NEXT: jne LBB1_2
}
; PR3351 - (P != 0) | (Q != 0) -> (P|Q) != 0
@ -65,7 +65,7 @@ return: ; preds = %entry
; CHECK: test3:
; CHECK: movl 4(%esp), %eax
; CHECK-NEXT: orl 8(%esp), %eax
; CHECK-NEXT: je LBB3_2
; CHECK-NEXT: je LBB2_2
}
; <rdar://problem/7598384>:

View File

@ -2,7 +2,7 @@
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"
target triple = "i386-apple-darwin7"
; RUN: llc < %s | grep {LCPI1_0(,%eax,4)}
; RUN: llc < %s | grep {LCPI0_0(,%eax,4)}
define float @f(i32 %x) nounwind readnone {
entry:
%0 = icmp eq i32 %x, 0 ; <i1> [#uses=1]

View File

@ -3,7 +3,7 @@
; llc should share constant pool entries between this integer vector
; and this floating-point vector since they have the same encoding.
; CHECK: LCPI1_0(%rip), %xmm0
; CHECK: LCPI0_0(%rip), %xmm0
; CHECK: movaps %xmm0, (%rdi)
; CHECK: movaps %xmm0, (%rsi)

View File

@ -1,4 +1,4 @@
; RUN: llc < %s -fast-isel | grep {LCPI1_0(%rip)}
; RUN: llc < %s -fast-isel | grep {LCPI0_0(%rip)}
; Make sure fast isel uses rip-relative addressing when required.
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
target triple = "x86_64-apple-darwin9.0"

View File

@ -1,5 +1,5 @@
; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=yonah | not grep pcmpeqd
; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=yonah | grep orps | grep CPI1_2 | count 2
; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=yonah | grep orps | grep CPI0_2 | count 2
; RUN: llc < %s -mtriple=x86_64-apple-darwin | grep pcmpeqd | count 1
; This testcase shouldn't need to spill the -1 value,

View File

@ -7,11 +7,11 @@
; order to avoid a branch within the loop.
; CHECK: simple:
; CHECK: jmp .LBB1_1
; CHECK: jmp .LBB0_1
; CHECK-NEXT: align
; CHECK-NEXT: .LBB1_2:
; CHECK-NEXT: .LBB0_2:
; CHECK-NEXT: callq loop_latch
; CHECK-NEXT: .LBB1_1:
; CHECK-NEXT: .LBB0_1:
; CHECK-NEXT: callq loop_header
define void @simple() nounwind {
@ -37,11 +37,11 @@ done:
; falls through into the loop, avoiding a branch within the loop.
; CHECK: slightly_more_involved:
; CHECK: jmp .LBB2_1
; CHECK: jmp .LBB1_1
; CHECK-NEXT: align
; CHECK-NEXT: .LBB2_4:
; CHECK-NEXT: .LBB1_4:
; CHECK-NEXT: callq bar99
; CHECK-NEXT: .LBB2_1:
; CHECK-NEXT: .LBB1_1:
; CHECK-NEXT: callq body
define void @slightly_more_involved() nounwind {
@ -72,20 +72,20 @@ exit:
; fallthrough edges which should be preserved.
; CHECK: yet_more_involved:
; CHECK: jmp .LBB3_1
; CHECK: jmp .LBB2_1
; CHECK-NEXT: align
; CHECK-NEXT: .LBB3_4:
; CHECK-NEXT: .LBB2_4:
; CHECK-NEXT: callq bar99
; CHECK-NEXT: callq get
; CHECK-NEXT: cmpl $2999, %eax
; CHECK-NEXT: jg .LBB3_6
; CHECK-NEXT: jg .LBB2_6
; CHECK-NEXT: callq block_a_true_func
; CHECK-NEXT: jmp .LBB3_7
; CHECK-NEXT: .LBB3_6:
; CHECK-NEXT: jmp .LBB2_7
; CHECK-NEXT: .LBB2_6:
; CHECK-NEXT: callq block_a_false_func
; CHECK-NEXT: .LBB3_7:
; CHECK-NEXT: .LBB2_7:
; CHECK-NEXT: callq block_a_merge_func
; CHECK-NEXT: .LBB3_1:
; CHECK-NEXT: .LBB2_1:
; CHECK-NEXT: callq body
define void @yet_more_involved() nounwind {
@ -131,20 +131,20 @@ exit:
; loop.
; CHECK: cfg_islands:
; CHECK: jmp .LBB4_1
; CHECK: jmp .LBB3_1
; CHECK-NEXT: align
; CHECK-NEXT: .LBB4_7:
; CHECK-NEXT: .LBB3_7:
; CHECK-NEXT: callq bar100
; CHECK-NEXT: jmp .LBB4_1
; CHECK-NEXT: .LBB4_8:
; CHECK-NEXT: jmp .LBB3_1
; CHECK-NEXT: .LBB3_8:
; CHECK-NEXT: callq bar101
; CHECK-NEXT: jmp .LBB4_1
; CHECK-NEXT: .LBB4_9:
; CHECK-NEXT: jmp .LBB3_1
; CHECK-NEXT: .LBB3_9:
; CHECK-NEXT: callq bar102
; CHECK-NEXT: jmp .LBB4_1
; CHECK-NEXT: .LBB4_5:
; CHECK-NEXT: jmp .LBB3_1
; CHECK-NEXT: .LBB3_5:
; CHECK-NEXT: callq loop_latch
; CHECK-NEXT: .LBB4_1:
; CHECK-NEXT: .LBB3_1:
; CHECK-NEXT: callq loop_header
define void @cfg_islands() nounwind {

View File

@ -4,7 +4,7 @@
; CHECK: _foo:
; CHECK: L_Arr$non_lazy_ptr
; CHECK: LBB1_1:
; CHECK: LBB0_1:
@Arr = external global [0 x i32] ; <[0 x i32]*> [#uses=1]

View File

@ -4,7 +4,7 @@
; CHECK: align
; CHECK: addl $4, %edx
; CHECK: decl %ecx
; CHECK: jne LBB1_2
; CHECK: jne LBB0_2
%struct.CUMULATIVE_ARGS = type { i32, i32, i32, i32, i32, i32, i32 }
%struct.bitmap_element = type { %struct.bitmap_element*, %struct.bitmap_element*, i32, [2 x i64] }

View File

@ -260,7 +260,7 @@ return:
; CHECK: count_me_2:
; CHECK: movl $10, %eax
; CHECK: align
; CHECK: BB7_1:
; CHECK: BB6_1:
; CHECK: movsd -40(%rdi,%rax,8), %xmm0
; CHECK: addsd -40(%rsi,%rax,8), %xmm0
; CHECK: movsd %xmm0, -40(%rdx,%rax,8)
@ -305,7 +305,7 @@ return:
; CHECK: full_me_1:
; CHECK: align
; CHECK: BB8_1:
; CHECK: BB7_1:
; CHECK: movsd (%rdi), %xmm0
; CHECK: addsd (%rsi), %xmm0
; CHECK: movsd %xmm0, (%rdx)
@ -389,7 +389,7 @@ return:
; rdar://7657764
; CHECK: asd:
; CHECK: BB10_5:
; CHECK: BB9_5:
; CHECK-NEXT: addl (%r{{[^,]*}},%rdi,4), %e
; CHECK-NEXT: incq %rdi
; CHECK-NEXT: cmpq %rdi, %r{{[^,]*}}

View File

@ -4,18 +4,18 @@
@dst = external global i32
@src = external global i32
define void @test1() nounwind {
define void @test0() nounwind {
entry:
store i32* @dst, i32** @ptr
%tmp.s = load i32* @src
store i32 %tmp.s, i32* @dst
ret void
; LINUX: test1:
; LINUX: call .L1$pb
; LINUX-NEXT: .L1$pb:
; LINUX: test0:
; LINUX: call .L0$pb
; LINUX-NEXT: .L0$pb:
; LINUX-NEXT: popl
; LINUX: addl $_GLOBAL_OFFSET_TABLE_+(.L{{.*}}-.L1$pb),
; LINUX: addl $_GLOBAL_OFFSET_TABLE_+(.L{{.*}}-.L0$pb),
; LINUX: movl dst@GOT(%eax),
; LINUX: movl ptr@GOT(%eax),
; LINUX: movl src@GOT(%eax),
@ -26,18 +26,18 @@ entry:
@dst2 = global i32 0
@src2 = global i32 0
define void @test2() nounwind {
define void @test1() nounwind {
entry:
store i32* @dst2, i32** @ptr2
%tmp.s = load i32* @src2
store i32 %tmp.s, i32* @dst2
ret void
; LINUX: test2:
; LINUX: call .L2$pb
; LINUX-NEXT: .L2$pb:
; LINUX: test1:
; LINUX: call .L1$pb
; LINUX-NEXT: .L1$pb:
; LINUX-NEXT: popl
; LINUX: addl $_GLOBAL_OFFSET_TABLE_+(.L{{.*}}-.L2$pb), %eax
; LINUX: addl $_GLOBAL_OFFSET_TABLE_+(.L{{.*}}-.L1$pb), %eax
; LINUX: movl dst2@GOT(%eax),
; LINUX: movl ptr2@GOT(%eax),
; LINUX: movl src2@GOT(%eax),
@ -47,17 +47,17 @@ entry:
declare i8* @malloc(i32)
define void @test3() nounwind {
define void @test2() nounwind {
entry:
%ptr = call i8* @malloc(i32 40)
ret void
; LINUX: test3:
; LINUX: test2:
; LINUX: pushl %ebx
; LINUX-NEXT: subl $8, %esp
; LINUX-NEXT: call .L3$pb
; LINUX-NEXT: .L3$pb:
; LINUX-NEXT: call .L2$pb
; LINUX-NEXT: .L2$pb:
; LINUX-NEXT: popl %ebx
; LINUX: addl $_GLOBAL_OFFSET_TABLE_+(.L{{.*}}-.L3$pb), %ebx
; LINUX: addl $_GLOBAL_OFFSET_TABLE_+(.L{{.*}}-.L2$pb), %ebx
; LINUX: movl $40, (%esp)
; LINUX: call malloc@PLT
; LINUX: addl $8, %esp
@ -67,18 +67,18 @@ entry:
@pfoo = external global void(...)*
define void @test4() nounwind {
define void @test3() nounwind {
entry:
%tmp = call void(...)*(...)* @afoo()
store void(...)* %tmp, void(...)** @pfoo
%tmp1 = load void(...)** @pfoo
call void(...)* %tmp1()
ret void
; LINUX: test4:
; LINUX: call .L4$pb
; LINUX-NEXT: .L4$pb:
; LINUX: test3:
; LINUX: call .L3$pb
; LINUX-NEXT: .L3$pb:
; LINUX: popl
; LINUX: addl $_GLOBAL_OFFSET_TABLE_+(.L{{.*}}-.L4$pb),
; LINUX: addl $_GLOBAL_OFFSET_TABLE_+(.L{{.*}}-.L3$pb),
; LINUX: movl pfoo@GOT(%esi),
; LINUX: call afoo@PLT
; LINUX: call *
@ -86,14 +86,14 @@ entry:
declare void(...)* @afoo(...)
define void @test5() nounwind {
define void @test4() nounwind {
entry:
call void(...)* @foo()
ret void
; LINUX: test5:
; LINUX: call .L5$pb
; LINUX: test4:
; LINUX: call .L4$pb
; LINUX: popl %ebx
; LINUX: addl $_GLOBAL_OFFSET_TABLE_+(.L{{.*}}-.L5$pb), %ebx
; LINUX: addl $_GLOBAL_OFFSET_TABLE_+(.L{{.*}}-.L4$pb), %ebx
; LINUX: call foo@PLT
}
@ -104,18 +104,18 @@ declare void @foo(...)
@dst6 = internal global i32 0
@src6 = internal global i32 0
define void @test6() nounwind {
define void @test5() nounwind {
entry:
store i32* @dst6, i32** @ptr6
%tmp.s = load i32* @src6
store i32 %tmp.s, i32* @dst6
ret void
; LINUX: test6:
; LINUX: call .L6$pb
; LINUX-NEXT: .L6$pb:
; LINUX: test5:
; LINUX: call .L5$pb
; LINUX-NEXT: .L5$pb:
; LINUX-NEXT: popl %eax
; LINUX: addl $_GLOBAL_OFFSET_TABLE_+(.L{{.*}}-.L6$pb), %eax
; LINUX: addl $_GLOBAL_OFFSET_TABLE_+(.L{{.*}}-.L5$pb), %eax
; LINUX: leal dst6@GOTOFF(%eax), %ecx
; LINUX: movl %ecx, ptr6@GOTOFF(%eax)
; LINUX: movl src6@GOTOFF(%eax), %ecx
@ -125,24 +125,24 @@ entry:
;; Test constant pool references.
define double @test7(i32 %a.u) nounwind {
define double @test6(i32 %a.u) nounwind {
entry:
%tmp = icmp eq i32 %a.u,0
%retval = select i1 %tmp, double 4.561230e+02, double 1.234560e+02
ret double %retval
; LINUX: .LCPI7_0:
; LINUX: .LCPI6_0:
; LINUX: test7:
; LINUX: call .L7$pb
; LINUX: .L7$pb:
; LINUX: addl $_GLOBAL_OFFSET_TABLE_+(.L{{.*}}-.L7$pb),
; LINUX: fldl .LCPI7_0@GOTOFF(
; LINUX: test6:
; LINUX: call .L6$pb
; LINUX: .L6$pb:
; LINUX: addl $_GLOBAL_OFFSET_TABLE_+(.L{{.*}}-.L6$pb),
; LINUX: fldl .LCPI6_0@GOTOFF(
}
;; Test jump table references.
define void @test8(i32 %n.u) nounwind {
define void @test7(i32 %n.u) nounwind {
entry:
switch i32 %n.u, label %bb12 [i32 1, label %bb i32 2, label %bb6 i32 4, label %bb7 i32 5, label %bb8 i32 6, label %bb10 i32 7, label %bb1 i32 8, label %bb3 i32 9, label %bb4 i32 10, label %bb9 i32 11, label %bb2 i32 12, label %bb5 i32 13, label %bb11 ]
bb:
@ -185,19 +185,19 @@ bb12:
tail call void(...)* @foo6()
ret void
; LINUX: test8:
; LINUX: call .L8$pb
; LINUX: .L8$pb:
; LINUX: addl $_GLOBAL_OFFSET_TABLE_+(.L{{.*}}-.L8$pb),
; LINUX: addl .LJTI8_0@GOTOFF(
; LINUX: test7:
; LINUX: call .L7$pb
; LINUX: .L7$pb:
; LINUX: addl $_GLOBAL_OFFSET_TABLE_+(.L{{.*}}-.L7$pb),
; LINUX: addl .LJTI7_0@GOTOFF(
; LINUX: jmpl *
; LINUX: .LJTI8_0:
; LINUX: .long .LBB8_2@GOTOFF
; LINUX: .long .LBB8_8@GOTOFF
; LINUX: .long .LBB8_14@GOTOFF
; LINUX: .long .LBB8_9@GOTOFF
; LINUX: .long .LBB8_10@GOTOFF
; LINUX: .LJTI7_0:
; LINUX: .long .LBB7_2@GOTOFF
; LINUX: .long .LBB7_8@GOTOFF
; LINUX: .long .LBB7_14@GOTOFF
; LINUX: .long .LBB7_9@GOTOFF
; LINUX: .long .LBB7_10@GOTOFF
}
declare void @foo1(...)

View File

@ -8,9 +8,9 @@ declare void @_Z3bari(i32)
define linkonce void @_Z3fooILi1EEvi(i32 %Y) nounwind {
entry:
; CHECK: L1$pb
; CHECK: L0$pb
; CHECK-NOT: leal
; CHECK: Ltmp0 = LJTI1_0-L1$pb
; CHECK: Ltmp0 = LJTI0_0-L0$pb
; CHECK-NEXT: addl Ltmp0(%eax,%ecx,4)
; CHECK-NEXT: jmpl *%eax
%Y_addr = alloca i32 ; <i32*> [#uses=2]

View File

@ -61,9 +61,9 @@ entry:
; Codegen should hoist and CSE these constants.
; CHECK: vv:
; CHECK: LCPI4_0(%rip), %xmm0
; CHECK: LCPI4_1(%rip), %xmm1
; CHECK: LCPI4_2(%rip), %xmm2
; CHECK: LCPI3_0(%rip), %xmm0
; CHECK: LCPI3_1(%rip), %xmm1
; CHECK: LCPI3_2(%rip), %xmm2
; CHECK: align
; CHECK-NOT: LCPI
; CHECK: ret

View File

@ -123,11 +123,11 @@ define float @ext_1(<4 x float> %v) nounwind {
; X32: _ext_1:
; X32: pshufd $3, %xmm0, %xmm0
; X32: addss LCPI8_0, %xmm0
; X32: addss LCPI7_0, %xmm0
; X64: _ext_1:
; X64: pshufd $3, %xmm0, %xmm0
; X64: addss LCPI8_0(%rip), %xmm0
; X64: addss LCPI7_0(%rip), %xmm0
}
define float @ext_2(<4 x float> %v) nounwind {
%s = extractelement <4 x float> %v, i32 3

View File

@ -110,16 +110,16 @@ altret:
; CHECK: dont_merge_oddly:
; CHECK-NOT: ret
; CHECK: ucomiss %xmm1, %xmm2
; CHECK-NEXT: jbe .LBB3_3
; CHECK-NEXT: jbe .LBB2_3
; CHECK-NEXT: ucomiss %xmm0, %xmm1
; CHECK-NEXT: ja .LBB3_4
; CHECK-NEXT: .LBB3_2:
; CHECK-NEXT: ja .LBB2_4
; CHECK-NEXT: .LBB2_2:
; CHECK-NEXT: movb $1, %al
; CHECK-NEXT: ret
; CHECK-NEXT: .LBB3_3:
; CHECK-NEXT: .LBB2_3:
; CHECK-NEXT: ucomiss %xmm0, %xmm2
; CHECK-NEXT: jbe .LBB3_2
; CHECK-NEXT: .LBB3_4:
; CHECK-NEXT: jbe .LBB2_2
; CHECK-NEXT: .LBB2_4:
; CHECK-NEXT: xorb %al, %al
; CHECK-NEXT: ret
@ -153,19 +153,19 @@ bb30:
; an unconditional jump to complete a two-way conditional branch.
; CHECK: c_expand_expr_stmt:
; CHECK: jmp .LBB4_7
; CHECK-NEXT: .LBB4_12:
; CHECK: jmp .LBB3_7
; CHECK-NEXT: .LBB3_12:
; CHECK-NEXT: movq 8(%rax), %rax
; CHECK-NEXT: movb 16(%rax), %al
; CHECK-NEXT: cmpb $16, %al
; CHECK-NEXT: je .LBB4_6
; CHECK-NEXT: je .LBB3_6
; CHECK-NEXT: cmpb $23, %al
; CHECK-NEXT: je .LBB4_6
; CHECK-NEXT: jmp .LBB4_15
; CHECK-NEXT: .LBB4_14:
; CHECK-NEXT: je .LBB3_6
; CHECK-NEXT: jmp .LBB3_15
; CHECK-NEXT: .LBB3_14:
; CHECK-NEXT: cmpb $23, %bl
; CHECK-NEXT: jne .LBB4_15
; CHECK-NEXT: .LBB4_15:
; CHECK-NEXT: jne .LBB3_15
; CHECK-NEXT: .LBB3_15:
%0 = type { %struct.rtx_def* }
%struct.lang_decl = type opaque
@ -275,7 +275,7 @@ declare fastcc %union.tree_node* @default_conversion(%union.tree_node*) nounwind
; CHECK: foo:
; CHECK: callq func
; CHECK-NEXT: .LBB5_2:
; CHECK-NEXT: .LBB4_2:
; CHECK-NEXT: addq $8, %rsp
; CHECK-NEXT: ret

View File

@ -16,9 +16,9 @@ define i16 @test1(float %f) nounwind {
%tmp69 = trunc i32 %tmp.upgrd.1 to i16 ; <i16> [#uses=1]
ret i16 %tmp69
; CHECK: test1:
; CHECK: subss LCPI1_
; CHECK: mulss LCPI1_
; CHECK: minss LCPI1_
; CHECK: subss LCPI0_
; CHECK: mulss LCPI0_
; CHECK: minss LCPI0_
}
define i16 @test2(float %f) nounwind {
@ -31,9 +31,9 @@ define i16 @test2(float %f) nounwind {
%tmp69 = trunc i32 %tmp to i16 ; <i16> [#uses=1]
ret i16 %tmp69
; CHECK: test2:
; CHECK: addss LCPI2_
; CHECK: mulss LCPI2_
; CHECK: minss LCPI2_
; CHECK: addss LCPI1_
; CHECK: mulss LCPI1_
; CHECK: minss LCPI1_
}
declare <4 x float> @llvm.x86.sse.sub.ss(<4 x float>, <4 x float>)

View File

@ -1,10 +1,10 @@
; RUN: llc < %s -march=xcore -mcpu=xs1b-generic | FileCheck %s
; CHECK: .section .cp.rodata.cst4,"aMc",@progbits,4
; CHECK: .LCPI1_0:
; CHECK: .LCPI0_0:
; CHECK: .long 12345678
; CHECK: f:
; CHECK: ldw r0, cp[.LCPI1_0]
; CHECK: ldw r0, cp[.LCPI0_0]
define i32 @f() {
entry:
ret i32 12345678