[PATCH] D149223: [PowerPC] Look through OR, AND, XOR instructions when checking a clear.
Amy Kwan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 27 08:19:33 PDT 2023
amyk added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCMIPeephole.cpp:224
+ return std::max(
+ getKnownLeadingZeroCount(MI->getOperand(1).getReg(), TII, MRI),
+ getKnownLeadingZeroCount(MI->getOperand(1).getReg(), TII, MRI));
----------------
Is it possible to pull out `MI->getOperand(1).getReg()` to be used in both cases?
================
Comment at: llvm/lib/Target/PowerPC/PPCMIPeephole.cpp:227
+
+ if (Opcode == PPC::OR || Opcode == PPC::XOR8 || Opcode == PPC::XOR ||
+ Opcode == PPC::XOR8)
----------------
Do we need `PPC::OR8`, too?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149223/new/
https://reviews.llvm.org/D149223
More information about the llvm-commits
mailing list