xref: /aosp_15_r20/external/llvm/test/CodeGen/AMDGPU/read-register-invalid-subtarget.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: not llc -march=amdgcn -mcpu=tahiti -verify-machineinstrs < %s 2>&1 | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; CHECK: invalid register "flat_scratch_lo" for subtarget.
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Workerdeclare i32 @llvm.read_register.i32(metadata) #0
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Workerdefine void @test_invalid_read_flat_scratch_lo(i32 addrspace(1)* %out) nounwind {
8*9880d681SAndroid Build Coastguard Worker  store volatile i32 0, i32 addrspace(3)* undef
9*9880d681SAndroid Build Coastguard Worker  %m0 = call i32 @llvm.read_register.i32(metadata !0)
10*9880d681SAndroid Build Coastguard Worker  store i32 %m0, i32 addrspace(1)* %out
11*9880d681SAndroid Build Coastguard Worker  ret void
12*9880d681SAndroid Build Coastguard Worker}
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Worker!0 = !{!"flat_scratch_lo"}
15