[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
Fri Dec 6 07:50:50 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:

It makes more sense to me to handle this when emitting the call, where ABI constraints would naturally be handled. This can be sign extended here, and the call emission can truncate or sext_inreg as required 

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


More information about the llvm-commits mailing list