[llvm] [ConstantTime][LLVM] Add llvm.ct.select intrinsic with generic SelectionDAG lowering (PR #166702)

via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 8 09:01:45 PST 2025


================
@@ -6674,6 +6773,38 @@ void SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I,
     updateDAGForMaybeTailCall(MC);
     return;
   }
+  case Intrinsic::ct_select: {
+    // Set function attribute to indicate ct.select usage
+    Function &F = DAG.getMachineFunction().getFunction();
+    F.addFnAttr("ct-select");
----------------
kumarak wrote:

It is adding an attribute to MachineFunction that will be checked later during instructions bundling. We use instruction bundling in target specific lowering pipeline and will be part of subsequent PR. 

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


More information about the llvm-commits mailing list