[PATCH] D64389: [NFC] [X86] Fix scan-build complaining

Pengfei Wang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 9 00:29:32 PDT 2019


pengfei created this revision.
pengfei added reviewers: RKSimon, xiangzhangllvm, craig.topper.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Remove unused variable. This fixes bug:
https://bugs.llvm.org/show_bug.cgi?id=42526

Signed-off-by: pengfei <pengfei.wang at intel.com>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D64389

Files:
  clang/lib/CodeGen/CGBuiltin.cpp


Index: clang/lib/CodeGen/CGBuiltin.cpp
===================================================================
--- clang/lib/CodeGen/CGBuiltin.cpp
+++ clang/lib/CodeGen/CGBuiltin.cpp
@@ -11755,12 +11755,11 @@
     Value *Call = Builder.CreateCall(CGM.getIntrinsic(ID), {Ops[0], Ops[1]});
     Value *Result = Builder.CreateExtractValue(Call, 0);
     Result = EmitX86MaskedCompareResult(*this, Result, NumElts, nullptr);
-    Value *Store = Builder.CreateDefaultAlignedStore(Result, Ops[2]);
+    Builder.CreateDefaultAlignedStore(Result, Ops[2]);
 
     Result = Builder.CreateExtractValue(Call, 1);
     Result = EmitX86MaskedCompareResult(*this, Result, NumElts, nullptr);
-    Store = Builder.CreateDefaultAlignedStore(Result, Ops[3]);
-    return Store;
+    return Builder.CreateDefaultAlignedStore(Result, Ops[3]);
   }
 
   case X86::BI__builtin_ia32_vpmultishiftqb128:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64389.208605.patch
Type: text/x-patch
Size: 874 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190709/e2cc94f1/attachment.bin>


More information about the cfe-commits mailing list