This is an archive of the discontinued LLVM Phabricator instance.

[mips] Simplify ordering of range checked immediate classes.

Authored by dsanders on Feb 29 2016, 9:18 AM.



With the addition of checks to ensure that operands have a strict ordering
it has become tricky to manage the order in the way I originally intended.

This patch linearizes the ordering which simplifies the implementation but
requires an order that is arbitrary in places. Here are some examples:

  • uimm4 < uimm5 < uimm6
  • simm4 < uimm4 < simm5 < uimm5
  • uimm5 < uimm5_plus1 (1..32) < uimm5_plus32 (32..63) < uimm6 The term 'superset' starts to break down here since the *_plus* classes are not true supersets of uimm5 (but they are still subsets of uimm6).
  • uimm5 < uimm5_64, and uimm5 < vsplat_uimm5 This is entirely arbitrary. We need an ordering and what we pick is unimportant since only one is possible for a given mnemonic.

Depends on D17291

Diff Detail

Event Timeline

dsanders updated this revision to Diff 49385.Feb 29 2016, 9:18 AM
dsanders retitled this revision from to [mips] Simplify ordering of range checked immediate classes..
dsanders updated this object.
dsanders added a reviewer: vkalintiris.
dsanders added a subscriber: llvm-commits.
vkalintiris accepted this revision.Mar 7 2016, 4:42 AM
vkalintiris edited edge metadata.

LGTM. One simple comment inline.


Can you add an inline comment with some examples as you did in your commit message?

This revision is now accepted and ready to land.Mar 7 2016, 4:42 AM
dsanders closed this revision.Mar 14 2016, 4:51 AM
This revision was automatically updated to reflect the committed changes.
dsanders marked an inline comment as done.Mar 14 2016, 4:51 AM
dsanders added inline comments.

Done in the commit.