This is an archive of the discontinued LLVM Phabricator instance.

[X86] Declare SSE4.1/AVX2 vector extloads covered by the *PMOV*X instructions legal
ClosedPublic

Authored by ab on Dec 4 2014, 10:57 AM.

Details

Summary

Depends on D6532, D6125.

Note that we need a new DAGCombine to avoid a regression in the testcase (see D6552).

Patterns are subsequently cleaned up in D6896.

Diff Detail

Repository
rL LLVM

Event Timeline

ab updated this revision to Diff 16937.Dec 4 2014, 10:57 AM
ab retitled this revision from to [X86] Declare SSE4.1/AVX2 vector extloads covered by the *PMOV*X instructions legal.
ab updated this object.
ab edited the test plan for this revision. (Show Details)
ab added a reviewer: chandlerc.
ab added a subscriber: Unknown Object (MLST).
ab updated this object.Dec 4 2014, 12:09 PM
ab updated this revision to Diff 16998.Dec 5 2014, 1:59 PM
ab updated this object.

Simplify patterns, separate regression fix to another patch.

ab planned changes to this revision.Jan 8 2015, 10:39 AM
ab updated this revision to Diff 17930.Jan 9 2015, 10:03 AM
ab updated this object.

Change needlessly-smart legality-setting loop to explicit sequence for all legal types.

ab updated this revision to Diff 18458.Jan 20 2015, 1:58 PM

Ping!

(rebased, cleaned up comments.)

Hi Ahmed,

This looks mostly good but I would have expected more test cases for the added patterns.
Moreover, I have one concern on one of the test case. See my inline comment.

Thanks,
-Quentin

test/CodeGen/X86/widen_load-2.ll
195 ↗(On Diff #18458)

Why do we need two moves here?

ab added a comment.Jan 20 2015, 2:35 PM

So there are already testcases (vector-sext/zext.ll).

The endgoal here is to avoid having multiple ways to express extloads (see D6896). Saying these extloads are legal is the first step, and enables the DAGCombines to catch the stupid "(and (zextload))" pattern, as seen in the two tests here.

Thanks for the review!
-Ahmed

test/CodeGen/X86/widen_load-2.ll
195 ↗(On Diff #18458)

We don't; addressed separately in D6552.

qcolombet accepted this revision.Jan 20 2015, 2:43 PM
qcolombet added a reviewer: qcolombet.

Thanks for the clarifications.

LGTM then.

Q.

This revision is now accepted and ready to land.Jan 20 2015, 2:43 PM
This revision was automatically updated to reflect the committed changes.