[llvm] [IR] `select` should reject token-like types (PR #219162)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 27 02:59:49 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- llvm/lib/IR/Verifier.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 83dce6a71..b5ab099c7 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -3571,8 +3571,8 @@ void Verifier::visitSelectInst(SelectInst &SI) {
SI.getOperand(2)),
"Invalid operands for select instruction!", &SI);
- Check(!SI.getType()->isTokenLikeTy(),
- "Select values cannot have token type!", &SI);
+ Check(!SI.getType()->isTokenLikeTy(), "Select values cannot have token type!",
+ &SI);
Check(SI.getTrueValue()->getType() == SI.getType(),
"Select values must have same type as select instruction!", &SI);
``````````
</details>
https://github.com/llvm/llvm-project/pull/219162
More information about the llvm-commits
mailing list