Files
clang-p2996/llvm/test/CodeGen/MIR/AArch64/atomic-memoperands.mir
Matt Arsenault fae05692a3 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

34 lines
1.3 KiB
YAML

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=aarch64-none-linux-gnu -run-pass none -o - %s | FileCheck %s
--- |
define void @atomic_memoperands() {
ret void
}
...
---
name: atomic_memoperands
body: |
bb.0:
; CHECK-LABEL: name: atomic_memoperands
; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
; CHECK: [[LOAD:%[0-9]+]]:_(s64) = G_LOAD [[COPY]](p0) :: (load unordered (s64))
; CHECK: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p0) :: (load monotonic (s32))
; CHECK: [[LOAD2:%[0-9]+]]:_(s16) = G_LOAD [[COPY]](p0) :: (load acquire (s16))
; CHECK: G_STORE [[LOAD2]](s16), [[COPY]](p0) :: (store release (s16))
; CHECK: G_STORE [[LOAD1]](s32), [[COPY]](p0) :: (store acq_rel (s32))
; CHECK: G_STORE [[LOAD]](s64), [[COPY]](p0) :: (store syncscope("singlethread") seq_cst (s64))
; CHECK: RET_ReallyLR
%0:_(p0) = COPY $x0
%1:_(s64) = G_LOAD %0(p0) :: (load unordered (s64))
%2:_(s32) = G_LOAD %0(p0) :: (load monotonic (s32))
%3:_(s16) = G_LOAD %0(p0) :: (load acquire (s16))
G_STORE %3(s16), %0(p0) :: (store release (s16))
G_STORE %2(s32), %0(p0) :: (store acq_rel (s32))
G_STORE %1(s64), %0(p0) :: (store syncscope("singlethread") seq_cst (s64))
RET_ReallyLR
...