[llvm] bf31226 - [InstCombine] Remove unused variables in InstCombineSelect.cpp (NFC)

Jie Fu via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 31 02:41:28 PST 2023


Author: Jie Fu
Date: 2023-12-31T18:40:26+08:00
New Revision: bf312263bfee5d70a37a2269d62f08cf264ca415

URL: https://github.com/llvm/llvm-project/commit/bf312263bfee5d70a37a2269d62f08cf264ca415
DIFF: https://github.com/llvm/llvm-project/commit/bf312263bfee5d70a37a2269d62f08cf264ca415.diff

LOG: [InstCombine] Remove unused variables in InstCombineSelect.cpp (NFC)

llvm-project/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:3810:14: error: unused variable 'LHS' [-Werror,-Wunused-variable]
 3810 |       Value *LHS, *RHS;
      |              ^~~
llvm-project/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:3810:20: error: unused variable 'RHS' [-Werror,-Wunused-variable]
 3810 |       Value *LHS, *RHS;
      |

Added: 
    

Modified: 
    llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp b/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
index cf66f5be2d408f..ab55f235920a7b 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
@@ -3807,7 +3807,6 @@ Instruction *InstCombinerImpl::visitSelectInst(SelectInst &SI) {
 
     // Is (select B, T, F) a SPF?
     if (CondVal->hasOneUse() && SelType->isIntOrIntVectorTy()) {
-      Value *LHS, *RHS;
       if (ICmpInst *Cmp = dyn_cast<ICmpInst>(B))
         if (Value *V = canonicalizeSPF(*Cmp, TrueVal, FalseVal, *this))
           return SelectInst::Create(A, IsAnd ? V : TrueVal,


        


More information about the llvm-commits mailing list