[llvm] [DXIL] Add radians intrinsic (PR #110616)
Adam Yang via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 2 12:28:25 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);
----------------
adam-yang wrote:
Oops. Fixed.
https://github.com/llvm/llvm-project/pull/110616
More information about the llvm-commits
mailing list