This is an archive of the discontinued LLVM Phabricator instance.

[X86] Limit the number of target specific nodes emitted in LowerShiftParts
ClosedPublic

Authored by craig.topper on Jun 26 2018, 5:16 PM.

Details

Summary

The important part is the creation of the SHLD/SHRD nodes. The compare and the conditional move can use target independent nodes that can be legalized on their own. This gives some opportunities to trigger the optimizations present in the lowering for those things. And its just better to limit the number of places we emit target specific nodes.

The changed test cases still aren't optimal.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Jun 26 2018, 5:16 PM
RKSimon added inline comments.Jun 28 2018, 8:31 AM
test/CodeGen/X86/legalize-shift-64.ll
146 ↗(On Diff #152992)

?

craig.topper added inline comments.Jun 28 2018, 12:23 PM
test/CodeGen/X86/legalize-shift-64.ll
146 ↗(On Diff #152992)

I didn't look closely at it. I'm assuming we're missing constant folding on X86ISD::OR.

Notice in the LHS side we do the equally dumb

movb $32, %dl
testb %dl, %dl
jne
RKSimon accepted this revision.Jun 29 2018, 5:31 AM

LGTM

test/CodeGen/X86/legalize-shift-64.ll
146 ↗(On Diff #152992)

I've raised PR37987 to track this.

This revision is now accepted and ready to land.Jun 29 2018, 5:31 AM
This revision was automatically updated to reflect the committed changes.