[llvm] PreISelIntrinsicLowering: Lower llvm.exp/llvm.exp2 to a loop if scalable vec arg (PR #117568)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 23 07:04:34 PST 2025
================
@@ -453,6 +454,21 @@ bool PreISelIntrinsicLowering::lowerIntrinsics(Module &M) const {
case Intrinsic::objc_sync_exit:
Changed |= lowerObjCCall(F, "objc_sync_exit");
break;
+ case Intrinsic::exp:
+ case Intrinsic::exp2:
+ Changed |= forEachCall(F, [&](CallInst *CI) {
+ unsigned Op = ISD::FEXP;
+ if (F.getIntrinsicID() == Intrinsic::exp2)
+ Op = ISD::FEXP2;
----------------
arsenm wrote:
Should move this to a helper function that's a switch over the intrinsic ID to the ISD node. I would hope we already had such a thing available to use, but the closest thing is in BasicTTI. Later we should probably move that into TLI
https://github.com/llvm/llvm-project/pull/117568
More information about the llvm-commits
mailing list