This is an archive of the discontinued LLVM Phabricator instance.

[X86][AVX] X86ISD::PERMV/PERMV3 node types can never fold index ops
ClosedPublic

Authored by RKSimon on Apr 11 2019, 4:23 AM.

Details

Summary

Improves codegen demonstrated by D60512 - instructions represented by X86ISD::PERMV/PERMV3 can never memory fold the operand used for their index register.

This patch updates the 'isUseOfShuffle' helper into the more capable 'isFoldableUseOfShuffle' that recognises that the op is used for a X86ISD::PERMV/PERMV3 index mask and can't be folded - allowing us to use broadcast/subvector-broadcast ops to reduce the size of the mask constant pool data.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Apr 11 2019, 4:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 11 2019, 4:23 AM
Herald added a subscriber: arphaman. · View Herald Transcript
RKSimon updated this revision to Diff 194699.Apr 11 2019, 8:38 AM
RKSimon edited the summary of this revision. (Show Details)

rebase after rL358186 et al

craig.topper added inline comments.Apr 11 2019, 11:05 PM
lib/Target/X86/X86ISelLowering.cpp
7575

Drop the elses after the returns?

RKSimon updated this revision to Diff 194840.Apr 12 2019, 4:12 AM

Removed if-else chain

This revision is now accepted and ready to land.Apr 14 2019, 5:55 PM
This revision was automatically updated to reflect the committed changes.