[llvm] [ConstantTime][LLVM] Add llvm.ct.select intrinsic with generic SelectionDAG lowering (PR #166702)
Simon Tatham via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 7 06:24:55 PST 2025
================
@@ -783,6 +783,10 @@ enum NodeType {
/// i1 then the high bits must conform to getBooleanContents.
SELECT,
+ /// Constant-time Select, implemented with CMOV instruction. This is used to
+ /// implement constant-time select.
+ CTSELECT,
----------------
statham-arm wrote:
Also, "Constant-time select [...] This is used to implement constant-time select" isn't really adding any value by repeating the same phrase again :slightly_smiling_face:
Perhaps better to restate the order of parameters (it's obvious _to you_ that it's the same as SELECT immediately above, but perhaps not to the next reader), and also, what conditions apply to the boolean – if it's not an i1, is it still expected to be an integer containing 0 or 1, or is it a bitmask containing 0 or ~0, or what?
https://github.com/llvm/llvm-project/pull/166702
More information about the llvm-commits
mailing list