[llvm] 988025a - [llvm-reduce] Fix a warning
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 15 12:28:20 PDT 2022
Author: Kazu Hirata
Date: 2022-10-15T12:28:11-07:00
New Revision: 988025adc703eb1bf8db46665925464328dd60aa
URL: https://github.com/llvm/llvm-project/commit/988025adc703eb1bf8db46665925464328dd60aa
DIFF: https://github.com/llvm/llvm-project/commit/988025adc703eb1bf8db46665925464328dd60aa.diff
LOG: [llvm-reduce] Fix a warning
This patch fixes:
llvm/tools/llvm-reduce/deltas/ReduceOpcodes.cpp:96:21: warning:
unused variable ‘Op’ [-Wunused-variable]
Added:
Modified:
llvm/tools/llvm-reduce/deltas/ReduceOpcodes.cpp
Removed:
################################################################################
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceOpcodes.cpp b/llvm/tools/llvm-reduce/deltas/ReduceOpcodes.cpp
index a834034979254..327125b76b5a1 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceOpcodes.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceOpcodes.cpp
@@ -93,7 +93,7 @@ static void replaceOpcodesInModule(Oracle &O, Module &Mod) {
Instruction *Replacement =
dyn_cast_or_null<Instruction>(reduceInstruction(Mod, I));
if (Replacement && Replacement != &I) {
- if (auto *Op = dyn_cast<FPMathOperator>(Replacement))
+ if (isa<FPMathOperator>(Replacement))
Replacement->copyFastMathFlags(&I);
Replacement->copyIRFlags(&I);
More information about the llvm-commits
mailing list