[llvm] [AMDGPU][GlobalIsel] Use isRegisterClassType to check for legal types for G_FREEZE & G_IMPLICIT_DEF (PR #101331)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 1 08:11:24 PDT 2024
================
@@ -889,10 +890,13 @@ AMDGPULegalizerInfo::AMDGPULegalizerInfo(const GCNSubtarget &ST_,
.clampScalar(0, S16, S64);
getActionDefinitionsBuilder({G_IMPLICIT_DEF, G_FREEZE})
- .legalIf(isRegisterType(0))
+ // s1 and s16 are special cases because they have legal operations on
+ // them, but don't really occupy registers in the normal way.
+ .legalIf(isRegisterClassType(0))
----------------
sstipanovic wrote:
`isRegisterClassType` is checking against a predefined list of legal types. Currently only G_BITCAST uses it, the plan is to remove `isRegisterType` once every use is replaced. Introduced in https://github.com/llvm/llvm-project/pull/68189
https://github.com/llvm/llvm-project/pull/101331
More information about the llvm-commits
mailing list