[PATCH] D131117: [X86] Teach PostprocessISelDAG to fold ANDrm+TESTrr when chain result is used.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 3 19:26:40 PDT 2022
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1490
N->getOperand(0) == N->getOperand(1) &&
- N->isOnlyUserOf(N->getOperand(0).getNode()) &&
+ N->getOperand(0)->hasNUsesOfValue(2, N->getOperand(0).getResNo()) &&
N->getOperand(0).isMachineOpcode()) {
----------------
LuoYuanke wrote:
> `AND32rm` has 3 output. This check 1st output, should we also check 2nd output (EFLAGS) and only leave the 3rd (chain) output be used freely?
See line 1496 and 1507. We have to check the opcode before we can tell if output 1 exists.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131117/new/
https://reviews.llvm.org/D131117
More information about the llvm-commits
mailing list