This is an archive of the discontinued LLVM Phabricator instance.

[X86][AVX] foldShuffleOfHorizOp - don't attempt to handle 256-bit X86ISD::VBROADCAST (PR49971)
ClosedPublic

Authored by RKSimon on Apr 22 2021, 1:20 PM.

Details

Summary
NOTE: This is for the 12.x release branch ONLY

Minimal patch to avoid the issue encountered in PR49971 (it's already been dealt with in trunk through a larger refactor that can't be easily merged).

Bail for non-128-bit vector broadcasts of (F)HADD/SUB ops - the existing logic doesn't correctly deal with the fact that the broadcast will splat across the 128-bit lanes.

Diff Detail

Event Timeline

RKSimon created this revision.Apr 22 2021, 1:20 PM
RKSimon requested review of this revision.Apr 22 2021, 1:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2021, 1:20 PM
wristow accepted this revision.Apr 22 2021, 3:57 PM

Clear simple, safe fix. And I've verified it fixes the problem we ran into downstream.
LGTM

This revision is now accepted and ready to land.Apr 22 2021, 3:57 PM

@spatel @craig.topper Since this is a patch for a release branch please can we get a second approval?

spatel accepted this revision.Apr 23 2021, 6:47 AM

LGTM

@tstellar Are you OK with merging this patch to 12.x (when the time comes) or do you need us to do anything else? Cheers, Simon.

Can you file a bug for this?