[PATCH] D93708: [AMDGPU] Add a new Clamp Pattern to the GlobalISel Path.
Petar Avramovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 13 06:11:37 PST 2021
Petar.Avramovic added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPreLegalizerCombiner.cpp:137-141
+ auto CvtPk = B.buildInstr(CvtOpcode);
+ CvtPk.addDef(CvtDst);
+ CvtPk.addReg(Hi32);
+ CvtPk.addReg(Lo32);
+ CvtPk.setMIFlags(MI.getFlags());
----------------
You can replace this block with `B.buildInstr(CvtOpcode, {CvtDst}, {Hi32, Lo32}, MI.getFlags());`
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPreLegalizerCombiner.cpp:201
: CombinerInfo(/*AllowIllegalOps*/ true, /*ShouldLegalizeIllegal*/ false,
- /*LegalizerInfo*/ nullptr, EnableOpt, OptSize, MinSize),
+ /*LegalizerInfo*/ LI, EnableOpt, OptSize, MinSize),
KB(KB), MDT(MDT) {
----------------
Why do you need LegalizerInfo? CombinerHelper::isLegalOrBeforeLegalizer relies on LI being nullptr before legalizer.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93708/new/
https://reviews.llvm.org/D93708
More information about the llvm-commits
mailing list