brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.0 KiB · b60f4ff Raw
122 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 42# RUN: llc -mtriple=arm64-apple-macosx -mcpu=apple-m1 -verify-coalescing -run-pass=register-coalescer -o - %s | FileCheck %s3# RUN: llc -mtriple=arm64-apple-macosx -mcpu=apple-m1 -verify-coalescing -passes=register-coalescer -o - %s | FileCheck %s4 5# Hits assert "Trying to add an operand to a machine instr that is6# already done!" when rematerializing during greedy. This was because7# an IMPLICIT_DEF ended up with some immediate operands during8# coalescing. A SUBREG_TO_REG was not dropping the immediate operands9# when mutating to IMPLICIT_DEF, and would later fail the assert when10# creating a new IMPLICIT_DEF copy during rematerialization.11 12--- |13  define void @_ZN38SanitizerCommonInterceptors_Scanf_Test8TestBodyEv() {14    ret void15  }16 17  declare void @_ZL9testScanfPKcjz(ptr, i32, ...)18 19...20---21name:            _ZN38SanitizerCommonInterceptors_Scanf_Test8TestBodyEv22alignment:       423tracksRegLiveness: true24frameInfo:25  maxAlignment:    826  adjustsStack:    true27  hasCalls:        true28  maxCallFrameSize: 2429body:             |30  bb.0:31    liveins: $x0, $x1, $x2, $x3, $x4, $x5, $x632 33    ; CHECK-LABEL: name: _ZN38SanitizerCommonInterceptors_Scanf_Test8TestBodyEv34    ; CHECK: liveins: $x0, $x1, $x2, $x3, $x4, $x5, $x635    ; CHECK-NEXT: {{  $}}36    ; CHECK-NEXT: [[DEF:%[0-9]+]]:gpr64sp = IMPLICIT_DEF37    ; CHECK-NEXT: dead [[DEF1:%[0-9]+]]:gpr32 = IMPLICIT_DEF38    ; CHECK-NEXT: [[DEF2:%[0-9]+]]:gpr64common = IMPLICIT_DEF39    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x540    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr64 = COPY $x441    ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr64 = COPY $x342    ; CHECK-NEXT: [[COPY3:%[0-9]+]]:gpr64 = COPY $x243    ; CHECK-NEXT: [[COPY4:%[0-9]+]]:gpr64 = COPY $x144    ; CHECK-NEXT: [[COPY5:%[0-9]+]]:gpr64 = COPY $x045    ; CHECK-NEXT: [[DEF3:%[0-9]+]]:gpr64 = IMPLICIT_DEF46    ; CHECK-NEXT: [[DEF4:%[0-9]+]]:gpr64 = IMPLICIT_DEF47    ; CHECK-NEXT: [[DEF5:%[0-9]+]]:gpr64 = IMPLICIT_DEF48    ; CHECK-NEXT: ADJCALLSTACKDOWN 16, 0, implicit-def dead $sp, implicit $sp49    ; CHECK-NEXT: BL @_ZL9testScanfPKcjz, csr_darwin_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp50    ; CHECK-NEXT: ADJCALLSTACKUP 16, 0, implicit-def dead $sp, implicit $sp51    ; CHECK-NEXT: ADJCALLSTACKDOWN 8, 0, implicit-def dead $sp, implicit $sp52    ; CHECK-NEXT: STRXui [[DEF3]], [[DEF]], 0 :: (store (s64) into stack)53    ; CHECK-NEXT: ADJCALLSTACKUP 8, 0, implicit-def dead $sp, implicit $sp54    ; CHECK-NEXT: STRWui undef [[DEF1]], [[DEF2]], 0 :: (store (s32))55    ; CHECK-NEXT: ADJCALLSTACKDOWN 8, 0, implicit-def dead $sp, implicit $sp56    ; CHECK-NEXT: STRXui [[DEF4]], undef [[DEF]], 0 :: (store (s64) into stack)57    ; CHECK-NEXT: $x0 = COPY [[COPY5]]58    ; CHECK-NEXT: ADJCALLSTACKUP 8, 0, implicit-def dead $sp, implicit $sp59    ; CHECK-NEXT: ADJCALLSTACKDOWN 8, 0, implicit-def dead $sp, implicit $sp60    ; CHECK-NEXT: $x0 = COPY [[COPY4]]61    ; CHECK-NEXT: ADJCALLSTACKUP 8, 0, implicit-def dead $sp, implicit $sp62    ; CHECK-NEXT: ADJCALLSTACKDOWN 8, 0, implicit-def dead $sp, implicit $sp63    ; CHECK-NEXT: $x0 = COPY [[COPY3]]64    ; CHECK-NEXT: ADJCALLSTACKUP 8, 0, implicit-def dead $sp, implicit $sp65    ; CHECK-NEXT: ADJCALLSTACKDOWN 8, 0, implicit-def dead $sp, implicit $sp66    ; CHECK-NEXT: $x0 = COPY [[COPY2]]67    ; CHECK-NEXT: ADJCALLSTACKUP 8, 0, implicit-def dead $sp, implicit $sp68    ; CHECK-NEXT: ADJCALLSTACKDOWN 8, 0, implicit-def dead $sp, implicit $sp69    ; CHECK-NEXT: $x0 = COPY [[COPY1]]70    ; CHECK-NEXT: ADJCALLSTACKUP 8, 0, implicit-def dead $sp, implicit $sp71    ; CHECK-NEXT: ADJCALLSTACKDOWN 8, 0, implicit-def dead $sp, implicit $sp72    ; CHECK-NEXT: $x0 = COPY [[COPY]]73    ; CHECK-NEXT: ADJCALLSTACKUP 8, 0, implicit-def dead $sp, implicit $sp74    ; CHECK-NEXT: ADJCALLSTACKDOWN 24, 0, implicit-def dead $sp, implicit $sp75    ; CHECK-NEXT: STRXui [[DEF5]], undef [[DEF]], 1 :: (store (s64) into stack + 8)76    ; CHECK-NEXT: ADJCALLSTACKUP 24, 0, implicit-def dead $sp, implicit $sp77    ; CHECK-NEXT: RET_ReallyLR78    %0:gpr64sp = IMPLICIT_DEF79    %1:gpr32 = IMPLICIT_DEF80    %2:gpr64common = IMPLICIT_DEF81    %3:gpr64 = COPY killed $x582    %4:gpr64 = COPY killed $x483    %5:gpr64 = COPY killed $x384    %6:gpr64 = COPY killed $x285    %7:gpr64 = COPY killed $x186    %8:gpr64 = COPY killed $x087    %9:gpr64 = IMPLICIT_DEF88    %10:gpr64 = IMPLICIT_DEF89    %11:gpr64 = SUBREG_TO_REG 0, killed undef %1, %subreg.sub_3290    ADJCALLSTACKDOWN 16, 0, implicit-def dead $sp, implicit $sp91    BL @_ZL9testScanfPKcjz, csr_darwin_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp92    ADJCALLSTACKUP 16, 0, implicit-def dead $sp, implicit $sp93    ADJCALLSTACKDOWN 8, 0, implicit-def dead $sp, implicit $sp94    STRXui %9, killed %0, 0 :: (store (s64) into stack)95    ADJCALLSTACKUP 8, 0, implicit-def dead $sp, implicit $sp96    STRWui undef %1, killed %2, 0 :: (store (s32))97    ADJCALLSTACKDOWN 8, 0, implicit-def dead $sp, implicit $sp98    STRXui killed %10, killed undef %0, 0 :: (store (s64) into stack)99    $x0 = COPY killed %8100    ADJCALLSTACKUP 8, 0, implicit-def dead $sp, implicit $sp101    ADJCALLSTACKDOWN 8, 0, implicit-def dead $sp, implicit $sp102    $x0 = COPY killed %7103    ADJCALLSTACKUP 8, 0, implicit-def dead $sp, implicit $sp104    ADJCALLSTACKDOWN 8, 0, implicit-def dead $sp, implicit $sp105    $x0 = COPY killed %6106    ADJCALLSTACKUP 8, 0, implicit-def dead $sp, implicit $sp107    ADJCALLSTACKDOWN 8, 0, implicit-def dead $sp, implicit $sp108    $x0 = COPY killed %5109    ADJCALLSTACKUP 8, 0, implicit-def dead $sp, implicit $sp110    ADJCALLSTACKDOWN 8, 0, implicit-def dead $sp, implicit $sp111    $x0 = COPY killed %4112    ADJCALLSTACKUP 8, 0, implicit-def dead $sp, implicit $sp113    ADJCALLSTACKDOWN 8, 0, implicit-def dead $sp, implicit $sp114    $x0 = COPY killed %3115    ADJCALLSTACKUP 8, 0, implicit-def dead $sp, implicit $sp116    ADJCALLSTACKDOWN 24, 0, implicit-def dead $sp, implicit $sp117    STRXui killed %11, undef %0, 1 :: (store (s64) into stack + 8)118    ADJCALLSTACKUP 24, 0, implicit-def dead $sp, implicit $sp119    RET_ReallyLR120 121...122