Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
Context not available. | |||||
return mi_match(SrcReg, MRI, m_GFNeg(m_Reg(Reg))); | return mi_match(SrcReg, MRI, m_GFNeg(m_Reg(Reg))); | ||||
} | } | ||||
bool CombinerHelper::matchCombineFAbsOfFAbs(MachineInstr &MI, Register &Src) { | |||||
assert(MI.getOpcode() == TargetOpcode::G_FABS && "Expected a G_FABS"); | |||||
Src = MI.getOperand(1).getReg(); | |||||
Register AbsSrc; | |||||
return mi_match(Src, MRI, m_GFabs(m_Reg(AbsSrc))); | |||||
paquette: Maybe simpler?
```
return mi_match(MI.getOperand(1).getReg(), MRI, m_GFabs(m_reg(Src)));
``` | |||||
paquetteUnsubmitted Not Done ReplyInline Actionsoh wait no that won't work, that'll give the source of the other G_FABS nevermind paquette: oh wait no that won't work, that'll give the source of the other G_FABS nevermind | |||||
} | |||||
bool CombinerHelper::applyCombineFAbsOfFAbs(MachineInstr &MI, Register &Src) { | |||||
assert(MI.getOpcode() == TargetOpcode::G_FABS && "Expected a G_FABS"); | |||||
Register Dst = MI.getOperand(0).getReg(); | |||||
MI.eraseFromParent(); | |||||
replaceRegWith(MRI, Dst, Src); | |||||
return true; | |||||
} | |||||
bool CombinerHelper::matchAnyExplicitUseIsUndef(MachineInstr &MI) { | bool CombinerHelper::matchAnyExplicitUseIsUndef(MachineInstr &MI) { | ||||
return any_of(MI.explicit_uses(), [this](const MachineOperand &MO) { | return any_of(MI.explicit_uses(), [this](const MachineOperand &MO) { | ||||
return MO.isReg() && | return MO.isReg() && | ||||
Context not available. | |||||
Not Done ReplyInline ActionsreplaceRegWith? arsenm: replaceRegWith? |
Maybe simpler?