[llvm] d0aa774 - [X86] convertIntLogicToFPLogic - pull out condcodes. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 8 05:31:46 PST 2022
Author: Simon Pilgrim
Date: 2022-03-08T13:31:17Z
New Revision: d0aa77440c4699336889df5e1b1df4840186a609
URL: https://github.com/llvm/llvm-project/commit/d0aa77440c4699336889df5e1b1df4840186a609
DIFF: https://github.com/llvm/llvm-project/commit/d0aa77440c4699336889df5e1b1df4840186a609.diff
LOG: [X86] convertIntLogicToFPLogic - pull out condcodes. NFCI.
Added:
Modified:
llvm/lib/Target/X86/X86ISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index c8371d0699bda..405ec5d9bcb1a 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -46815,6 +46815,9 @@ static SDValue convertIntLogicToFPLogic(SDNode *N, SelectionDAG &DAG,
!N0.hasOneUse() || !N1.hasOneUse())
return SDValue();
+ ISD::CondCode CC0 = cast<CondCodeSDNode>(N0.getOperand(2))->get();
+ ISD::CondCode CC1 = cast<CondCodeSDNode>(N1.getOperand(2))->get();
+
// Convert scalar FP compares and logic to vector compares (COMIS* to CMPS*)
// and vector logic:
// logic (setcc N00, N01), (setcc N10, N11) -->
@@ -46829,10 +46832,8 @@ static SDValue convertIntLogicToFPLogic(SDNode *N, SelectionDAG &DAG,
SDValue Vec01 = DAG.getNode(ISD::SCALAR_TO_VECTOR, DL, VecVT, N01);
SDValue Vec10 = DAG.getNode(ISD::SCALAR_TO_VECTOR, DL, VecVT, N10);
SDValue Vec11 = DAG.getNode(ISD::SCALAR_TO_VECTOR, DL, VecVT, N11);
- SDValue Setcc0 = DAG.getSetCC(DL, BoolVecVT, Vec00, Vec01,
- cast<CondCodeSDNode>(N0.getOperand(2))->get());
- SDValue Setcc1 = DAG.getSetCC(DL, BoolVecVT, Vec10, Vec11,
- cast<CondCodeSDNode>(N1.getOperand(2))->get());
+ SDValue Setcc0 = DAG.getSetCC(DL, BoolVecVT, Vec00, Vec01, CC0);
+ SDValue Setcc1 = DAG.getSetCC(DL, BoolVecVT, Vec10, Vec11, CC1);
SDValue Logic = DAG.getNode(N->getOpcode(), DL, BoolVecVT, Setcc0, Setcc1);
return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL, VT, Logic, ZeroIndex);
}
More information about the llvm-commits
mailing list