brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · b600070 Raw
44 lines · plain
1# RUN: llc -run-pass=twoaddressinstruction -mtriple=x86_64-- -o - %s -experimental-debug-variable-locations | FileCheck %s2#3# REQUIRES: x86-registered-target4#5# Test that a new instruction (LEA) is created when the two-addr add below is6# converted to three address; and that an appropriate substitution is created.7# Maybe at some point we'll normalise DBG_INSTR_REFs on output, but until then,8# lets not.9#10# CHECK:      debugValueSubstitutions:11# CHECK-NEXT:  - { srcinst: 1, srcop: 0, dstinst: 2, dstop: 0, subreg: 0 }12#13# CHECK:      LEA64_32r14# CHECK-SAME: debug-instr-number 215#16# CHECK:      DBG_INSTR_REF dbg-instr-ref(1, 0)17---18name:            test119alignment:       1620tracksRegLiveness: true21debugInstrRef: true22registers:23  - { id: 0, class: gr32 }24  - { id: 1, class: gr32 }25  - { id: 2, class: gr32 }26liveins:27  - { reg: '$edi', virtual-reg: '%0' }28frameInfo:29  maxAlignment:    130machineFunctionInfo: {}31body:             |32  bb.0:33    liveins: $edi34 35    %0:gr32 = COPY killed $edi36    %1:gr32 = SHL32ri killed %0, 5, implicit-def dead $eflags37    %2:gr32 = ADD32ri_DB killed %1, 3, implicit-def dead $eflags, debug-instr-number 138    DBG_INSTR_REF dbg-instr-ref(1, 0)39    $eax = COPY killed %240    RET 0, killed $eax41 42...43 44