Skip to content

Commit 01d267d

Browse files
committed
[X86] SimplifyMultipleUseDemandedBits - target shuffles might not be identity
If we don't demand any non-undef shuffle elements then the assert will fail as all shuffle inputs would still be flagged as 'identity' safe. Exposed by an incoming patch. llvm-svn: 368022
1 parent 3cfeaa4 commit 01d267d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34758,12 +34758,13 @@ SDValue X86TargetLowering::SimplifyMultipleUseDemandedBitsForTargetNode(
3475834758
if (IdentityOp == 0)
3475934759
break;
3476034760
}
34761-
assert((IdentityOp == 0 || IdentityOp.countPopulation() == 1) &&
34762-
"Multiple identity shuffles detected");
3476334761

3476434762
if (AllUndef)
3476534763
return DAG.getUNDEF(VT);
3476634764

34765+
assert((IdentityOp == 0 || IdentityOp.countPopulation() == 1) &&
34766+
"Multiple identity shuffles detected");
34767+
3476734768
for (int i = 0; i != NumOps; ++i)
3476834769
if (IdentityOp[i])
3476934770
return DAG.getBitcast(VT, ShuffleOps[i]);

0 commit comments

Comments
 (0)