[PATCH] D83216: [Intrinsic] Add sshl.sat/ushl.sat, saturated shift intrinsics.
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 3 07:40:56 PDT 2020
arsenm added inline comments.
================
Comment at: llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-sshlsat.mir:17
+ ; GFX6: [[TRUNC1:%[0-9]+]]:_(s7) = G_TRUNC [[COPY1]](s32)
+ ; GFX6: [[SSHLSAT:%[0-9]+]]:_(s7) = G_SSHLSAT [[TRUNC]], [[TRUNC1]]
+ ; GFX6: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[SSHLSAT]](s7)
----------------
ebevhan wrote:
> arsenm wrote:
> > These all failed to legalize.
> >
> > You need something like this in AMDGPULegalizerInfo
> >
> > ```
> > getActionDefinitionsBuilder({G_SSHLSAT, G_USHLSAT})
> > .scalarize(0)
> > .clampScalar(0, S32)
> > .lower();
> >
> > ```
> >
> > to actually trigger any of the legalization code
> Okay, I thought something was off.
>
> Does this mean that any target that wants these legalized with the default legalization needs to specify this explicitly?
Yes, nearly everything is opt-in in GlobalISel
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83216/new/
https://reviews.llvm.org/D83216
More information about the llvm-commits
mailing list