|
| 1 | +; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5 |
1 | 2 | ; RUN: llc -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -stop-after=x86-optimize-LEAs -experimental-debug-variable-locations=false < %s \
|
2 | 3 | ; RUN: | FileCheck %s --check-prefix=NORMAL
|
3 | 4 | ; RUN: llc -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -stop-after=x86-optimize-LEAs -experimental-debug-variable-locations < %s \
|
|
10 | 11 | ; assert(MRI->use_empty(LastVReg) &&
|
11 | 12 | ; "The LEA's def register must have no uses");
|
12 | 13 |
|
13 |
| -; CHECK: LEA64r |
14 |
| -; CHECK-NOT: LEA64r |
15 |
| -; NORMAL: DBG_VALUE_LIST |
16 |
| -; INSTRREF: DBG_INSTR_REF |
17 |
| - |
18 | 14 | target triple = "x86_64-unknown-linux-gnu"
|
19 | 15 |
|
20 | 16 | %t10 = type { ptr, [32 x i8] }
|
21 | 17 |
|
22 | 18 | define void @foo() {
|
| 19 | + ; NORMAL-LABEL: name: foo |
| 20 | + ; NORMAL: bb.0.bb_entry: |
| 21 | + ; NORMAL-NEXT: successors: %bb.1(0x80000000) |
| 22 | + ; NORMAL-NEXT: {{ $}} |
| 23 | + ; NORMAL-NEXT: [[MOV32r0_:%[0-9]+]]:gr32 = MOV32r0 implicit-def dead $eflags |
| 24 | + ; NORMAL-NEXT: [[COPY:%[0-9]+]]:gr8 = COPY [[MOV32r0_]].sub_8bit |
| 25 | + ; NORMAL-NEXT: [[LEA64r:%[0-9]+]]:gr64 = LEA64r %stack.1.i, 1, $noreg, 0, $noreg |
| 26 | + ; NORMAL-NEXT: [[DEF:%[0-9]+]]:gr64 = IMPLICIT_DEF |
| 27 | + ; NORMAL-NEXT: [[DEF1:%[0-9]+]]:gr64 = IMPLICIT_DEF |
| 28 | + ; NORMAL-NEXT: {{ $}} |
| 29 | + ; NORMAL-NEXT: bb.1.bb_8: |
| 30 | + ; NORMAL-NEXT: successors: %bb.5(0x40000000), %bb.2(0x40000000) |
| 31 | + ; NORMAL-NEXT: {{ $}} |
| 32 | + ; NORMAL-NEXT: TEST8rr [[COPY]], [[COPY]], implicit-def $eflags |
| 33 | + ; NORMAL-NEXT: JCC_1 %bb.5, 5, implicit $eflags |
| 34 | + ; NORMAL-NEXT: JMP_1 %bb.2 |
| 35 | + ; NORMAL-NEXT: {{ $}} |
| 36 | + ; NORMAL-NEXT: bb.2.bb_mid: |
| 37 | + ; NORMAL-NEXT: successors: %bb.4(0x30000000), %bb.3(0x50000000) |
| 38 | + ; NORMAL-NEXT: {{ $}} |
| 39 | + ; NORMAL-NEXT: TEST64rr [[DEF1]], [[DEF1]], implicit-def $eflags |
| 40 | + ; NORMAL-NEXT: JCC_1 %bb.4, 4, implicit $eflags |
| 41 | + ; NORMAL-NEXT: JMP_1 %bb.3 |
| 42 | + ; NORMAL-NEXT: {{ $}} |
| 43 | + ; NORMAL-NEXT: bb.3.cond.false: |
| 44 | + ; NORMAL-NEXT: successors: %bb.4(0x80000000) |
| 45 | + ; NORMAL-NEXT: {{ $}} |
| 46 | + ; NORMAL-NEXT: bb.4.cond.end: |
| 47 | + ; NORMAL-NEXT: successors: %bb.5(0x80000000) |
| 48 | + ; NORMAL-NEXT: {{ $}} |
| 49 | + ; NORMAL-NEXT: [[MOVUPSrm:%[0-9]+]]:vr128 = MOVUPSrm [[LEA64r]], 1, $noreg, 40, $noreg :: (load (s128) from %ir.i4, align 8) |
| 50 | + ; NORMAL-NEXT: MOVUPSmr $noreg, 1, $noreg, 0, $noreg, killed [[MOVUPSrm]] :: (store (s128) into `ptr null`, align 8) |
| 51 | + ; NORMAL-NEXT: DBG_VALUE_LIST !3, !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_plus_uconst, 40), [[LEA64r]], [[LEA64r]], debug-location !8 |
| 52 | + ; NORMAL-NEXT: [[MOVUPSrm1:%[0-9]+]]:vr128 = MOVUPSrm [[LEA64r]], 1, $noreg, 40, $noreg :: (load (s128) from %ir.i6, align 8) |
| 53 | + ; NORMAL-NEXT: MOVUPSmr $noreg, 1, $noreg, 0, $noreg, killed [[MOVUPSrm1]] :: (store (s128) into `ptr null`, align 8) |
| 54 | + ; NORMAL-NEXT: {{ $}} |
| 55 | + ; NORMAL-NEXT: bb.5.bb_last: |
| 56 | + ; NORMAL-NEXT: successors: %bb.1(0x80000000) |
| 57 | + ; NORMAL-NEXT: {{ $}} |
| 58 | + ; NORMAL-NEXT: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp |
| 59 | + ; NORMAL-NEXT: [[SUBREG_TO_REG:%[0-9]+]]:gr64 = SUBREG_TO_REG 0, [[MOV32r0_]], %subreg.sub_32bit |
| 60 | + ; NORMAL-NEXT: $rdi = COPY [[SUBREG_TO_REG]] |
| 61 | + ; NORMAL-NEXT: $rsi = COPY [[SUBREG_TO_REG]] |
| 62 | + ; NORMAL-NEXT: $rdx = COPY [[SUBREG_TO_REG]] |
| 63 | + ; NORMAL-NEXT: $ecx = COPY [[MOV32r0_]] |
| 64 | + ; NORMAL-NEXT: $r8 = COPY [[LEA64r]] |
| 65 | + ; NORMAL-NEXT: CALL64r [[DEF]], csr_64, implicit $rsp, implicit $ssp, implicit $rdi, implicit $rsi, implicit $rdx, implicit $ecx, implicit $r8, implicit-def $rsp, implicit-def $ssp |
| 66 | + ; NORMAL-NEXT: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp |
| 67 | + ; NORMAL-NEXT: JMP_1 %bb.1 |
| 68 | + ; |
| 69 | + ; INSTRREF-LABEL: name: foo |
| 70 | + ; INSTRREF: bb.0.bb_entry: |
| 71 | + ; INSTRREF-NEXT: successors: %bb.1(0x80000000) |
| 72 | + ; INSTRREF-NEXT: {{ $}} |
| 73 | + ; INSTRREF-NEXT: [[MOV32r0_:%[0-9]+]]:gr32 = MOV32r0 implicit-def dead $eflags |
| 74 | + ; INSTRREF-NEXT: [[COPY:%[0-9]+]]:gr8 = COPY [[MOV32r0_]].sub_8bit |
| 75 | + ; INSTRREF-NEXT: [[LEA64r:%[0-9]+]]:gr64 = LEA64r %stack.1.i, 1, $noreg, 0, $noreg |
| 76 | + ; INSTRREF-NEXT: [[DEF:%[0-9]+]]:gr64 = IMPLICIT_DEF |
| 77 | + ; INSTRREF-NEXT: [[DEF1:%[0-9]+]]:gr64 = IMPLICIT_DEF |
| 78 | + ; INSTRREF-NEXT: {{ $}} |
| 79 | + ; INSTRREF-NEXT: bb.1.bb_8: |
| 80 | + ; INSTRREF-NEXT: successors: %bb.5(0x40000000), %bb.2(0x40000000) |
| 81 | + ; INSTRREF-NEXT: {{ $}} |
| 82 | + ; INSTRREF-NEXT: TEST8rr [[COPY]], [[COPY]], implicit-def $eflags |
| 83 | + ; INSTRREF-NEXT: JCC_1 %bb.5, 5, implicit $eflags |
| 84 | + ; INSTRREF-NEXT: JMP_1 %bb.2 |
| 85 | + ; INSTRREF-NEXT: {{ $}} |
| 86 | + ; INSTRREF-NEXT: bb.2.bb_mid: |
| 87 | + ; INSTRREF-NEXT: successors: %bb.4(0x30000000), %bb.3(0x50000000) |
| 88 | + ; INSTRREF-NEXT: {{ $}} |
| 89 | + ; INSTRREF-NEXT: TEST64rr [[DEF1]], [[DEF1]], implicit-def $eflags |
| 90 | + ; INSTRREF-NEXT: JCC_1 %bb.4, 4, implicit $eflags |
| 91 | + ; INSTRREF-NEXT: JMP_1 %bb.3 |
| 92 | + ; INSTRREF-NEXT: {{ $}} |
| 93 | + ; INSTRREF-NEXT: bb.3.cond.false: |
| 94 | + ; INSTRREF-NEXT: successors: %bb.4(0x80000000) |
| 95 | + ; INSTRREF-NEXT: {{ $}} |
| 96 | + ; INSTRREF-NEXT: bb.4.cond.end: |
| 97 | + ; INSTRREF-NEXT: successors: %bb.5(0x80000000) |
| 98 | + ; INSTRREF-NEXT: {{ $}} |
| 99 | + ; INSTRREF-NEXT: [[MOVUPSrm:%[0-9]+]]:vr128 = MOVUPSrm [[LEA64r]], 1, $noreg, 40, $noreg :: (load (s128) from %ir.i4, align 8) |
| 100 | + ; INSTRREF-NEXT: MOVUPSmr $noreg, 1, $noreg, 0, $noreg, killed [[MOVUPSrm]] :: (store (s128) into `ptr null`, align 8) |
| 101 | + ; INSTRREF-NEXT: DBG_INSTR_REF !3, !DIExpression(DW_OP_LLVM_arg, 0), dbg-instr-ref(1, 0), dbg-instr-ref(1, 0), debug-location !8 |
| 102 | + ; INSTRREF-NEXT: [[MOVUPSrm1:%[0-9]+]]:vr128 = MOVUPSrm [[LEA64r]], 1, $noreg, 40, $noreg :: (load (s128) from %ir.i6, align 8) |
| 103 | + ; INSTRREF-NEXT: MOVUPSmr $noreg, 1, $noreg, 0, $noreg, killed [[MOVUPSrm1]] :: (store (s128) into `ptr null`, align 8) |
| 104 | + ; INSTRREF-NEXT: {{ $}} |
| 105 | + ; INSTRREF-NEXT: bb.5.bb_last: |
| 106 | + ; INSTRREF-NEXT: successors: %bb.1(0x80000000) |
| 107 | + ; INSTRREF-NEXT: {{ $}} |
| 108 | + ; INSTRREF-NEXT: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp |
| 109 | + ; INSTRREF-NEXT: [[SUBREG_TO_REG:%[0-9]+]]:gr64 = SUBREG_TO_REG 0, [[MOV32r0_]], %subreg.sub_32bit |
| 110 | + ; INSTRREF-NEXT: $rdi = COPY [[SUBREG_TO_REG]] |
| 111 | + ; INSTRREF-NEXT: $rsi = COPY [[SUBREG_TO_REG]] |
| 112 | + ; INSTRREF-NEXT: $rdx = COPY [[SUBREG_TO_REG]] |
| 113 | + ; INSTRREF-NEXT: $ecx = COPY [[MOV32r0_]] |
| 114 | + ; INSTRREF-NEXT: $r8 = COPY [[LEA64r]] |
| 115 | + ; INSTRREF-NEXT: CALL64r [[DEF]], csr_64, implicit $rsp, implicit $ssp, implicit $rdi, implicit $rsi, implicit $rdx, implicit $ecx, implicit $r8, implicit-def $rsp, implicit-def $ssp |
| 116 | + ; INSTRREF-NEXT: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp |
| 117 | + ; INSTRREF-NEXT: JMP_1 %bb.1 |
23 | 118 | bb_entry:
|
24 | 119 | %tmp11 = alloca [0 x [0 x i32]], i32 0, align 4
|
25 | 120 | %i = alloca %t10, align 8
|
|
0 commit comments