This is an archive of the discontinued LLVM Phabricator instance.

[X86] Type legalize v2f32 stores by widening to v4f32, casting to v2f64, extracting f64 and storing.
ClosedPublic

Authored by craig.topper on Oct 11 2018, 2:50 PM.

Details

Summary

This is similar to what D52528 did for loads. It should match what generic type legalization does in 64-bit mode where it uses a v2i64 cast and an i64 store.

Diff Detail

Event Timeline

craig.topper created this revision.Oct 11 2018, 2:50 PM
craig.topper added inline comments.Oct 11 2018, 2:56 PM
test/CodeGen/X86/2012-01-18-vbitcast.ll
10

Something odd happened here. Suspect something to do with how bitcasts from 2 x float to 2 x i32 are legalized. v2f32 is widened but v2i32 is promoted. Generic legalization probably went through the stack Can probably fix with a custom legalization of this bitcast.

test/CodeGen/X86/fold-load-vec.ll
17

Need to investigate

Try to keep combineStore from using i64 when the original type was fp. Prevents a regression in fold-load-vec.ll

RKSimon added inline comments.Oct 13 2018, 5:08 AM
test/CodeGen/X86/2012-01-18-vbitcast.ll
10

Are you looking at this regression or should we just add it to bugzilla for now?

I fixed the bitcast legalization to avoid the stack in r344425. That improved that test and fixed the regression here.

RKSimon accepted this revision.Oct 13 2018, 11:56 AM

LGTM - cheers

This revision is now accepted and ready to land.Oct 13 2018, 11:56 AM
This revision was automatically updated to reflect the committed changes.