GlobalISel: Add scalarSameSizeAs LegalizeRule
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 22 Jul 2020 13:22:45 +0000 (09:22 -0400)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 24 Jul 2020 01:17:31 +0000 (21:17 -0400)
commit891759db73f085df6af7bd343aa0cc0b5dccb572
tree2afc72c865261d24b893e4454850326806e2e398
parent8e62ffdef1c8e50cc0f108b1d67a37bcb6089279
GlobalISel: Add scalarSameSizeAs LegalizeRule

Widen or narrow a type to a type with the same scalar size as
another. This can be used to force G_PTR_ADD/G_PTRMASK's scalar
operand to match the bitwidth of the pointer type. Use this to
disallow narrower types for G_PTRMASK.
llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h
llvm/lib/CodeGen/GlobalISel/LegalizeMutations.cpp
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-ptrmask.mir
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-ptrmask.mir