This is an archive of the discontinued LLVM Phabricator instance.

[X86] Teach X86DAGToDAGISel::shrinkAndImmediate to preserve upper 32 zeroes of a 64 bit mask.
ClosedPublic

Authored by craig.topper on Feb 4 2018, 7:11 PM.

Details

Summary

If the upper 32 bits of a 64 bit mask are all zeros, we have special isel patterns to use a 32-bit and instead of a 64-bit and by relying on the impliciting zeroing of 32 bit ops.

This patch teachs shrinkAndImmediate not to break that optimization.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Feb 4 2018, 7:11 PM

Don't know this code that well - @spatel any comments?

lib/Target/X86/X86ISelDAGToDAG.cpp
2489 ↗(On Diff #132784)

Update comment

spatel accepted this revision.Feb 5 2018, 7:21 AM

Don't know this code that well - @spatel any comments?

This is an improvement to D42088.

LGTM with the updated comment. I'd just copy the summary text as shown here as the code comment.

This revision is now accepted and ready to land.Feb 5 2018, 7:21 AM
This revision was automatically updated to reflect the committed changes.