[PATCH] D90050: AMDGPU/GlobalISel: Add integer med3 combines
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 26 04:13:17 PDT 2021
foad accepted this revision.
foad added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPURegBankCombiner.cpp:115
+ LLT Ty = MRI.getType(Dst);
+ if (Ty != LLT::scalar(16) && Ty != LLT::scalar(32))
+ return false;
----------------
Petar.Avramovic wrote:
> foad wrote:
> > foad wrote:
> > > Can we just assert the type is one of these, since we're running on legalized GMIR and these are the only types that we have integer min/max instructions for? (Or do we need to exclude v2s16?)
> > Ping? Maybe just `if (Ty.isVector()) return false;`?
> We need to exclude v2s16, there is a test that we don't combine in this case.
> I did find it more informative this way since it is explicit about available types for med3.
>
Fair enough.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90050/new/
https://reviews.llvm.org/D90050
More information about the llvm-commits
mailing list