[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
Fri Jan 24 07:22:12 PST 2025


================
@@ -1841,6 +1841,16 @@ int TargetLoweringBase::InstructionOpcodeToISD(unsigned Opcode) const {
   llvm_unreachable("Unknown instruction type encountered!");
 }
 
+int TargetLoweringBase::IntrinsicIDToISD(Intrinsic::ID ID) const {
+  switch (ID) {
+  case Intrinsic::exp:
+    return ISD::FEXP;
+  case Intrinsic::exp2:
+    return ISD::FEXP2;
+  }
+  llvm_unreachable("Unsupported Intrinsic ID encountered!");
----------------
arsenm wrote:

return DELETED_NODE in the default case, this shouldn't be UB with an arbitrary intrinsic 

https://github.com/llvm/llvm-project/pull/117568


More information about the llvm-commits mailing list