https://gcc.gnu.org/g:02cc188d3d9f14975c8285678f937a1ba79bedeb
commit r17-3974-g02cc188d3d9f14975c8285678f937a1ba79bedeb Author: Andrew Stubbs <[email protected]> Date: Mon Apr 20 15:06:27 2026 +0000 libgomp, amdgcn: Ensure s_memrealtime uses SGPRs The asm insert was using an "r" constraint, but that was only selecting a compatible register by chance. SIMT will break that, so specify "Sg" explicitly. libgomp/ChangeLog: * config/gcn/time.c (omp_get_wtime): Use "=Sg". Diff: --- libgomp/config/gcn/time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libgomp/config/gcn/time.c b/libgomp/config/gcn/time.c index e30fb9724281..96731545120d 100644 --- a/libgomp/config/gcn/time.c +++ b/libgomp/config/gcn/time.c @@ -44,10 +44,10 @@ omp_get_wtime (void) uint64_t clock; #ifdef __RDNA3__ asm ("s_sendmsg_rtn_b64 %0 0x83 ;Get REALTIME\n\t" - "s_waitcnt 0" : "=r" (clock)); + "s_waitcnt 0" : "=Sg" (clock)); #else asm ("s_memrealtime %0\n\t" - "s_waitcnt 0" : "=r" (clock)); + "s_waitcnt 0" : "=Sg" (clock)); #endif return clock * RTC_TICKS; }
