[llvm] [NFC][SimplifyCFG] Fix a return value in `ConstantComparesGatherer` (PR #155154)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 24 02:52:12 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: Yingwei Zheng (dtcxzyw)
<details>
<summary>Changes</summary>
`ICI->getOperand(0)` is non-null.
---
Full diff: https://github.com/llvm/llvm-project/pull/155154.diff
1 Files Affected:
- (modified) llvm/lib/Transforms/Utils/SimplifyCFG.cpp (+1-1)
``````````diff
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index 055e8cadaab76..bfdda07e61912 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -695,7 +695,7 @@ struct ConstantComparesGatherer {
UsedICmps++;
Vals.push_back(C);
- return ICI->getOperand(0);
+ return true;
}
// If we have "x ult 3", for example, then we can add 0,1,2 to the set.
``````````
</details>
https://github.com/llvm/llvm-project/pull/155154
More information about the llvm-commits
mailing list