Page MenuHomePhabricator

[DAG] Enable ISD::EXTRACT_SUBVECTOR SimplifyMultipleUseDemandedBits handling
ClosedPublic

Authored by RKSimon on Jan 20 2020, 3:17 AM.

Details

Summary

This allows SimplifyDemandedBits to call SimplifyMultipleUseDemandedBits to create a simpler ISD::EXTRACT_SUBVECTOR, which is particularly useful for cases where we're splitting into subvectors anyhow.

Diff Detail

Event Timeline

RKSimon created this revision.Jan 20 2020, 3:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 20 2020, 3:17 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
spatel added inline comments.Thu, Jan 23, 10:20 AM
llvm/test/CodeGen/X86/pr31956.ll
13–14

Looked at this a bit, and I think this is ok. We are intentionally being aggressive about duplicating multi-use loads because eliminating the dependency and reducing register pressure (assuming load-folding) is probably better for perf if this code is in a loop.

In this particular case, there seems to be an opportunity to commute the shufps masks in lowerShuffleWithSHUFPS() in the case where we create 2 shufps ops. I'm guessing that's a very rare occurrence, so not sure if it's worth a TODO comment/bug report.

RKSimon marked an inline comment as done.Thu, Jan 23, 12:21 PM
RKSimon added inline comments.
llvm/test/CodeGen/X86/pr31956.ll
13–14

That shouldn't be a problem, I'll deal with that first.

RKSimon edited the summary of this revision. (Show Details)Fri, Jan 24, 10:38 AM

any more comments?

spatel accepted this revision.Mon, Jan 27, 9:23 AM

LGTM

This revision is now accepted and ready to land.Mon, Jan 27, 9:23 AM