[PATCH] D109034: [AArch64][NFC] Alter ComplexPattern types to be consistent with their uses

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 31 17:01:29 PDT 2021


jrtc27 created this revision.
jrtc27 added reviewers: david-arm, paulwalker-arm, t.p.northover.
Herald added subscribers: hiraditya, kristof.beyls, tpr.
jrtc27 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

When used as a non-leaf node, TableGen does not currently use the type
of a ComplexPattern for type inference, which also means it does not
check it doesn't conflict with the use. This differs from when used as a
leaf value, where the type is used for inference. Fixing that
discrepancy is something I intend to upstream as a subsequent review.

AArch64 currently has several ComplexPatterns that are used in contexts
where they're expected to be an iPTR. The cases that lead to type
contradictions are separated out in D108759 <https://reviews.llvm.org/D108759>, but there are additional
differences to the TableGen output when using my locally-patched
TableGen. None of these appear to matter, at least for passing all the
CodeGen tests, but it's safer to avoid such changes (and similar changes
were causing issues on some AMDGPU tests, causing failures to select).
Changing these additional ComplexPatterns to use iPTR rather than i64
ensures that the TableGen output remains bit-for-bit identical (compared
to without having this patch and my TableGen patch, as well as the
intermediate state of having this patch but not my TableGen patch), and
more accurately captures the higher-level meaning of these patterns.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D109034

Files:
  llvm/lib/Target/AArch64/AArch64InstrFormats.td
  llvm/lib/Target/AArch64/SVEInstrFormats.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109034.369820.patch
Type: text/x-patch
Size: 7696 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210901/f078ec02/attachment.bin>


More information about the llvm-commits mailing list