brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.9 KiB · 5bc3bcc Raw
174 lines · plain
1# REQUIRES: asserts2# RUN: llc -mtriple=hexagon -run-pass hexagon-cext-opt %s -o - | FileCheck %s3 4# Check that the HexagonConstantExtenders pass does not assert when block5# addresses from different functions are used6# CHECK-LABEL: name: wibble7# CHECK: A2_tfrsi blockaddress(@baz8# CHECK: A2_tfrsi blockaddress(@wibble9 10--- |11  target triple = "hexagon"12 13  define dso_local void @baz() {14  bb:15    br label %bb116 17  bb1:                                              ; preds = %bb18    %call = tail call fastcc i32 @wibble(i32 poison)19    ret void20  }21 22  define internal fastcc i32 @wibble(i32 %arg) {23  bb:24    %call = tail call i32 @eggs(i32 noundef ptrtoint (ptr blockaddress(@baz, %bb1) to i32))25    br label %bb126 27  bb1:                                              ; preds = %bb28    tail call void @baz.1(i32 noundef ptrtoint (ptr blockaddress(@wibble, %bb1) to i32))29    ret i32 %call30  }31 32  declare i32 @eggs(i32 noundef) local_unnamed_addr33 34  declare void @baz.1(i32 noundef) local_unnamed_addr35 36...37---38name:            baz39alignment:       1640exposesReturnsTwice: false41legalized:       false42regBankSelected: false43selected:        false44failedISel:      false45tracksRegLiveness: true46hasWinCFI:       false47callsEHReturn:   false48callsUnwindInit: false49hasEHContTarget: false50hasEHScopes:     false51hasEHFunclets:   false52isOutlined:      false53debugInstrRef:   false54failsVerification: false55tracksDebugUserValues: false56registers:57  - { id: 0, class: intregs, preferred-register: '' }58liveins:         []59frameInfo:60  isFrameAddressTaken: false61  isReturnAddressTaken: false62  hasStackMap:     false63  hasPatchPoint:   false64  stackSize:       065  offsetAdjustment: 066  maxAlignment:    167  adjustsStack:    false68  hasCalls:        false69  stackProtector:  ''70  functionContext: ''71  maxCallFrameSize: 429496729572  cvBytesOfCalleeSavedRegisters: 073  hasOpaqueSPAdjustment: false74  hasVAStart:      false75  hasMustTailInVarArgFunc: false76  hasTailCall:     true77  isCalleeSavedInfoValid: false78  localFrameSize:  079  savePoint:       []80  restorePoint:    []81fixedStack:      []82stack:           []83entry_values:    []84callSites:       []85debugValueSubstitutions: []86constants:       []87machineFunctionInfo: {}88body:             |89  bb.0.bb:90    successors: %bb.1(0x80000000)91 92  bb.1.bb1 (ir-block-address-taken %ir-block.bb1):93    %0:intregs = IMPLICIT_DEF94    $r0 = COPY %095    PS_tailcall_i @wibble, hexagoncsr, implicit $r096 97...98---99name:            wibble100alignment:       16101exposesReturnsTwice: false102legalized:       false103regBankSelected: false104selected:        false105failedISel:      false106tracksRegLiveness: true107hasWinCFI:       false108callsEHReturn:   false109callsUnwindInit: false110hasEHContTarget: false111hasEHScopes:     false112hasEHFunclets:   false113isOutlined:      false114debugInstrRef:   false115failsVerification: false116tracksDebugUserValues: false117registers:118  - { id: 0, class: intregs, preferred-register: '' }119  - { id: 1, class: intregs, preferred-register: '' }120  - { id: 2, class: intregs, preferred-register: '' }121  - { id: 3, class: intregs, preferred-register: '' }122  - { id: 4, class: intregs, preferred-register: '' }123liveins:         []124frameInfo:125  isFrameAddressTaken: false126  isReturnAddressTaken: false127  hasStackMap:     false128  hasPatchPoint:   false129  stackSize:       0130  offsetAdjustment: 0131  maxAlignment:    1132  adjustsStack:    true133  hasCalls:        true134  stackProtector:  ''135  functionContext: ''136  maxCallFrameSize: 4294967295137  cvBytesOfCalleeSavedRegisters: 0138  hasOpaqueSPAdjustment: false139  hasVAStart:      false140  hasMustTailInVarArgFunc: false141  hasTailCall:     false142  isCalleeSavedInfoValid: false143  localFrameSize:  0144  savePoint:       []145  restorePoint:    []146fixedStack:      []147stack:           []148entry_values:    []149callSites:       []150debugValueSubstitutions: []151constants:       []152machineFunctionInfo: {}153body:             |154  bb.0.bb:155    successors: %bb.1(0x80000000)156 157    %2:intregs = A2_tfrsi blockaddress(@baz, %ir-block.bb1)158    ADJCALLSTACKDOWN 0, 0, implicit-def $r29, implicit-def dead $r30, implicit $r31, implicit $r30, implicit $r29159    $r0 = COPY %2160    J2_call @eggs, hexagoncsr, implicit-def dead $pc, implicit-def dead $r31, implicit $r29, implicit $r0, implicit-def $r29, implicit-def $r0161    ADJCALLSTACKUP 0, 0, implicit-def dead $r29, implicit-def dead $r30, implicit-def dead $r31, implicit $r29162    %3:intregs = COPY $r0163 164  bb.1.bb1 (ir-block-address-taken %ir-block.bb1):165    %4:intregs = A2_tfrsi blockaddress(@wibble, %ir-block.bb1)166    ADJCALLSTACKDOWN 0, 0, implicit-def $r29, implicit-def dead $r30, implicit $r31, implicit $r30, implicit $r29167    $r0 = COPY %4168    J2_call @baz.1, hexagoncsr, implicit-def dead $pc, implicit-def dead $r31, implicit $r29, implicit $r0, implicit-def $r29169    ADJCALLSTACKUP 0, 0, implicit-def dead $r29, implicit-def dead $r30, implicit-def dead $r31, implicit $r29170    $r0 = COPY %3171    PS_jmpret $r31, implicit-def dead $pc, implicit $r0172 173...174