[PATCH] D141275: [AArch64] Sink to umull if we know tops bits are zero.

Sam Tebbs via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 9 05:39:05 PST 2023


samtebbs accepted this revision.
samtebbs added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:14092
+    // Is it profitable to sink if we found two of the same type of extends.
+    return !Ops.empty() && (NumSExts == 2 || NumZExts == 2);
   }
----------------
dmgreen wrote:
> samtebbs wrote:
> > Would an early return within the loop in the case of `NumSExts > 2 && NumZExts > 2` make sense?
> I'm working under the assumption that a mul can only have 2 operands. The loop is just checking both of them.
I see, cool. Semantically an early return and not is the same thing when assuming 2 operands so LGTM.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141275/new/

https://reviews.llvm.org/D141275



More information about the llvm-commits mailing list