[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 467f39249d
commit 279d74ffd1
No known key found for this signature in database
GPG Key ID: 717E4EB972E515EF
1 changed files with 1 additions and 1 deletions

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));