1 # RUN: llc -run-pass=twoaddressinstruction -mtriple=x86_64-- -o - %s -experimental-debug-variable-locations | FileCheck %s
3 # REQUIRES: x86-registered-target
5 # Test that a new instruction (LEA) is created when the two-addr add below is
6 # 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,
10 # CHECK: debugValueSubstitutions:
11 # CHECK-NEXT: - { srcinst: 1, srcop: 0, dstinst: 2, dstop: 0, subreg: 0 }
14 # CHECK-SAME: debug-instr-number 2
16 # CHECK: DBG_INSTR_REF 1, 0
20 tracksRegLiveness: true
22 - { id: 0, class: gr32 }
23 - { id: 1, class: gr32 }
24 - { id: 2, class: gr32 }
26 - { reg: '$edi', virtual-reg: '%0' }
29 machineFunctionInfo: {}
34 %0:gr32 = COPY killed $edi
35 %1:gr32 = SHL32ri killed %0, 5, implicit-def dead $eflags
36 %2:gr32 = ADD32ri8_DB killed %1, 3, implicit-def dead $eflags, debug-instr-number 1