[llvm] r305466 - [DAG] Use correct size for truncated store merge of load. NFCI.
Nirav Dave via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 15 06:28:10 PDT 2017
Author: niravd
Date: Thu Jun 15 08:28:06 2017
New Revision: 305466
URL: http://llvm.org/viewvc/llvm-project?rev=305466&view=rev
Log:
[DAG] Use correct size for truncated store merge of load. NFCI.
Avoid non-legal memory ops by checking correct size when merging
stores of loads into a extload-truncstore pair.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=305466&r1=305465&r2=305466&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu Jun 15 08:28:06 2017
@@ -12959,8 +12959,8 @@ bool DAGCombiner::MergeConsecutiveStores
TLI.allowsMemoryAccess(Context, DL, LegalizedStoredValueTy,
FirstStoreAS, FirstStoreAlign, &IsFastSt) &&
IsFastSt &&
- TLI.allowsMemoryAccess(Context, DL, LegalizedStoredValueTy,
- FirstLoadAS, FirstLoadAlign, &IsFastLd) &&
+ TLI.allowsMemoryAccess(Context, DL, StoreTy, FirstLoadAS,
+ FirstLoadAlign, &IsFastLd) &&
IsFastLd)
LastLegalIntegerType = i + 1;
}
More information about the llvm-commits
mailing list