[llvm] [SPIRV] Add radians intrinsic (PR #110800)
Xiang Li via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 2 18:30:25 PDT 2024
================
@@ -2534,6 +2534,8 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg,
}
case Intrinsic::spv_step:
return selectExtInst(ResVReg, ResType, I, CL::step, GL::Step);
+ case Intrinsic::spv_radians:
+ return selectExtInst(ResVReg, ResType, I, CL::radians, GL::Radians);
----------------
python3kgae wrote:
> We don't use the opencl extension in hlsl though. Even though this is an easy test change `llvm/test/CodeGen/SPIRV/hlsl-intrinsics` tests should be devoted to how HLSL does things. I feel like the folks that care about opencl should be adding opencl tests to their parts of the test directory.
Can we have a common place to test things like int_spv_radians so that we can share the same test with different run lines, similar to what Adam did in [radians.ll](https://github.com/llvm/llvm-project/pull/110800/files#diff-291ac3597dffe1aaedd74f8452fd868bcaf8dc572efc6114db2020fb5187faa5)?
https://github.com/llvm/llvm-project/pull/110800
More information about the llvm-commits
mailing list