brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.2 KiB · 8f7dae7 Raw
144 lines · plain
1# RUN: llc -march=hexagon -run-pass=hexagon-rdf-opt -hexagon-rdf-dump -verify-machineinstrs -o /dev/null %s 2>&1 | FileCheck %s2 3# Check that RDF graph has a phi node for R28 register in bb.3 and bb.44# R28 is clobbered by memcpy call. The clobbering def must be present in bb.4's IDF5# This phi node should prevent $r27 from being replaced by $r28 by RDF copy propagation6 7#CHECK-LABEL: Starting copy propagation on: foo8 9#CHECK-LABEL: --- %bb.3 ---10#CHECK: p{{[0-9]+}}: phi [+d{{[0-9]+}}<R28>11 12#CHECK-LABEL: --- %bb.4 ---13#CHECK: p{{[0-9]+}}: phi [+d{{[0-9]+}}<R28>14 15#CHECK-LABEL: After Hexagon RDF optimizations16#CHECK-LABEL: bb.3:17#CHECK: renamable $r0 = A2_add renamable $r2718 19--- |20  define internal fastcc void @foo() unnamed_addr {21  entry:22    ret void23  }24 25  declare void @llvm.memcpy.p0.p0.i32(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i32, i1 immarg)26 27---28name:            foo29alignment:       1630exposesReturnsTwice: false31legalized:       false32regBankSelected: false33selected:        false34failedISel:      false35tracksRegLiveness: true36hasWinCFI:       false37callsEHReturn:   false38callsUnwindInit: false39hasEHContTarget: false40hasEHScopes:     false41hasEHFunclets:   false42isOutlined:      false43debugInstrRef:   false44failsVerification: false45tracksDebugUserValues: true46registers:       []47liveins:48  - { reg: '$d0', virtual-reg: '' }49  - { reg: '$d3', virtual-reg: '' }50  - { reg: '$r23', virtual-reg: '' }51frameInfo:52  isFrameAddressTaken: false53  isReturnAddressTaken: false54  hasStackMap:     false55  hasPatchPoint:   false56  stackSize:       057  offsetAdjustment: 058  maxAlignment:    859  adjustsStack:    true60  hasCalls:        true61  stackProtector:  ''62  functionContext: ''63  maxCallFrameSize: 429496729564  cvBytesOfCalleeSavedRegisters: 065  hasOpaqueSPAdjustment: false66  hasVAStart:      false67  hasMustTailInVarArgFunc: false68  hasTailCall:     false69  isCalleeSavedInfoValid: false70  localFrameSize:  071  savePoint:       []72  restorePoint:    []73fixedStack:74  - { id: 0, type: default, offset: 40, size: 8, alignment: 8, stack-id: default,75      isImmutable: true, isAliased: false, callee-saved-register: '', callee-saved-restored: true,76      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }77stack:78  - { id: 0, name: '', type: spill-slot, offset: 0, size: 8, alignment: 8,79      stack-id: default, callee-saved-register: '', callee-saved-restored: true,80      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }81  - { id: 1, name: '', type: spill-slot, offset: 0, size: 8, alignment: 8,82      stack-id: default, callee-saved-register: '', callee-saved-restored: true,83      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }84  - { id: 2, name: '', type: spill-slot, offset: 0, size: 8, alignment: 8,85      stack-id: default, callee-saved-register: '', callee-saved-restored: true,86      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }87  - { id: 3, name: '', type: spill-slot, offset: 0, size: 8, alignment: 8,88      stack-id: default, callee-saved-register: '', callee-saved-restored: true,89      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }90entry_values:    []91callSites:       []92debugValueSubstitutions: []93constants:       []94machineFunctionInfo: {}95body:             |96  bb.0.entry:97    successors: %bb.198    liveins: $d0, $d3, $r2399 100    J2_jump %bb.1, implicit-def dead $pc101 102  bb.1:103    successors: %bb.2104    liveins: $d0:0x0000000000000003, $d3:0x0000000000000003, $r23105 106    renamable $r28 = L2_loadri_io %fixed-stack.0, 0 :: (load (s32) from %fixed-stack.0)107    renamable $r27 = COPY killed renamable $r28108 109  bb.2:110    successors: %bb.3111    liveins: $d0:0x0000000000000003, $d3:0x0000000000000003, $r23, $r27112 113    renamable $d10 = L2_loadrd_io %stack.0, 0 :: (load (s64) from %stack.0)114    renamable $d11 = L2_loadrd_io %stack.1, 0 :: (load (s64) from %stack.1)115 116  bb.3:117    successors: %bb.4, %bb.3118    liveins: $d0:0x0000000000000003, $d3:0x0000000000000003, $d10:0x0000000000000003, $d11:0x0000000000000002, $r23, $r27119 120    ADJCALLSTACKDOWN 0, 0, implicit-def $r29, implicit-def dead $r30, implicit $r31, implicit $r30, implicit $r29121    renamable $r1 = A2_add renamable $r23, killed renamable $r0122    $r2 = COPY renamable $r22123    renamable $r0 = A2_add renamable $r27, killed renamable $r6124    J2_call &memcpy, hexagoncsr, implicit-def dead $pc, implicit-def dead $r31, implicit $r29, implicit $r0, implicit $r1, implicit $r2, implicit-def $r29, implicit-def dead $r0125    renamable $p0 = C2_cmpgtp renamable $d11, renamable $d10126    ADJCALLSTACKUP 0, 0, implicit-def dead $r29, implicit-def dead $r30, implicit-def dead $r31, implicit $r29127    J2_jumpt killed renamable $p0, %bb.3, implicit-def dead $pc128    J2_jump %bb.4, implicit-def dead $pc129 130  bb.4:131    successors: %bb.5, %bb.2132    liveins: $d10:0x0000000000000003, $d11:0x0000000000000002, $r23, $r27133 134    renamable $d0 = L2_loadrd_io %stack.2, 0 :: (load (s64) from %stack.2)135    renamable $d3 = L2_loadrd_io %stack.3, 0 :: (load (s64) from %stack.3)136    renamable $p0 = C2_cmpgtp killed renamable $d0, killed renamable $d3137    J2_jumpt killed renamable $p0, %bb.2, implicit-def dead $pc138    J2_jump %bb.5, implicit-def dead $pc139 140  bb.5:141    PS_jmpret $r31, implicit-def dead $pc142 143...144