[llvm] [AMDGPU] Handle register variant S_SETREG when fixing VGPR MSB clobbers (PR #218941)

Stanislav Mekhanoshin via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 02:13:35 PDT 2026


================
@@ -0,0 +1,27 @@
+; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1250 < %s | FileCheck %s
+
+; llvm.set.rounding lowers to s_setreg_b32(MODE), leaving garbage in
+; bits[19:12] of the SGPR operand, so the tracked mode must be re-established.
+
+declare void @llvm.set.rounding(i32)
+
+; CHECK-LABEL: {{^}}dynamic_rounding_mode_with_high_vgprs:
+; CHECK: s_setreg_b32 hwreg(HW_REG_WAVE_MODE, 0, 4), s0
----------------
rampitec wrote:

It has a set of bits it touches. So, you are saying other bits are clobbered? Is there a ticket for this?

https://github.com/llvm/llvm-project/pull/218941


More information about the llvm-commits mailing list