[llvm] [DAGCombine] Enable div by constant optimization for odd sized vectors before type legalization. (PR #188313)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 25 01:53:20 PDT 2026


================
@@ -6628,11 +6637,12 @@ SDValue TargetLowering::BuildSDIV(SDNode *N, SelectionDAG &DAG,
       return SDValue();
   }
 
-  bool HasMULHS = isOperationLegalOrCustom(ISD::MULHS, VT, IsAfterLegalization);
+  bool HasMULHS =
+      isOperationLegalOrCustom(ISD::MULHS, QueryVT, IsAfterLegalization);
----------------
lukel97 wrote:

Just checking do we have any targets where ISD::MULHS is custom lowered for an illegal type, but not legal or custom for the legalized type? I.e. it gets custom lowered during type legalization

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


More information about the llvm-commits mailing list