You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

164 lines
6.0 KiB

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-unknown -stop-after \
# RUN: ppc-pre-emit-peephole %s -o - | FileCheck %s
---
name: testFoldRLWINM
tracksRegLiveness: true
body: |
bb.0.entry:
liveins: $r3
; CHECK-LABEL: name: testFoldRLWINM
; CHECK: liveins: $r3
; CHECK: renamable $r3 = RLWINM killed renamable $r3, 14, 0, 12, implicit-def $x3
; CHECK: BLR8 implicit $lr8, implicit $rm, implicit killed $x3
$r3 = RLWINM killed $r3, 27, 5, 31
dead renamable $r3 = RLWINM killed renamable $r3, 19, 0, 12, implicit-def $x3
BLR8 implicit $lr8, implicit $rm, implicit killed $x3
...
---
name: testFoldRLWINMSrcFullMask1
tracksRegLiveness: true
body: |
bb.0.entry:
liveins: $r3
; CHECK-LABEL: name: testFoldRLWINMSrcFullMask1
; CHECK: liveins: $r3
; CHECK: renamable $r3 = RLWINM killed renamable $r3, 14, 0, 12, implicit-def $x3
; CHECK: BLR8 implicit $lr8, implicit $rm, implicit killed $x3
$r3 = RLWINM killed $r3, 27, 0, 31
dead renamable $r3 = RLWINM killed renamable $r3, 19, 0, 12, implicit-def $x3
BLR8 implicit $lr8, implicit $rm, implicit killed $x3
...
---
name: testFoldRLWINMSrcFullMask2
tracksRegLiveness: true
body: |
bb.0.entry:
liveins: $r2, $r3
; CHECK-LABEL: name: testFoldRLWINMSrcFullMask2
; CHECK: liveins: $r2, $r3
; CHECK: renamable $r3 = RLWINM $r2, 14, 10, 1, implicit-def $x3
; CHECK: BLR8 implicit $lr8, implicit $rm, implicit killed $x3
$r3 = RLWINM killed $r2, 27, 10, 9
dead renamable $r3 = RLWINM killed renamable $r3, 19, 10, 1, implicit-def $x3
BLR8 implicit $lr8, implicit $rm, implicit killed $x3
...
---
name: testFoldRLWINMSrcWrapped
tracksRegLiveness: true
body: |
bb.0.entry:
liveins: $r3
; CHECK-LABEL: name: testFoldRLWINMSrcWrapped
; CHECK: liveins: $r3
; CHECK: renamable $r3 = RLWINM killed renamable $r3, 14, 11, 12, implicit-def $x3
; CHECK: BLR8 implicit $lr8, implicit $rm, implicit killed $x3
$r3 = RLWINM killed $r3, 27, 30, 10
dead renamable $r3 = RLWINM killed renamable $r3, 19, 0, 12, implicit-def $x3
BLR8 implicit $lr8, implicit $rm, implicit killed $x3
...
---
name: testFoldRLWINMUserWrapped
tracksRegLiveness: true
body: |
bb.0.entry:
liveins: $r3
; CHECK-LABEL: name: testFoldRLWINMUserWrapped
; CHECK: liveins: $r3
; CHECK: $r3 = RLWINM killed $r3, 10, 5, 31
; CHECK: renamable $r3 = RLWINM killed renamable $r3, 10, 30, 5, implicit-def $x3
; CHECK: BLR8 implicit $lr8, implicit $rm, implicit killed $x3
$r3 = RLWINM killed $r3, 10, 5, 31
dead renamable $r3 = RLWINM killed renamable $r3, 10, 30, 5, implicit-def $x3
BLR8 implicit $lr8, implicit $rm, implicit killed $x3
...
---
name: testFoldRLWINMResultWrapped
tracksRegLiveness: true
body: |
bb.0.entry:
liveins: $r3
; CHECK-LABEL: name: testFoldRLWINMResultWrapped
; CHECK: liveins: $r3
; CHECK: $r3 = RLWINM killed $r3, 10, 20, 10
; CHECK: renamable $r3 = RLWINM killed renamable $r3, 10, 0, 31, implicit-def $x3
; CHECK: BLR8 implicit $lr8, implicit $rm, implicit killed $x3
$r3 = RLWINM killed $r3, 10, 20, 10
dead renamable $r3 = RLWINM killed renamable $r3, 10, 0, 31, implicit-def $x3
BLR8 implicit $lr8, implicit $rm, implicit killed $x3
...
---
name: testFoldRLWINMToZero
tracksRegLiveness: true
body: |
bb.0.entry:
liveins: $r3
; CHECK-LABEL: name: testFoldRLWINMToZero
; CHECK: liveins: $r3
; CHECK: renamable $r3 = LI 0, implicit-def $x3
; CHECK: BLR8 implicit $lr8, implicit $rm, implicit killed $x3
$r3 = RLWINM killed $r3, 27, 5, 10
dead renamable $r3 = RLWINM killed renamable $r3, 8, 5, 10, implicit-def $x3
BLR8 implicit $lr8, implicit $rm, implicit killed $x3
...
---
name: testFoldRLWINM_recToZero
tracksRegLiveness: true
body: |
bb.0.entry:
liveins: $r3
; CHECK-LABEL: name: testFoldRLWINM_recToZero
; CHECK: liveins: $r3
; CHECK: dead renamable $r3 = ANDI_rec killed renamable $r3, 0, implicit-def $cr0
; CHECK: BLR8 implicit $lr8, implicit $rm, implicit killed $cr0
$r3 = RLWINM killed $r3, 27, 5, 10
dead renamable $r3 = RLWINM_rec killed renamable $r3, 8, 5, 10, implicit-def $cr0
BLR8 implicit $lr8, implicit $rm, implicit killed $cr0
...
---
name: testFoldRLWINMInvalidMask
tracksRegLiveness: true
body: |
bb.0.entry:
liveins: $r3
; CHECK-LABEL: name: testFoldRLWINMInvalidMask
; CHECK: liveins: $r3
; CHECK: $r3 = RLWINM killed $r3, 20, 5, 31
; CHECK: renamable $r3 = RLWINM killed renamable $r3, 19, 10, 20, implicit-def $x3
; CHECK: BLR8 implicit $lr8, implicit $rm, implicit killed $x3
$r3 = RLWINM killed $r3, 20, 5, 31
dead renamable $r3 = RLWINM killed renamable $r3, 19, 10, 20, implicit-def $x3
BLR8 implicit $lr8, implicit $rm, implicit killed $x3
...
---
name: testFoldRLWINCanNotBeDeleted
tracksRegLiveness: true
body: |
bb.0.entry:
liveins: $r2, $r3
; CHECK-LABEL: name: testFoldRLWINCanNotBeDeleted
; CHECK: liveins: $r2, $r3
; CHECK: $r3 = RLWINM_rec $r2, 27, 5, 10, implicit-def dead $cr0
; CHECK: dead renamable $r3 = ANDI_rec $r2, 0, implicit-def $cr0
; CHECK: BLR8 implicit $lr8, implicit $rm, implicit killed $cr0
$r3 = RLWINM_rec $r2, 27, 5, 10, implicit-def $cr0
dead renamable $r3 = RLWINM_rec killed renamable $r3, 8, 5, 10, implicit-def $cr0
BLR8 implicit $lr8, implicit $rm, implicit killed $cr0
...
---
name: testCanNotFoldRLWINM
tracksRegLiveness: true
body: |
bb.0.entry:
liveins: $r3
; CHECK-LABEL: name: testCanNotFoldRLWINM
; CHECK: liveins: $r3
; CHECK: $r3 = RLWINM_rec killed $r3, 27, 5, 10, implicit-def dead $cr0
; CHECK: dead renamable $r3 = RLWINM_rec killed renamable $r3, 8, 5, 10, implicit-def $cr0
; CHECK: BLR8 implicit $lr8, implicit $rm, implicit killed $cr0
$r3 = RLWINM_rec $r3, 27, 5, 10, implicit-def $cr0
dead renamable $r3 = RLWINM_rec killed renamable $r3, 8, 5, 10, implicit-def $cr0
BLR8 implicit $lr8, implicit $rm, implicit killed $cr0
...