This is an archive of the discontinued LLVM Phabricator instance.

[mips][msa] Fix element extraction where the index is variable.
ClosedPublic

Authored by dsanders on Apr 28 2014, 7:57 AM.

Details

Summary

This isn't supported directly so we splat the vector element and extract
the most convenient copy.

Diff Detail

Event Timeline

dsanders updated this revision to Diff 8888.Apr 28 2014, 7:57 AM
dsanders retitled this revision from to [mips][msa] Fix element extraction where the index is variable..
dsanders updated this object.
dsanders edited the test plan for this revision. (Show Details)
dsanders added a reviewer: matheusalmeida.
matheusalmeida accepted this revision.Apr 29 2014, 3:58 AM
matheusalmeida edited edge metadata.

LGTM. Some comments inline.

test/CodeGen/Mips/msa/basic_operations.ll
466

I think it would be beneficial if we checked here that we don't emit an 'SRA'.

480

I ran this test manually and the compiler is generating an 'shf.w $w0,$w0,177' before the first splat. Is this because it didn't emit splat.d ?

514

Could you check for the immediate as well ? (24)

538

Could you check for the immediate as well ? (16)

561

Would it be good if we checked that we don't emit an 'SRL' ?

This revision is now accepted and ready to land.Apr 29 2014, 3:58 AM
dsanders added inline comments.Apr 29 2014, 5:45 AM
test/CodeGen/Mips/msa/basic_operations.ll
480

It's the bitcast from v2i64 to v4i32. bitcasts are shuffles in big-endian mode

dsanders updated this revision to Diff 8911.Apr 29 2014, 5:51 AM
dsanders edited edge metadata.
  • Improved test

Thanks. Looks good.

dsanders closed this revision.Apr 29 2014, 6:38 AM