1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/CodeGen/AArch64/ldst-opt-non-imm-offset.mir
Matt Arsenault cc12b285b6 CodeGen: Print/parse LLTs in MachineMemOperands
This will currently accept the old number of bytes syntax, and convert
it to a scalar. This should be removed in the near future (I think I
converted all of the tests already, but likely missed a few).

Not sure what the exact syntax and policy should be. We can continue
printing the number of bytes for non-generic instructions to avoid
test churn and only allow non-scalar types for generic instructions.

This will currently print the LLT in parentheses, but accept parsing
the existing integers and implicitly converting to scalar. The
parentheses are a bit ugly, but the parser logic seems unable to deal
without either parentheses or some keyword to indicate the start of a
type.
2021-06-30 16:54:13 -04:00

28 lines
771 B
YAML

# RUN: llc -mtriple=aarch64 -run-pass=aarch64-ldst-opt %s -verify-machineinstrs -o - | FileCheck %s
--- |
@g = common dso_local global i32 0, align 4
define i32 @test() {
entry:
store i32 0, i32* @g, align 4
%0 = load i32, i32* undef, align 4
ret i32 %0
}
...
---
# Don't crash when there's no immediate operand for store.
# CHECK-LABEL: name: test
# CHECK: STRWui $wzr
# CHECK: LDRWui
name: test
tracksRegLiveness: true
body: |
bb.0.entry:
renamable $x8 = ADRP target-flags(aarch64-page) @g
STRWui $wzr, killed renamable $x8, target-flags(aarch64-pageoff, aarch64-nc) @g :: (store (s32) into @g)
renamable $w0 = LDRWui undef renamable $x8, 0 :: (load (s32) from `i32* undef`)
RET_ReallyLR implicit $w0
...