[PATCH] D76055: [SystemZ] Improve foldMemoryOperandImpl().
Ulrich Weigand via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 24 09:39:29 PDT 2020
uweigand added inline comments.
================
Comment at: llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp:1228
+ if (SystemZ::getTwoOperandOpcode(Opcode) != -1 ||
+ Opcode == SystemZ::MSRKC || Opcode == SystemZ::MSGRKC) {
if (VRM == nullptr)
----------------
uweigand wrote:
> I'm wondering if the should just have getTwoOperandOpcode return something for these instead.
>
> But it's probably not worth the complication to special-case the CC handling in ShortenInst ...
Hmm. Thinking about this some more, I think what we're really testing for here is simple: does the MemOpcode need its output and first input operand to be tied or not. If yes, we need to verify that they can be tied (potentially via commutation).
I believe it should be possibly to simply check for that property by looking at the MCInstrDest for MemOpcode.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76055/new/
https://reviews.llvm.org/D76055
More information about the llvm-commits
mailing list