1 # RUN: llc -run-pass x86-fixup-LEAs -mtriple=i386 -verify-machineinstrs -mcpu=corei7-avx -o - %s | FileCheck %s
3 # Test that several LEA => ADD transforms get substitutions applied to them,
4 # for corner cases that we can only hit with -mtriple=i386.
7 # CHECK: name: test2add_32
9 tracksRegLiveness: true
13 # CHECK: debugValueSubstitutions:
14 # CHECK-NAME: - { srcinst: 1, srcop: 0, dstinst: 2, dstop: 0, subreg: 0 }
19 ; CHECK: $eax = ADD32ri8 {{.*}} debug-instr-number 2
20 $eax = LEA32r killed $eax, 1, killed $ebp, -5, $noreg, debug-instr-number 1
25 name: test1mov1add_ebp_32
26 # CHECK-LABEL: name: test1mov1add_ebp_32
28 tracksRegLiveness: true
33 # CHECK: debugValueSubstitutions:
34 # CHECK-NEXT: - { srcinst: 1, srcop: 0, dstinst: 2, dstop: 0, subreg: 0 }
37 liveins: $eax, $ebp, $ebx
39 ; CHECK: $ebx = ADD32rr {{.*}} debug-instr-number 2
40 $ebx = LEA32r killed $ebp, 1, $ebp, 0, $noreg, debug-instr-number 1
45 name: testleaadd_ebp_index_32
46 # CHECK-LABEL: name: testleaadd_ebp_index_32
48 tracksRegLiveness: true
52 # CHECK: debugValueSubstitutions:
53 # CHECK-NEXT: - { srcinst: 1, srcop: 0, dstinst: 2, dstop: 0, subreg: 0 }
56 liveins: $eax, $ebp, $ebx
58 ; CHECK: $ebx = ADD32rr {{.*}} debug-instr-number 2
59 $ebx = LEA32r $ebp, 1, $ebp, 5, $noreg, debug-instr-number 1