[llvm] [DXIL] Implement log intrinsic Lowering (PR #86569)
Xiang Li via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 25 13:15:30 PDT 2024
================
@@ -169,6 +171,32 @@ static bool expandLerpIntrinsic(CallInst *Orig) {
return true;
}
+static bool expandLogIntrinsic(CallInst *Orig,
+ float LogConstVal = numbers::ln2f) {
+ Value *X = Orig->getOperand(0);
+ IRBuilder<> Builder(Orig->getParent());
+ Builder.SetInsertPoint(Orig);
+ Type *Ty = X->getType();
+ Type *EltTy = Ty->getScalarType();
+ Constant *Ln2Const =
+ Ty->isVectorTy() ? ConstantVector::getSplat(
----------------
python3kgae wrote:
Need test for vector type.
https://github.com/llvm/llvm-project/pull/86569
More information about the llvm-commits
mailing list