This is an archive of the discontinued LLVM Phabricator instance.

[mips] Range check uimm4_ptr and uimm6_ptr and use correctly sized immediates in MSA copy/insert.
ClosedPublic

Authored by dsanders on Mar 14 2016, 6:47 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

dsanders updated this revision to Diff 50584.Mar 14 2016, 6:47 AM
dsanders retitled this revision from to [mips] Range check uimm4_ptr and uimm6_ptr and use correctly sized immediates in MSA copy/insert..
dsanders updated this object.
dsanders added a reviewer: vkalintiris.
dsanders added a subscriber: llvm-commits.
vkalintiris accepted this revision.Mar 15 2016, 7:58 AM
vkalintiris edited edge metadata.

LGTM. I've posted some comments, and a question that I have, inline.

lib/Target/Mips/MipsInstrInfo.td
708 ↗(On Diff #50584)

We don't need uimm6_ptr anymore.

lib/Target/Mips/MipsMSAInstrInfo.td
70 ↗(On Diff #50584)

I don't believe that we need this any more.

1885–1890 ↗(On Diff #50584)

Shouldn't we use immZExt1Ptr and immZExt2Ptr instead of immZExt3Ptr and immZExt4Ptr?

This revision is now accepted and ready to land.Mar 15 2016, 7:58 AM
dsanders added inline comments.Mar 15 2016, 8:17 AM
lib/Target/Mips/MipsMSAInstrInfo.td
70 ↗(On Diff #50584)

immZExt4Ptr is still used by COPY_[US]_B but you're correct that immZExt6Ptr isn't.

1885–1890 ↗(On Diff #50584)

Good point. I'll fix the test cases too.

dsanders updated this revision to Diff 50736.Mar 15 2016, 8:17 AM
dsanders edited edge metadata.

Remove immZExt6Ptr and uimm6_ptr.
Correct COPY_F[WD]_PSEUDO to use the correct size immediate and fix corresponding test.

dsanders closed this revision.Mar 22 2016, 7:03 AM
This revision was automatically updated to reflect the committed changes.