[llvm] r326020 - [X86] Use SelectionDAG::getNot instead of implementing manually. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 23 19:15:54 PST 2018
Author: ctopper
Date: Fri Feb 23 19:15:54 2018
New Revision: 326020
URL: http://llvm.org/viewvc/llvm-project?rev=326020&view=rev
Log:
[X86] Use SelectionDAG::getNot instead of implementing manually. NFC
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=326020&r1=326019&r2=326020&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Fri Feb 23 19:15:54 2018
@@ -31484,8 +31484,7 @@ combineVSelectWithAllOnesOrZeros(SDNode
if (TValIsAllZeros && Subtarget.hasAVX512() && Cond.hasOneUse() &&
CondVT.getVectorElementType() == MVT::i1) {
// Invert the cond to not(cond) : xor(op,allones)=not(op)
- SDValue CondNew = DAG.getNode(ISD::XOR, DL, CondVT, Cond,
- DAG.getAllOnesConstant(DL, CondVT));
+ SDValue CondNew = DAG.getNOT(DL, Cond, CondVT);
// Vselect cond, op1, op2 = Vselect not(cond), op2, op1
return DAG.getSelect(DL, VT, CondNew, RHS, LHS);
}
More information about the llvm-commits
mailing list