summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2018-12-07 15:47:52 +0000
committerSanjay Patel <spatel@rotateright.com>2018-12-07 15:47:52 +0000
commit3af4ae9735d16d07fa1321ef3bd25ae86dfc15a3 (patch)
treea9e386515f8ab5924c7995dcdf537f236db32659 /llvm/lib/CodeGen
parent2d9d026c006f59acf75a352c3ecd1098a2f448d7 (diff)
downloadbcm5719-llvm-3af4ae9735d16d07fa1321ef3bd25ae86dfc15a3.tar.gz
bcm5719-llvm-3af4ae9735d16d07fa1321ef3bd25ae86dfc15a3.zip
[DAGCombiner] disable truncation of binops by default
As discussed in the post-commit thread of r347917, this transform is fighting with an existing transform causing an infinite loop or out-of-memory, so this is effectively reverting r347917 and its follow-up r348195 while we investigate the bug. llvm-svn: 348604
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index d0f7f150001..c1cfaa5abd2 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -112,6 +112,12 @@ static cl::opt<bool>
MaySplitLoadIndex("combiner-split-load-index", cl::Hidden, cl::init(true),
cl::desc("DAG combiner may split indexing from loads"));
+// This is a temporary debug flag to disable a combine that is known to
+// conflict with another combine.
+static cl::opt<bool>
+NarrowTruncatedBinops("narrow-truncated-binops", cl::Hidden, cl::init(false),
+ cl::desc("Move truncates ahead of binops"));
+
namespace {
class DAGCombiner {
@@ -9804,7 +9810,7 @@ SDValue DAGCombiner::visitTRUNCATE(SDNode *N) {
case ISD::AND:
case ISD::OR:
case ISD::XOR:
- if (!LegalOperations && N0.hasOneUse() &&
+ if (NarrowTruncatedBinops && !LegalOperations && N0.hasOneUse() &&
(isConstantOrConstantVector(N0.getOperand(0)) ||
isConstantOrConstantVector(N0.getOperand(1)))) {
// TODO: We already restricted this to pre-legalization, but for vectors
OpenPOWER on IntegriCloud