[PATCH] D103291: [AArch64][GISel] and+or+shl => bfi
Amara Emerson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 27 16:43:35 PDT 2021
aemerson added inline comments.
================
Comment at: llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp:2164
+
+ if (Ty != LLT::scalar(32) && Ty != LLT::scalar(64))
+ return false;
----------------
Aesthetic opinion but no big deal: it's nicer to use:
```
if (!Ty.isScalar())
return false;
if (Size != 32 && Size != 64)
return false;
```
and bring the `unsigned Size = ...` up to here.
================
Comment at: llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp:2171
+ int64_t MaskImm;
+ if (!mi_match(Dst, MRI,
+ m_GOr(m_OneNonDBGUse(m_GShl(m_Reg(ShiftSrc), m_ICst(ShiftImm))),
----------------
Can we avoid re-matching on Dst here? We already know that MI == a G_OR, so we can just match the individual operands.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103291/new/
https://reviews.llvm.org/D103291
More information about the llvm-commits
mailing list