[PATCH] D86611: GlobalISel: Combine `op undef, x` to 0
Volkan Keles via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 31 10:19:01 PDT 2020
volkan added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:1858
+ MachineOperand &MO = MI.getOperand(OpIdx);
+ return MO.isReg() &&
+ getOpcodeDef(TargetOpcode::G_IMPLICIT_DEF, MO.getReg(), MRI);
----------------
arsenm wrote:
> The isReg check should be unnecessary
`MO.getReg()` may cause a crash without that check. This shouldn't a problem for this case, but I'd like to keep it as this function might be used by other combines too.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86611/new/
https://reviews.llvm.org/D86611
More information about the llvm-commits
mailing list