forked from OSchip/llvm-project
32 lines
768 B
YAML
32 lines
768 B
YAML
# RUN: llc -mtriple=aarch64-- -run-pass=simple-register-coalescing %s -o - | FileCheck %s
|
|
--- |
|
|
define void @func() { ret void }
|
|
...
|
|
---
|
|
# Check that we eliminate copies to/from constant physregs regardless of
|
|
# "interfering" reads/writes.
|
|
# CHECK: name: func
|
|
# CHECK-NOT: COPY
|
|
# CHECK: STRWui %wzr, %x1
|
|
# CHECK-NOT: COPY
|
|
# CHECK: STRXui %xzr, %x1
|
|
# CHECK: %wzr = SUBSWri %w1, 0, 0
|
|
name: func
|
|
registers:
|
|
- { id: 0, class: gpr32 }
|
|
- { id: 1, class: gpr64 }
|
|
- { id: 2, class: gpr32 }
|
|
body: |
|
|
bb.0:
|
|
%0 = COPY %wzr
|
|
dead %wzr = SUBSWri %w1, 0, 0, implicit-def %nzcv
|
|
STRWui %0, %x1, 0
|
|
|
|
%1 = COPY %xzr
|
|
dead %wzr = SUBSWri %w1, 0, 0, implicit-def %nzcv
|
|
STRXui %1, %x1, 0
|
|
|
|
%2 = SUBSWri %w1, 0, 0, implicit-def %nzcv
|
|
%wzr = COPY %2
|
|
...
|