[PATCH] D124325: [AArch64][SVE] Support logical operation BIC with DestructiveBinary patterns
Paul Walker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 9 10:39:28 PST 2022
paulwalker-arm added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp:454-455
-
- if (DType == AArch64::DestructiveBinary)
- assert(DstReg != MI.getOperand(3).getReg());
-
----------------
Is it possible to move this logic into the `DOPRegIsUnique` switch statement like
```
case AArch64::DestructiveBinary:
DOPRegIsUnique = DstReg != MI.getOperand(SrcIdx).getReg();
```
================
Comment at: llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp:558
+ // prefixed_zeroing_mov for DestructiveBinary.
+ assert((AArch64::DestructiveBinary == DType || DOPRegIsUnique) &&
+ "The destructive operand should be unique");
----------------
I think this reads better as `DOPRegIsUnique || AArch64::DestructiveBinary == DType` because the second part os the exception.
================
Comment at: llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp:575-576
+ // movprfx z0.b, p0/z, z0.b; lsl z0.b, p0/m, z0.b, #0;
+ if (DType == AArch64::DestructiveBinary &&
+ DstReg == MI.getOperand(SrcIdx).getReg()) {
+ BuildMI(MBB, MBBI, MI.getDebugLoc(), TII->get(LSLZero))
----------------
With my previous suggestion does
```
if (DType == AArch64::DestructiveBinary && !DOPRegIsUnique)
```
work here?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124325/new/
https://reviews.llvm.org/D124325
More information about the llvm-commits
mailing list