This is an archive of the discontinued LLVM Phabricator instance.

fix materialization of one bit constants and global values which are accessed through a base GOT entry.
ClosedPublic

Authored by rkotler on Aug 5 2014, 5:59 PM.

Details

Summary

get tip of tree mips fast-isel to pass test-suite

Two bugs were fixed:

  1. one bit booleans were treated as 1 bit signed integers and so the literal '1' could become sign extended.
  2. mips uses got for pic but in certain cases, as with string constants for example, many items can be referenced from the same got entry and this case was not handled properly.

Diff Detail

Event Timeline

rkotler updated this revision to Diff 12217.Aug 5 2014, 5:59 PM
rkotler retitled this revision from to minimal.
rkotler updated this object.
rkotler edited the test plan for this revision. (Show Details)
rkotler added a reviewer: dsanders.
rkotler added a subscriber: mcrosier.
dsanders edited edge metadata.Aug 6 2014, 8:41 AM

Hi Reed,

You'll need to correct the title and commit message since they're the concatenation of the commits on your branch at the moment. You can use the 'Edit Revision' link on the top right of the web interface.

lib/Target/Mips/MipsFastISel.cpp
19–23

It ought to be a given that the test-suite will pass (bugs aside) so I'm really not keen on a 'make it pass' option. Also, there's already a -mips-fast-isel option that keeps the fast isel from being used by default until it's ready. -mips-fast-isel-pass-test-suite seems to be serving the same purpose.

rkotler updated this revision to Diff 12261.Aug 6 2014, 5:19 PM
rkotler edited edge metadata.

Make test-suite pass (build bots green for fast-isel mips -O0 and -O2

rkotler updated this revision to Diff 12262.Aug 6 2014, 5:23 PM
  • remove blank from test case
rkotler retitled this revision from minimal to get tip of tree mips fast-isel to pass test-suite.Aug 6 2014, 5:27 PM
rkotler updated this object.
rkotler updated this revision to Diff 12265.Aug 6 2014, 7:48 PM
  • take out uneeded include
dsanders accepted this revision.Aug 7 2014, 5:46 AM
dsanders edited edge metadata.

Thanks. That's much better.

LGTM with three nits. Two nits and the optional change are described inline. The other nit is that you don't need to say 'tip of tree' in the title/summary since it's a given that the commit affects the tip of the tree and that it's better to focus the commit message (particularly the title/subject line) on what the commit changes rather than what it achieves (e.g. "Fix materialization of i1 constants" rather than "Get test-suite to pass"). There's also an optional change which you may or may not choose to do.

As we discussed off-review, it would normally be better to do one bugfix per patch but the urgency of the MIPS32r6/MIPS64r6 work has meant that you haven't been able to get any reviews for a long time. I'm therefore willing to compromise on this a bit.

lib/Target/Mips/MipsFastISel.cpp
358

Nit: Could you use something other than 'DestReg_' here? It's a bit confusing when there's non-trivial code that uses 'DestReg' and 'DestReg_'.

360

This change is up to you since the current aim is to support O32. You could trivially support N32/N64 here. You would only need to switch MO_ABS_LO for MO_GOT_OFST.

366

blank line needed between functions

This revision is now accepted and ready to land.Aug 7 2014, 5:46 AM
rkotler updated this revision to Diff 12291.Aug 7 2014, 2:32 PM
rkotler edited edge metadata.
  • nits
  • Merge branch 'master' into reed-bug-02
rkotler retitled this revision from get tip of tree mips fast-isel to pass test-suite to fix materialization of one bit constants and global values which are accessed through a base GOT entry..Aug 7 2014, 2:40 PM
rkotler closed this revision.Aug 7 2014, 3:17 PM