[llvm] [llvm][CodeGen] Intrinsic `llvm.powi/ldexp.*` code gen for vector arguments (PR #118242)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 4 05:30:36 PST 2024


================
@@ -2585,6 +2585,8 @@ SDValue DAGTypeLegalizer::PromoteIntOp_ExpOp(SDNode *N) {
                              : RTLIB::getLDEXP(N->getValueType(0));
 
   if (LC == RTLIB::UNKNOWN_LIBCALL || !TLI.getLibcallName(LC)) {
+    if (N->getValueType(0).isVector())
+      return DAG.UnrollVectorOp(N);
----------------
arsenm wrote:

This whole function is actually the wrong place to split the vector (see how there are no other UnrollVectorOps uses in DAGTypeLegalizer). The description also says your problem is when the libcall is used, so you'd want to change the other path? Does the libcall emission below need to directly handle the vector case?

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


More information about the llvm-commits mailing list