1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

[InstSimplify] Fix unused variable warning (NFC)

GCC warning:
```
/llvm-project/llvm/lib/Analysis/InstructionSimplify.cpp: In function ‘llvm::Value* SimplifyWithOpReplaced(llvm::Value*, llvm::Value*, llvm::Value*, const llvm::SimplifyQuery&, bool, unsigned int)’:
/llvm-project/llvm/lib/Analysis/InstructionSimplify.cpp:3993:15: warning: unused variable ‘SI’ [-Wunused-variable]
 3993 |     if (auto *SI = dyn_cast<SelectInst>(I))
      |               ^~
```
This commit is contained in:
Yang Fan 2021-03-24 09:56:36 +08:00
parent 054affa82b
commit 404db5968d

View File

@ -3990,7 +3990,7 @@ static Value *SimplifyWithOpReplaced(Value *V, Value *Op, Value *RepOp,
return PreventSelfSimplify(SimplifyGEPInst(GEP->getSourceElementType(),
NewOps, Q, MaxRecurse - 1));
if (auto *SI = dyn_cast<SelectInst>(I))
if (isa<SelectInst>(I))
return PreventSelfSimplify(
SimplifySelectInst(NewOps[0], NewOps[1], NewOps[2], Q,
MaxRecurse - 1));