[llvm] [DAG] Reducing instructions by better legalization handling of AVGFLOORU for i128 data types (PR #99913)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 23 02:45:31 PDT 2024


================
@@ -9353,23 +9352,23 @@ SDValue TargetLowering::expandAVG(SDNode *N, SelectionDAG &DAG) const {
     }
   }
 
-  if (Opc == ISD::AVGFLOORU && SVT == MVT::i128) {
+  if (VT.isScalarInteger() && !isTypeLegal(VT)) {
----------------
RKSimon wrote:

Still need the `Opc == ISD::AVGFLOORU` check

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


More information about the llvm-commits mailing list