[PATCH] D150969: [AArch64] Try to convert two XTN and two SMLSL to UZP1, SMLSL and SMLSL2

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 13 02:24:45 PDT 2023


dmgreen added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:22460
+  // Check ExtractLow's user.
+  if (HasFoundMULLow && ExtractLow->hasOneUse()) {
+    SDNode *ExtractLowUser = *ExtractLow.getNode()->use_begin();
----------------
jaykang10 wrote:
> dmgreen wrote:
> > I think this one could leave HasFoundMULLow = true but without a valid TruncLow.
> Let me update it.
I meant - if we get to the start of this if with HasFoundMULLow=true (so ExtractLow is valid), but it doesn't have 1 use, then we get to the code below (`SDValue TruncLowOp = HasFoundMULLow ? TruncLow.getOperand(0) : DAG.getUNDEF(UZP1VT);`) with HasFoundMULLow=true but TruncLow not being a valid node.

Maybe split the one use check out:
```
  if (!ExtractLow->hasOneUse())
    HasFoundMULLow = false;
  // Check ExtractLow's user.
  if (HasFoundMULLow) {...
```


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

https://reviews.llvm.org/D150969



More information about the llvm-commits mailing list