[llvm] [GlobalISel] Introduce `G_POISON` (PR #127825)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 22 10:17:29 PDT 2025
Mateusz =?utf-8?q?Sokół?= <mat646 at gmail.com>,
Mateusz =?utf-8?q?Sokół?= <mat646 at gmail.com>,
Mateusz =?utf-8?q?Sokół?= <mat646 at gmail.com>,
Mateusz =?utf-8?q?Sokół?= <mat646 at gmail.com>,
Mateusz =?utf-8?q?Sokół?= <mat646 at gmail.com>,
Mateusz =?utf-8?q?Sokół?= <mat646 at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/127825 at github.com>
================
@@ -2733,7 +2734,8 @@ void CombinerHelper::applyCombineTruncOfShift(
bool CombinerHelper::matchAnyExplicitUseIsUndef(MachineInstr &MI) const {
return any_of(MI.explicit_uses(), [this](const MachineOperand &MO) {
return MO.isReg() &&
- getOpcodeDef(TargetOpcode::G_IMPLICIT_DEF, MO.getReg(), MRI);
+ (getOpcodeDef(TargetOpcode::G_IMPLICIT_DEF, MO.getReg(), MRI) ||
+ getOpcodeDef(TargetOpcode::G_POISON, MO.getReg(), MRI));
----------------
arsenm wrote:
Can you add a fixme? We shouldn't look up copy chains twice just to check 2 opcodes. We should delete getOpcodeDef as a helper, it's not good
https://github.com/llvm/llvm-project/pull/127825
More information about the llvm-commits
mailing list