This is an archive of the discontinued LLVM Phabricator instance.

Add sign/zero extend
AbandonedPublic

Authored by rkotler on May 31 2014, 7:52 PM.

Details

Reviewers
dsanders
Summary

Add code which does sign/zero extend.

Diff Detail

Event Timeline

rkotler updated this revision to Diff 9996.May 31 2014, 7:52 PM
rkotler retitled this revision from to Add sign/zero extend.
rkotler updated this object.
rkotler edited the test plan for this revision. (Show Details)
rkotler added a reviewer: dsanders.

Here is an executable test case:

dsanders edited edge metadata.Jun 11 2014, 7:58 AM

I've tried to ignore the bits that aren't supposed to be in this patch but it's possible I've ignored something important. Could you refresh the patch without the noise?

Please make it clear in the summary (and the title) that this is for MIPS FastISel? It won't be obvious to others when you come to commit

Is the testcase loadstoreconv.ll? I think there should also be a simpler test case that is just sign/zero extension by itself.

lib/Target/Mips/MipsFastISel.cpp
90–94

Indentation nit.

249–250

Both signed and zero extensions are supported.

The function name and implementation suggests that only sign extensions are supported. Zero extensions are in EmitIntZExt()

347–348

The same is true for MIPS and the code below looks right but the comment references ARM.

You'll need to run clang-format on the code though

Is the testcase loadstoreconv.ll?

Disregard this, the test plan said it is. I still think a sign/zero extend only test is sensible though.

rkotler updated this revision to Diff 10514.Jun 17 2014, 2:17 PM
rkotler edited edge metadata.
  • refresh patch
  • add test case
rkotler edited the test plan for this revision. (Show Details)Jun 17 2014, 2:19 PM

Executable test case. You can run this and compare results against it being run on x86.

rkotler abandoned this revision.Aug 11 2014, 1:29 PM