Home | History | Annotate | Download | only in ARM
      1 # RUN: llc -run-pass=peephole-opt %s -o - | FileCheck %s
      2 
      3 # CHECK: [[IN:%.*]] = COPY %r0
      4 # CHECK: [[SUM1TMP:%.*]] = ADDri [[IN]], 133
      5 # CHECK: [[SUM1:%.*]] = ADDri killed [[SUM1TMP]], 25600
      6 
      7 # CHECK: [[SUM2TMP:%.*]] = SUBri [[IN]], 133
      8 # CHECK: [[SUM2:%.*]] = SUBri killed [[SUM2TMP]], 25600
      9 
     10 # CHECK: [[SUM3TMP:%.*]] = SUBri [[IN]], 133
     11 # CHECK: [[SUM3:%.*]] = SUBri killed [[SUM3TMP]], 25600
     12 
     13 # CHECK: [[SUM4TMP:%.*]] = ADDri killed [[IN]], 133
     14 # CHECK: [[SUM4:%.*]] = ADDri killed [[SUM4TMP]], 25600
     15 
     16 
     17 --- |
     18   target datalayout = "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
     19   target triple = "armv7-apple-ios"
     20 
     21   define i32 @foo(i32 %in) {
     22     ret i32 undef
     23   }
     24 ...
     25 ---
     26 name:            foo
     27 registers:
     28   - { id: 0, class: gprnopc }
     29   - { id: 1, class: rgpr }
     30   - { id: 2, class: rgpr }
     31   - { id: 3, class: rgpr }
     32   - { id: 4, class: rgpr }
     33   - { id: 5, class: rgpr }
     34   - { id: 6, class: rgpr }
     35   - { id: 7, class: rgpr }
     36   - { id: 8, class: rgpr }
     37 liveins:
     38   - { reg: '%r0', virtual-reg: '%0' }
     39 body:             |
     40   bb.0 (%ir-block.0):
     41     liveins: %r0
     42 
     43     %0 = COPY %r0
     44     %1 = MOVi32imm -25733
     45     %2 = SUBrr %0, killed %1, 14, _, _
     46 
     47     %3 = MOVi32imm 25733
     48     %4 = SUBrr %0, killed %3, 14, _, _
     49 
     50     %5 = MOVi32imm -25733
     51     %6 = ADDrr %0, killed %5, 14, _, _
     52 
     53     %7 = MOVi32imm 25733
     54     %8 = ADDrr killed %0, killed %7, 14, _, _
     55 
     56     %r0 = COPY killed %8
     57     BX_RET 14, _, implicit %r0
     58 
     59 ...
     60 
     61