[llvm] [WIP][SelectionDAG] Add support for the 3-way comparison intrinsics [US]CMP (PR #91871)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sat May 11 17:58:50 PDT 2024
================
@@ -1246,6 +1251,14 @@ SDValue DAGTypeLegalizer::PromoteIntRes_SADDSUBO(SDNode *N, unsigned ResNo) {
return Res;
}
+SDValue DAGTypeLegalizer::PromoteIntRes_CMP(SDNode *N) {
+ EVT PromotedResultTy =
+ TLI.getTypeToTransformTo(*DAG.getContext(), N->getValueType(0));
+ SDValue Result = DAG.getNode(N->getOpcode(), SDLoc(N), PromotedResultTy,
+ N->getOperand(0), N->getOperand(1));
----------------
nikic wrote:
Can directly return here, no need to store in a variable first.
https://github.com/llvm/llvm-project/pull/91871
More information about the llvm-commits
mailing list