[llvm] [ConstantTime][LLVM] Add llvm.ct.select intrinsic with generic SelectionDAG lowering (PR #166702)
Julius Alexandre via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 19 20:42:18 PDT 2026
wizardengineer wrote:
Thanks for the report. Reproduced. The minimal trigger is a single line, no passes needed:
```llvm
declare token @llvm.ct.select.token(i1, token, token)
```
It crashes at parse time in remangleIntrinsicFunction, before instcombine runs. The reproducer block in your comment seems to have lost the declare line, so noting it here for anyone trying to reproduce.
This is a pre-existing problem in intrinsic remangling rather than something specific to this PR. The same crash happens on main without this patch:
```llvm
declare token @llvm.ssa.copy.token(token)
```
Any intrinsic overloaded on llvm_any_ty hits the same unreachable when the overload type is a token. Constrained overloads like llvm.smax already reject it cleanly. This PR just makes the ct.select name resolvable, which is how the fuzzer reached it.
Filed #210641 for the underlying issue. The fix belongs in intrinsic signature validation so unmanglable overload types get rejected the same way llvm.smax.token is.
https://github.com/llvm/llvm-project/pull/166702
More information about the llvm-commits
mailing list