[PATCH] D95729: [GlobalISel] Add sext(constant) -> constant artifact combine.
Amara Emerson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 3 13:52:39 PST 2021
aemerson added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h:198
+ // Try to fold sext(g_constant) when the larger constant type is legal.
+ // Can't use MIPattern because we don't have a specific constant in mind.
+ auto *SrcMI = MRI.getVRegDef(SrcReg);
----------------
arsenm wrote:
> This seems like a fixable defect. You can check for any constant with the IR one
Yeah, we can already use m_ICst but it doesn't save much code, we need the MachineInstr def anyway. I'll remove this comment from here and the other places.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95729/new/
https://reviews.llvm.org/D95729
More information about the llvm-commits
mailing list