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

Zhaoxin Yang via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 5 03:46:11 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);
----------------
ylzsx 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?

@topperc what are your thoughts on this?

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


More information about the llvm-commits mailing list