brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 5e088d3 Raw
66 lines · plain
1# RUN: llc -run-pass x86-fixup-LEAs -mtriple=i386 -verify-machineinstrs -mcpu=corei7-avx -o - %s | FileCheck %s2#3# Test that several LEA => ADD transforms get substitutions applied to them,4# for corner cases that we can only hit with -mtriple=i386.5---6name:            test2add_327# CHECK: name: test2add_328alignment:       169tracksRegLiveness: true10debugInstrRef: true11liveins:12  - { reg: '$eax' }13  - { reg: '$ebp' }14# CHECK:       debugValueSubstitutions:15# CHECK-NAME:  - { srcinst: 1, srcop: 0, dstinst: 2, dstop: 0, subreg: 0 }16body:             |17  bb.0:18    liveins: $eax, $ebp19 20    ; CHECK: $eax = ADD32ri {{.*}} debug-instr-number 221    $eax = LEA32r killed $eax, 1, killed $ebp, -5, $noreg, debug-instr-number 122    RET64 $eax23 24...25---26name:            testleais_ebp_3227# CHECK-LABEL: name: testleais_ebp_3228alignment:       1629tracksRegLiveness: true30debugInstrRef: true31liveins:32  - { reg: '$eax' }33  - { reg: '$ebx' }34  - { reg: '$ebp' }35# CHECK:       debugValueSubstitutions:36# CHECK-NEXT:  - { srcinst: 1, srcop: 0, dstinst: 2, dstop: 0, subreg: 0 }37body:             |38  bb.0:39    liveins: $eax, $ebp, $ebx40 41    ; CHECK: $ebx = LEA32r $noreg, 2, $ebp, 0, $noreg, debug-instr-number 242    $ebx = LEA32r killed $ebp, 1, $ebp, 0, $noreg, debug-instr-number 143    RET64 $ebx44 45...46---47name:            testleabid_ebp_leaisd_3248# CHECK-LABEL: name: testleabid_ebp_leaisd_3249alignment:       1650tracksRegLiveness: true51debugInstrRef: true52liveins:53  - { reg: '$ebx' }54  - { reg: '$ebp' }55# CHECK:       debugValueSubstitutions:56# CHECK-NEXT:  - { srcinst: 1, srcop: 0, dstinst: 2, dstop: 0, subreg: 0 }57body:             |58  bb.0:59    liveins: $eax, $ebp, $ebx60 61    ; CHECK: $ebx = LEA32r $noreg, 2, $ebp, 5, $noreg, debug-instr-number 262    $ebx = LEA32r $ebp, 1, $ebp, 5, $noreg, debug-instr-number 163    RET64 $ebx64 65...66