2016-07-14 04:36:03 +08:00
|
|
|
# RUN: llc -run-pass=peephole-opt %s -o - | FileCheck %s
|
2016-05-03 02:30:08 +08:00
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
# CHECK: [[IN:%.*]]:gprnopc = COPY $r0
|
2017-10-25 02:04:54 +08:00
|
|
|
# CHECK: [[SUM1TMP:%.*]]:rgpr = ADDri [[IN]], 133
|
|
|
|
# CHECK: [[SUM1:%.*]]:rgpr = ADDri killed [[SUM1TMP]], 25600
|
2016-05-03 02:30:08 +08:00
|
|
|
|
2017-10-25 02:04:54 +08:00
|
|
|
# CHECK: [[SUM2TMP:%.*]]:rgpr = SUBri [[IN]], 133
|
|
|
|
# CHECK: [[SUM2:%.*]]:rgpr = SUBri killed [[SUM2TMP]], 25600
|
2016-05-03 02:30:08 +08:00
|
|
|
|
2017-10-25 02:04:54 +08:00
|
|
|
# CHECK: [[SUM3TMP:%.*]]:rgpr = SUBri [[IN]], 133
|
|
|
|
# CHECK: [[SUM3:%.*]]:rgpr = SUBri killed [[SUM3TMP]], 25600
|
2016-05-03 02:30:08 +08:00
|
|
|
|
2017-10-25 02:04:54 +08:00
|
|
|
# CHECK: [[SUM4TMP:%.*]]:rgpr = ADDri killed [[IN]], 133
|
|
|
|
# CHECK: [[SUM4:%.*]]:rgpr = ADDri killed [[SUM4TMP]], 25600
|
2016-05-03 02:30:08 +08:00
|
|
|
|
|
|
|
|
|
|
|
--- |
|
|
|
|
target datalayout = "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
|
|
|
|
target triple = "armv7-apple-ios"
|
|
|
|
|
|
|
|
define i32 @foo(i32 %in) {
|
|
|
|
ret i32 undef
|
|
|
|
}
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: foo
|
|
|
|
registers:
|
|
|
|
- { id: 0, class: gprnopc }
|
|
|
|
- { id: 1, class: rgpr }
|
|
|
|
- { id: 2, class: rgpr }
|
|
|
|
- { id: 3, class: rgpr }
|
|
|
|
- { id: 4, class: rgpr }
|
|
|
|
- { id: 5, class: rgpr }
|
|
|
|
- { id: 6, class: rgpr }
|
|
|
|
- { id: 7, class: rgpr }
|
|
|
|
- { id: 8, class: rgpr }
|
|
|
|
liveins:
|
2018-02-01 06:04:26 +08:00
|
|
|
- { reg: '$r0', virtual-reg: '%0' }
|
2016-05-03 02:30:08 +08:00
|
|
|
body: |
|
|
|
|
bb.0 (%ir-block.0):
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $r0
|
2016-05-03 02:30:08 +08:00
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
%0 = COPY $r0
|
2016-05-03 02:30:08 +08:00
|
|
|
%1 = MOVi32imm -25733
|
2018-02-01 06:04:26 +08:00
|
|
|
%2 = SUBrr %0, killed %1, 14, $noreg, $noreg
|
2016-05-03 02:30:08 +08:00
|
|
|
|
|
|
|
%3 = MOVi32imm 25733
|
2018-02-01 06:04:26 +08:00
|
|
|
%4 = SUBrr %0, killed %3, 14, $noreg, $noreg
|
2016-05-03 02:30:08 +08:00
|
|
|
|
|
|
|
%5 = MOVi32imm -25733
|
2018-02-01 06:04:26 +08:00
|
|
|
%6 = ADDrr %0, killed %5, 14, $noreg, $noreg
|
2016-05-03 02:30:08 +08:00
|
|
|
|
|
|
|
%7 = MOVi32imm 25733
|
2018-02-01 06:04:26 +08:00
|
|
|
%8 = ADDrr killed %0, killed %7, 14, $noreg, $noreg
|
2016-05-03 02:30:08 +08:00
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
$r0 = COPY killed %8
|
|
|
|
BX_RET 14, $noreg, implicit $r0
|
2016-05-03 02:30:08 +08:00
|
|
|
|
|
|
|
...
|