mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-08 12:08:46 +00:00
c7da15d985
Before this patch, the following stores in `merge_fail` would fail to be merged, while they would get merged in `merge_ok`: ``` void use(unsigned long long *); void merge_fail(unsigned key, unsigned index) { unsigned long long args[8]; args[0] = key; args[1] = index; use(args); } void merge_ok(unsigned long long *dst, unsigned a, unsigned b) { dst[0] = a; dst[1] = b; } ``` The reason is that `getMemOpBaseImmOfs` would return false for FI base operands. This adds support for this. Differential Revision: https://reviews.llvm.org/D54847 llvm-svn: 347747
28 lines
687 B
YAML
28 lines
687 B
YAML
#RUN: llc -mtriple=aarch64-- -mcpu=cyclone -run-pass machine-scheduler -o - %s | FileCheck %s
|
|
...
|
|
---
|
|
name: merge_stack
|
|
# CHECK-LABEL: name: merge_stack
|
|
tracksRegLiveness: true
|
|
stack:
|
|
- { id: 0, size: 64, alignment: 8 }
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0, $w1
|
|
|
|
%0:gpr32 = COPY $w0
|
|
%1:gpr32 = COPY $w1
|
|
undef %3.sub_32:gpr64 = ORRWrs $wzr, %0, 0
|
|
STRXui %3, %stack.0, 0 :: (store 8)
|
|
undef %5.sub_32:gpr64 = ORRWrs $wzr, %1, 0
|
|
STRXui %5, %stack.0, 1 :: (store 8)
|
|
RET_ReallyLR
|
|
|
|
; CHECK: COPY
|
|
; CHECK-NEXT: COPY
|
|
; CHECK-NEXT: ORRWrs
|
|
; CHECK-NEXT: ORRWrs
|
|
; CHECK-NEXT: STRXui
|
|
; CHECK-NEXT: STRXui
|
|
; CHECK-NEXT: RET
|