Legalize G_BITCAST only if both types have a corresponding RegClass.
Authored by: Petar Avramovic
Paths
| Differential D151116
[AMDGPU][GlobalISel] Update legalization condition for G_BITCAST Needs RevisionPublic Authored by matejam on May 22 2023, 9:14 AM.
Details
Summary Legalize G_BITCAST only if both types have a corresponding RegClass. Authored by: Petar Avramovic
Diff Detail Event Timeline
This revision now requires changes to proceed.Aug 17 2023, 3:06 PM
Revision Contents
Diff 524348 llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/extractelement.ll
|
You're essentially recreating a less refined version of isRegisterType, but we need the refinements. We can't purely decide this based on the raw bit sizes like this class check does, since we don't want to see something like <64 x i1> as legal. You should either filter out the cases without a corresponding class in isRegisterType or just finally round out the set of classes to cover every possible tuple