[PATCH] D76156: Initialize IsFast* values
Brian Cain via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 13 13:29:28 PDT 2020
bcain created this revision.
bcain added reviewers: niravd, RKSimon.
bcain added a project: LLVM.
Herald added a subscriber: hiraditya.
We must initialize these values in case some targets do not assign to them in allowsMemoryAccess().
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D76156
Files:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -16148,7 +16148,7 @@
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 @@
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,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76156.250289.patch
Type: text/x-patch
Size: 946 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200313/22a7ff12/attachment.bin>
More information about the llvm-commits
mailing list