• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -verify-machineinstrs \
2# RUN:   -run-pass ppc-mi-peepholes -ppc-convert-rr-to-ri %s -o - | FileCheck %s
3
4---
5name: foldNewDformStore
6# CHECK: name: foldNewDformStore
7tracksRegLiveness: true
8body:             |
9  bb.0.entry:
10    liveins: $x3
11
12    %0:g8rc_and_g8rc_nox0 = COPY $x3
13    %1:g8rc_and_g8rc_nox0 = ADDI8 %0:g8rc_and_g8rc_nox0, 144
14    %2:g8rc = LI8 0
15    ; CHECK: STD killed %2, 160, %0
16    STD killed %2:g8rc, 16, %1:g8rc_and_g8rc_nox0
17    BLR8 implicit $lr8, implicit $rm
18...
19---
20name: foldNewDformStoreAlignNotMatch
21# CHECK: name: foldNewDformStoreAlignNotMatch
22tracksRegLiveness: true
23body:             |
24  bb.0.entry:
25    liveins: $x3
26
27    %0:g8rc_and_g8rc_nox0 = COPY $x3
28    %1:g8rc_and_g8rc_nox0 = ADDI8 %0:g8rc_and_g8rc_nox0, 141
29    %2:g8rc = LI8 0
30    ; CHECK: STD killed %2, 16, %1
31    STD killed %2:g8rc, 16, %1:g8rc_and_g8rc_nox0
32    BLR8 implicit $lr8, implicit $rm
33...
34---
35name: foldNewDformStoreKilledFlag
36# CHECK: name: foldNewDformStoreKilledFlag
37tracksRegLiveness: true
38body:             |
39  bb.0.entry:
40    liveins: $x3
41
42    %0:g8rc_and_g8rc_nox0 = COPY $x3
43    %1:g8rc_and_g8rc_nox0 = ADDI8 %0:g8rc_and_g8rc_nox0, 144
44    %2:g8rc = LI8 0
45    ; CHECK: STD %1, 0, %0
46    STD %1:g8rc_and_g8rc_nox0, 0, killed %0:g8rc_and_g8rc_nox0
47    ; CHECK: STD killed %2, 160, killed %0
48    STD killed %2:g8rc, 16, %1:g8rc_and_g8rc_nox0
49    BLR8 implicit $lr8, implicit $rm
50...
51---
52name: foldNewDformPreferLIOperand
53# CHECK: name: foldNewDformPreferLIOperand
54tracksRegLiveness: true
55body:             |
56  bb.0.entry:
57  liveins: $x3
58  %0:g8rc_and_g8rc_nox0 = COPY $x3
59  %1:g8rc = ADDI8 %0:g8rc_and_g8rc_nox0, 1
60  %2:g8rc = LI8 1
61  ; CHECK: SUBFIC8 killed %1, 1, implicit-def $carry
62  %3:g8rc = SUBFC8 killed %1:g8rc, %2:g8rc, implicit-def $carry
63  %4:g8rc = SUBFE8 %2:g8rc, %2:g8rc, implicit-def dead $carry, implicit $carry
64  %5:g8rc = NEG8 killed %4:g8rc
65  $x3 = COPY %5:g8rc
66  BLR8 implicit $lr8, implicit $rm, implicit $x3
67...
68