[clang] [CIR][SPIR-V] Dispatch AMDGPU builtins on AMDGCN-flavored SPIR-V (PR #222018)

Steffen Larsen via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 1 01:25:21 PDT 2026


================
@@ -100,7 +101,7 @@ static mlir::Value emitLogbBuiltin(CIRGenFunction &cgf, const CallExpr *e,
   mlir::Value inf = builder.getConstant(loc, cir::FPAttr::get(srcTy, infVal));
 
   mlir::Value fabsNegInf =
-      builder.createCompare(loc, cir::CmpOpKind::ne, fabs, inf);
+      builder.createCompare(loc, cir::CmpOpKind::one, fabs, inf);
----------------
steffenlarsen wrote:

This bugfix seems unrelated to the fix detailed in the description. Might it make sense to do it in a separate patch? Should we test this for non-SPIR-V AMDGCN?

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


More information about the cfe-commits mailing list