This is an archive of the discontinued LLVM Phabricator instance.

[X86] Remove some intrinsic instructions from hasPartialRegUpdate
ClosedPublic

Authored by craig.topper on Dec 9 2016, 12:06 AM.

Details

Summary

These intrinsic instructions are all selected from intrinsics that have well defined behavior for where the upper bits come from. It's not the same place as the lower bits.

As you can see we were suppressing load folding for these instructions in some cases. In none of the cases was the separate load helping avoid a partial dependency on the destination register. So we should just go ahead and allow the load to be folded.

Only foldMemoryOperand was suppressing folding for these. They all have patterns for folding sse_load_f32/f64 that aren't gated with OptForSize, but sse_load_f32/f64 doesn't allow 128-bit vector loads. It only allows scalar_to_vector and vzmovl of scalar loads to match. There's no reason we can't allow a 128-bit vector load to be narrowed so I would like to fix sse_load_f32/f64 to allow that. And if I do that it changes some of these same test cases to fold the load too.

Diff Detail

Event Timeline

craig.topper retitled this revision from to [X86] Remove some intrinsic instructions from hasPartialRegUpdate.
craig.topper updated this object.
craig.topper added reviewers: RKSimon, spatel, zvi.
craig.topper added a subscriber: llvm-commits.
RKSimon accepted this revision.Dec 10 2016, 6:47 AM
RKSimon edited edge metadata.

We're missing a roundsd test but otherwise LGTM.

This revision is now accepted and ready to land.Dec 10 2016, 6:47 AM
This revision was automatically updated to reflect the committed changes.