[llvm] 2491dc3 - [Utils] Fix a warning
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 12 09:13:23 PDT 2025
Author: Kazu Hirata
Date: 2025-09-12T09:13:16-07:00
New Revision: 2491dc3d6fa6f5e7474fbdac28a8eefdeba52d49
URL: https://github.com/llvm/llvm-project/commit/2491dc3d6fa6f5e7474fbdac28a8eefdeba52d49
DIFF: https://github.com/llvm/llvm-project/commit/2491dc3d6fa6f5e7474fbdac28a8eefdeba52d49.diff
LOG: [Utils] Fix a warning
This patch fixes:
llvm/lib/Transforms/Utils/SimplifyCFG.cpp:338:6: error: unused
function 'isSelectInRoleOfConjunctionOrDisjunction'
[-Werror,-Wunused-function]
Added:
Modified:
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index e5517409ded70..5a842f9b49c1b 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -335,7 +335,8 @@ class SimplifyCFGOpt {
// we synthesize a || b as select a, true, b
// we synthesize a && b as select a, b, false
// this function determines if SI is playing one of those roles.
-bool isSelectInRoleOfConjunctionOrDisjunction(const SelectInst *SI) {
+[[maybe_unused]] bool
+isSelectInRoleOfConjunctionOrDisjunction(const SelectInst *SI) {
return ((isa<ConstantInt>(SI->getTrueValue()) &&
(dyn_cast<ConstantInt>(SI->getTrueValue())->isOne())) ||
(isa<ConstantInt>(SI->getFalseValue()) &&
More information about the llvm-commits
mailing list