This is an archive of the discontinued LLVM Phabricator instance.

[X86] Lower AVX512 and SSE intrinsics for CVTTPD2DQ to X86ISD::CVTTPD2DQ.
ClosedPublic

Authored by craig.topper on Nov 6 2016, 12:47 AM.

Details

Summary

This allows the SSE intrinsic to use the EVEX instruction when available. It also fixes EVEX to not use a weird (v4i32 (fp_to_sint v2f64)) node and it merges some isel patterns.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper retitled this revision from to [X86] Lower AVX512 and SSE intrinsics for CVTTPD2DQ to X86ISD::CVTTPD2DQ..
craig.topper updated this object.
craig.topper added reviewers: RKSimon, delena, zvi.
craig.topper added a subscriber: llvm-commits.
RKSimon edited edge metadata.Nov 7 2016, 11:06 AM

Any chance that you could add support for upper-64 bits zeroing to remove the (v)movq instructions in the test_mm_cvttpd_epi32_zext tests please?

craig.topper edited edge metadata.

Turns out those movqs were caused by the vzmovl patterns being rooted with a bitcast that didn't exist for the return values being 2xi64. To fix that remove the bitcasts, but then we hit priority problems with vzmovl patterns due to lots of AddedComplexity nodes on other patterns starting with vzmovl including the most vanilla vzmovl pattern. So threw in another AddedComplexity on these patterns to fix that. I'll try to scrub the vzmovl pattern mess sometime and see if we can't get these AddedComplexity's out.

I also added in a vzmovl cvtpd2ps pattern I noticed was missing

RKSimon accepted this revision.Nov 8 2016, 8:35 AM
RKSimon edited edge metadata.

LGTM

This revision is now accepted and ready to land.Nov 8 2016, 8:35 AM
This revision was automatically updated to reflect the committed changes.