[llvm] r368022 - [X86] SimplifyMultipleUseDemandedBits - target shuffles might not be identity
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 6 05:41:29 PDT 2019
Author: rksimon
Date: Tue Aug 6 05:41:29 2019
New Revision: 368022
URL: http://llvm.org/viewvc/llvm-project?rev=368022&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=368022&r1=368021&r2=368022&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Aug 6 05:41:29 2019
@@ -34758,12 +34758,13 @@ SDValue X86TargetLowering::SimplifyMulti
if (IdentityOp == 0)
break;
}
- assert((IdentityOp == 0 || IdentityOp.countPopulation() == 1) &&
- "Multiple identity shuffles detected");
if (AllUndef)
return DAG.getUNDEF(VT);
+ assert((IdentityOp == 0 || IdentityOp.countPopulation() == 1) &&
+ "Multiple identity shuffles detected");
+
for (int i = 0; i != NumOps; ++i)
if (IdentityOp[i])
return DAG.getBitcast(VT, ShuffleOps[i]);
More information about the llvm-commits
mailing list