[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #147342)
Sarah Spall via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 9 11:19:10 PDT 2025
================
@@ -235,6 +288,30 @@ bool SemaSPIRV::CheckSPIRVBuiltinFunctionCall(const TargetInfo &TI,
TheCall->setType(RetTy);
break;
}
+ case SPIRV::BI__builtin_spirv_refract: {
+ if (SemaRef.checkArgCount(TheCall, 3))
+ return true;
+
+ llvm::function_ref<bool(Sema *, SourceLocation, int, QualType)>
+ ChecksArr[] = {CheckFloatOrHalfRepresentation,
----------------
spall wrote:
I think your explanation is slightly incorrect, but it does seem the __builtin_spirv_refract is reachable with a scalar value. In this case the codegen assertions are wrong and I will leave a comment there about updating them.
https://github.com/llvm/llvm-project/pull/147342
More information about the llvm-commits
mailing list