[llvm] [AMDGPU] Use 32-bit SGPR to save/restore of SCC (PR #68367)
Sirish Pande via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 11 16:31:01 PDT 2023
================
@@ -0,0 +1,87 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 3
+; RUN: llc -march=amdgcn -mcpu=gfx906 -verify-machineinstrs < %s | FileCheck -check-prefix=GFX906 %s
+declare float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32>, i32, i32, i32 immarg) #0
+declare void @llvm.amdgcn.raw.buffer.store.f32(float, <4 x i32>, i32, i32, i32 immarg) #1
+
+; Check that the compiler doesn't crash with a "undefined physical register" error;
+; bb.0 sets SCC bit in s_cmp_eq_u32 s0, 1
+; bb.1 overrides it
+; bb.2 uses the value from bb.0
+; Preserve SCC across bb.1 with s_cselect_b32 s5, -1, 0 -> s_and_b32 s0, s5, exec_lo
+; Otherwise, we will see following error.
----------------
srpande wrote:
I am adding this test as part of another patch (https://github.com/llvm/llvm-project/pull/68363). I have addressed the your comment in that patch.
https://github.com/llvm/llvm-project/pull/68367
More information about the llvm-commits
mailing list