diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2021-04-09 16:10:57 +0100 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2021-04-09 16:11:11 +0100 |
commit | d8bc4de3cfe045cf393f6928e359a6f05deffd55 (patch) | |
tree | c6b66e384958a1da014e711d96c2213c87df23b8 /llvm/lib/Target/X86 | |
parent | [RGT] Tweak test so assertion is always executed (diff) | |
download | llvm-project-d8bc4de3cfe045cf393f6928e359a6f05deffd55.tar.gz llvm-project-d8bc4de3cfe045cf393f6928e359a6f05deffd55.tar.bz2 llvm-project-d8bc4de3cfe045cf393f6928e359a6f05deffd55.zip |
[X86] Fold cmpeq/ne(or(X,Y),X) --> cmpeq/ne(and(~X,Y),0) on non-BMI targets (PR44136)
Followup to D100177, enable the fold for non-BMI targets as well.
Diffstat (limited to 'llvm/lib/Target/X86')
-rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 12f97372859b..321d4791029a 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -48165,7 +48165,7 @@ static SDValue combineSetCC(SDNode *N, SelectionDAG &DAG, // cmpeq(or(X,Y),X) --> cmpeq(and(~X,Y),0) // cmpne(or(X,Y),X) --> cmpne(and(~X,Y),0) - if (OpVT.isScalarInteger() && Subtarget.hasBMI()) { + if (OpVT.isScalarInteger()) { auto MatchOrCmpEq = [&](SDValue N0, SDValue N1) { if (N0.getOpcode() == ISD::OR && N0->hasOneUse()) { if (N0.getOperand(0) == N1) |