This practically only works for the f16 case AMDGPU uses, not wider
types.
Fixes bug 49710 by failing legalization.
Paths
| Differential D99469
GlobalISel: Restrict narrow scalar for fptoui/fptosi results ClosedPublic Authored by arsenm on Mar 28 2021, 8:14 AM.
Details
Diff Detail Event Timeline
Comment Actions The code change looks fine to me. The added tests aren't actually testing any behaviour that has changed, are they? Is there any reasonable way to add tests for the unable-to-legalize case?
Comment Actions
That is what's tested here. The no-ops in the new tests demonstrate they weren't legalized. This revision is now accepted and ready to land.Apr 11 2021, 7:44 AM
Revision Contents
Diff 334321 llvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
llvm/test/CodeGen/AArch64/GlobalISel/legalize-fptoi.mir
|
There's no need to introduce NarrowDstTy, just use NarrowTy throughout.