This is an archive of the discontinued LLVM Phabricator instance.

Match new shuffle codegen for MOVHPD patterns (PR21791)
ClosedPublic

Authored by spatel on Dec 9 2014, 4:31 PM.

Details

Summary

This patch adds patterns to match SSE (shufpd) and AVX (vpermilpd) shuffle codegen when storing the high element of a v2f64. The existing patterns were only checking for an unpckh type of shuffle. ( http://llvm.org/bugs/show_bug.cgi?id=21791 )

Diff Detail

Repository
rL LLVM

Event Timeline

spatel updated this revision to Diff 17101.Dec 9 2014, 4:31 PM
spatel retitled this revision from to Match new shuffle codegen for MOVHPD patterns (PR21791).
spatel updated this object.
spatel edited the test plan for this revision. (Show Details)
spatel added reviewers: hfinkel, delena, andreadb, RKSimon.
spatel added a subscriber: Unknown Object (MLST).
This revision was automatically updated to reflect the committed changes.
delena edited edge metadata.Dec 10 2014, 11:05 AM

Hi Sanjay,

I suggest to leave the store pattern for unpck inside.
All other LGTM

  • Elena
tstellarAMD added inline comments.
llvm/trunk/lib/Target/X86/X86InstrSSE.td
1381–1385

The types on the output pattern aren't needed any more, so you can do:

(MOVHPDmr $dst, $src)

Also, you can use types instead of register class on the input patterns.

spatel added inline comments.Dec 12 2014, 11:18 AM
llvm/trunk/lib/Target/X86/X86InstrSSE.td
1381–1385

If I remove the types on that output line, I get an error:
/path/to/X86InstrSSE.td:1382:3: error: In anonymous_2468: Instruction 'MOVHPDmr' expects more than the provided 2 operands!

Something in the definition also needs to change for that to work?