[llvm] ad7b930 - Initialize IsFast* values
Brian Cain via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 13 15:46:58 PDT 2020
Author: Brian Cain
Date: 2020-03-13T17:46:32-05:00
New Revision: ad7b930bd18a434cfc4114fdb4075652dd6b1660
URL: https://github.com/llvm/llvm-project/commit/ad7b930bd18a434cfc4114fdb4075652dd6b1660
DIFF: https://github.com/llvm/llvm-project/commit/ad7b930bd18a434cfc4114fdb4075652dd6b1660.diff
LOG: Initialize IsFast* values
We must initialize these values in case some targets do not assign to
them in allowsMemoryAccess().
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index b77594eb4a80..36fc540fe316 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -16148,7 +16148,7 @@ bool DAGCombiner::MergeConsecutiveStores(StoreSDNode *St) {
unsigned Elts = (i + 1) * NumMemElts;
EVT Ty =
EVT::getVectorVT(*DAG.getContext(), MemVT.getScalarType(), Elts);
- bool IsFast;
+ bool IsFast = false;
// Break early when size is too large to be legal.
if (Ty.getSizeInBits() > MaximumLegalStoreInBits)
@@ -16284,7 +16284,8 @@ bool DAGCombiner::MergeConsecutiveStores(StoreSDNode *St) {
if (StoreTy.getSizeInBits() > MaximumLegalStoreInBits)
break;
- bool IsFastSt, IsFastLd;
+ bool IsFastSt = false;
+ bool IsFastLd = false;
if (TLI.isTypeLegal(StoreTy) &&
TLI.canMergeStoresTo(FirstStoreAS, StoreTy, DAG) &&
TLI.allowsMemoryAccess(Context, DL, StoreTy,
More information about the llvm-commits
mailing list