1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 04:52:54 +02:00
llvm-mirror/test/CodeGen/MIR/ARM/imm-peephole-thumb.mir
Quentin Colombet 46cdf3f128 [MIR] Print on the given output instead of stderr.
Currently the MIR framework prints all its outputs (errors and actual
representation) on stderr.

This patch fixes that by printing the regular output in the output
specified with -o.

Differential Revision: http://reviews.llvm.org/D22251

llvm-svn: 275314
2016-07-13 20:36:03 +00:00

60 lines
1.4 KiB
YAML

# RUN: llc -run-pass=peephole-opt %s -o - | FileCheck %s
# CHECK: [[IN:%.*]] = COPY %r0
# CHECK: [[SUM1TMP:%.*]] = t2ADDri [[IN]], 25600
# CHECK: [[SUM1:%.*]] = t2ADDri killed [[SUM1TMP]], 133
# CHECK: [[SUM2TMP:%.*]] = t2SUBri [[IN]], 25600
# CHECK: [[SUM2:%.*]] = t2SUBri killed [[SUM2TMP]], 133
# CHECK: [[SUM3TMP:%.*]] = t2SUBri [[IN]], 25600
# CHECK: [[SUM3:%.*]] = t2SUBri killed [[SUM3TMP]], 133
# CHECK: [[SUM4TMP:%.*]] = t2ADDri killed [[IN]], 25600
# CHECK: [[SUM4:%.*]] = t2ADDri killed [[SUM4TMP]], 133
--- |
target datalayout = "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
target triple = "thumbv7-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:
- { reg: '%r0', virtual-reg: '%0' }
body: |
bb.0 (%ir-block.0):
liveins: %r0
%0 = COPY %r0
%1 = t2MOVi32imm -25733
%2 = t2SUBrr %0, killed %1, 14, _, _
%3 = t2MOVi32imm 25733
%4 = t2SUBrr %0, killed %3, 14, _, _
%5 = t2MOVi32imm -25733
%6= t2ADDrr %0, killed %5, 14, _, _
%7 = t2MOVi32imm 25733
%8 = t2ADDrr killed %0, killed %7, 14, _, _
%r0 = COPY killed %8
tBX_RET 14, _, implicit %r0
...