[llvm] 50ed3b1 - AMDGPU: Workaround a divergent return value bug in test

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 21 21:31:50 PST 2023


Author: Matt Arsenault
Date: 2023-12-22T12:31:42+07:00
New Revision: 50ed3b1eccd8497e3546f1f3cd6bd7631c6dc20e

URL: https://github.com/llvm/llvm-project/commit/50ed3b1eccd8497e3546f1f3cd6bd7631c6dc20e
DIFF: https://github.com/llvm/llvm-project/commit/50ed3b1eccd8497e3546f1f3cd6bd7631c6dc20e.diff

LOG: AMDGPU: Workaround a divergent return value bug in test

Added: 
    

Modified: 
    llvm/test/CodeGen/AMDGPU/bf16.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/AMDGPU/bf16.ll b/llvm/test/CodeGen/AMDGPU/bf16.ll
index 79b9f8caea945b..a63a46c010a90b 100644
--- a/llvm/test/CodeGen/AMDGPU/bf16.ll
+++ b/llvm/test/CodeGen/AMDGPU/bf16.ll
@@ -9716,7 +9716,8 @@ define amdgpu_ps i32 @s_fabs_bf16(bfloat inreg %a) {
   %op = call bfloat @llvm.fabs.bf16(bfloat %a)
   %cast = bitcast bfloat %op to i16
   %zext = zext i16 %cast to i32
-  ret i32 %zext
+  %readlane = call i32 @llvm.amdgcn.readfirstlane(i32 %zext)
+  ret i32 %readlane
 }
 
 define bfloat @v_fneg_bf16(bfloat %a) {


        


More information about the llvm-commits mailing list