[PATCH] D36534: [aarch64] Support APInt and APFloat in ImmLeaf subclasses and make AArch64 use them.
Daniel Sanders via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 9 10:31:25 PDT 2017
dsanders created this revision.
Herald added subscribers: kristof.beyls, igorb, javed.absar, rengolin, aemerson.
The purpose of this patch is to expose more information about ImmLeaf-like
PatLeaf's so that GlobalISel can learn to import them. Previously, ImmLeaf
could only be used to test int64_t's produced by sign-extending an APInt.
Other tests on immediates had to use the generic PatLeaf and extract the
constant using C++.
With this patch, tablegen will know how to generate predicates for int64_t's
produced by zero-extending an APInt, APInt itself, and APFloat. This will allow
it to 'do the right thing' for both SelectionDAG and GlobalISel which require
different methods of extracting the immediate from the IR.
This is NFC for SelectionDAG since the new code is equivalent to the
previous code. It's also NFC for FastISel because FastIselShouldIgnore is 1
for the ImmLeaf subclasses. Enabling FastIselShouldIgnore == 0 for these new
subclasses will require a significant re-factor of FastISel.
For GlobalISel, it's currently NFC because the relevant code to import the
affected rules is not yet present. This will be added in a later patch.
Depends on https://reviews.llvm.org/D36086
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 12160 bytes
Desc: not available
More information about the llvm-commits