[llvm] 6ea7437 - [SelectionDAG] Bail out of mergeTruncStores when not optimizing
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 20 16:58:35 PDT 2021
Author: Arthur Eubanks
Date: 2021-10-20T16:58:22-07:00
New Revision: 6ea7437ca5a4f8aff895d940cd8b0e5b65419f86
URL: https://github.com/llvm/llvm-project/commit/6ea7437ca5a4f8aff895d940cd8b0e5b65419f86
DIFF: https://github.com/llvm/llvm-project/commit/6ea7437ca5a4f8aff895d940cd8b0e5b65419f86.diff
LOG: [SelectionDAG] Bail out of mergeTruncStores when not optimizing
With unoptimized code, we may see lots of stores and spend too much time in mergeTruncStores.
Fixes PR51827.
Reviewed By: spatel
Differential Revision: https://reviews.llvm.org/D111596
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 5f656ece0e5c..4686ee0b41b4 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -7315,7 +7315,7 @@ SDValue DAGCombiner::mergeTruncStores(StoreSDNode *N) {
// TODO: If there is evidence that running this later would help, this
// limitation could be removed. Legality checks may need to be added
// for the created store and optional bswap/rotate.
- if (LegalOperations)
+ if (LegalOperations || OptLevel == CodeGenOpt::None)
return SDValue();
// We only handle merging simple stores of 1-4 bytes.
More information about the llvm-commits
mailing list