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
14 # CHECK: debugValueSubstitutions:
15 # CHECK-NAME: - { srcinst: 1, srcop: 0, dstinst: 2, dstop: 0, subreg: 0 }
20 ; CHECK: $eax = ADD32ri {{.*}} debug-instr-number 2
21 $eax = LEA32r killed $eax, 1, killed $ebp, -5, $noreg, debug-instr-number 1
26 name: testleais_ebp_32
27 # CHECK-LABEL: name: testleais_ebp_32
29 tracksRegLiveness: true
35 # CHECK: debugValueSubstitutions:
36 # CHECK-NEXT: - { srcinst: 1, srcop: 0, dstinst: 2, dstop: 0, subreg: 0 }
39 liveins: $eax, $ebp, $ebx
41 ; CHECK: $ebx = LEA32r $noreg, 2, $ebp, 0, $noreg, debug-instr-number 2
42 $ebx = LEA32r killed $ebp, 1, $ebp, 0, $noreg, debug-instr-number 1
47 name: testleabid_ebp_leaisd_32
48 # CHECK-LABEL: name: testleabid_ebp_leaisd_32
50 tracksRegLiveness: true
55 # CHECK: debugValueSubstitutions:
56 # CHECK-NEXT: - { srcinst: 1, srcop: 0, dstinst: 2, dstop: 0, subreg: 0 }
59 liveins: $eax, $ebp, $ebx
61 ; CHECK: $ebx = LEA32r $noreg, 2, $ebp, 5, $noreg, debug-instr-number 2
62 $ebx = LEA32r $ebp, 1, $ebp, 5, $noreg, debug-instr-number 1