[llvm] r292469 - [X86] Merge LowerADD and LowerSUB into a single LowerADD_SUB since they are identical.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 18 19:49:29 PST 2017
Author: ctopper
Date: Wed Jan 18 21:49:29 2017
New Revision: 292469
URL: http://llvm.org/viewvc/llvm-project?rev=292469&view=rev
Log:
[X86] Merge LowerADD and LowerSUB into a single LowerADD_SUB since they are identical.
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=292469&r1=292468&r2=292469&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Jan 18 21:49:29 2017
@@ -20846,17 +20846,7 @@ static SDValue Lower512IntArith(SDValue
DAG.getNode(Op.getOpcode(), dl, NewVT, LHS2, RHS2));
}
-static SDValue LowerADD(SDValue Op, SelectionDAG &DAG) {
- if (Op.getValueType() == MVT::i1)
- return DAG.getNode(ISD::XOR, SDLoc(Op), Op.getValueType(),
- Op.getOperand(0), Op.getOperand(1));
- assert(Op.getSimpleValueType().is256BitVector() &&
- Op.getSimpleValueType().isInteger() &&
- "Only handle AVX 256-bit vector integer operation");
- return Lower256IntArith(Op, DAG);
-}
-
-static SDValue LowerSUB(SDValue Op, SelectionDAG &DAG) {
+static SDValue LowerADD_SUB(SDValue Op, SelectionDAG &DAG) {
if (Op.getValueType() == MVT::i1)
return DAG.getNode(ISD::XOR, SDLoc(Op), Op.getValueType(),
Op.getOperand(0), Op.getOperand(1));
@@ -23404,8 +23394,8 @@ SDValue X86TargetLowering::LowerOperatio
case ISD::ADDE:
case ISD::SUBC:
case ISD::SUBE: return LowerADDC_ADDE_SUBC_SUBE(Op, DAG);
- case ISD::ADD: return LowerADD(Op, DAG);
- case ISD::SUB: return LowerSUB(Op, DAG);
+ case ISD::ADD:
+ case ISD::SUB: return LowerADD_SUB(Op, DAG);
case ISD::SMAX:
case ISD::SMIN:
case ISD::UMAX:
More information about the llvm-commits
mailing list