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.
34 lines
1.2 KiB
YAML
34 lines
1.2 KiB
YAML
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
|
# RUN: llc -march=amdgcn -mcpu=hawaii -run-pass=regbankselect -regbankselect-fast -verify-machineinstrs -o - %s | FileCheck %s
|
|
# RUN: llc -march=amdgcn -mcpu=hawaii -run-pass=regbankselect -regbankselect-greedy -verify-machineinstrs -o - %s | FileCheck %s
|
|
|
|
---
|
|
name: test_constant_s32_vgpr_use
|
|
legalized: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1
|
|
; CHECK-LABEL: name: test_constant_s32_vgpr_use
|
|
; CHECK: [[COPY:%[0-9]+]]:vgpr(p1) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 1
|
|
; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
|
|
; CHECK: G_STORE [[COPY1]](s32), [[COPY]](p1) :: (store (s32))
|
|
%0:_(p1) = COPY $vgpr0_vgpr1
|
|
%1:_(s32) = G_CONSTANT i32 1
|
|
G_STORE %1, %0 :: (store (s32))
|
|
|
|
...
|
|
|
|
---
|
|
name: test_constant_s32_sgpr_use
|
|
legalized: true
|
|
body: |
|
|
bb.0:
|
|
; CHECK-LABEL: name: test_constant_s32_sgpr_use
|
|
; CHECK: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 1
|
|
; CHECK: G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.s.sendmsg), 0, [[C]](s32)
|
|
%0:_(s32) = G_CONSTANT i32 1
|
|
G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.amdgcn.s.sendmsg), 0, %0
|
|
|
|
...
|