[llvm] [DXIL] Add radians intrinsic (PR #110616)
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 2 12:08:14 PDT 2024
================
@@ -395,6 +396,15 @@ static Value *expandStepIntrinsic(CallInst *Orig) {
return Builder.CreateSelect(Cond, Zero, One);
}
+static Value *expandRadiansIntrinsic(CallInst *Orig) {
+ Value *X = Orig->getOperand(0);
+ Type *Ty = X->getType();
+ IRBuilder<> Builder(Orig);
+ Value *OneEightyOverPi = ConstantFP::get(Ty, llvm::numbers::pi / 180.0);
----------------
bogner wrote:
This should probably be called `PiOverOneEighty`...
https://github.com/llvm/llvm-project/pull/110616
More information about the llvm-commits
mailing list