TableGen/GlobalISel: Make address space/align predicates consistent
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 5 Apr 2022 14:36:57 +0000 (10:36 -0400)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 22 Apr 2022 19:48:07 +0000 (15:48 -0400)
commit0ecbb683a2faf0ec5bcb9eb472ebd9921cbe683a
tree94bd241261aef1b0db5694560a84ac829f4b39f1
parent839f0abdaaa63569d8e153b553445b6f2a8aaa0f
TableGen/GlobalISel: Make address space/align predicates consistent

The builtin predicate handling has a strange behavior where the code
assumes that a PatFrag is a stack of PatFrags, and each level adds at
most one predicate. I don't think this particularly makes sense,
especially without a diagnostic to ensure you aren't trying to set
multiple at once.

This wasn't followed for address spaces and alignment, which could
potentially fall through to report no builtin predicate was
added. Just switch these to follow the existing convention for now.
llvm/lib/Target/AMDGPU/AMDGPUInstructions.td
llvm/lib/Target/AMDGPU/BUFInstructions.td
llvm/lib/Target/AMDGPU/DSInstructions.td
llvm/lib/Target/AMDGPU/FLATInstructions.td
llvm/lib/Target/AMDGPU/SIInstrInfo.td
llvm/test/TableGen/address-space-patfrags.td
llvm/utils/TableGen/GlobalISelEmitter.cpp