[llvm] [AArch64] Add getCondCode() helper (NFC) (PR #150521)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 28 04:29:56 PDT 2025


================
@@ -3390,6 +3390,12 @@ static void changeVectorFPCCToAArch64CC(ISD::CondCode CC,
   }
 }
 
+/// Like SelectionDAG::getCondCode(), but for AArch64 condition codes.
+static SDValue getCondCode(SelectionDAG &DAG, AArch64CC::CondCode CC) {
+  // TODO: Should be TargetConstant (need to s/imm/timm in patterns).
----------------
s-barannikov wrote:

It doesn't have to, but it will eventually be converted to TargetConstant anyway by instruction selection.
Making it a TargetConstant should reduce the table size and speed up instruction selection a bit.


https://github.com/llvm/llvm-project/pull/150521


More information about the llvm-commits mailing list