From 7c57ae57a890126ba646bd97dc94ba00e5e96704 Mon Sep 17 00:00:00 2001 From: Nirav Dave Date: Wed, 27 Jun 2018 19:41:25 +0000 Subject: [PATCH] [DAGCombine] Disable TokenFactor simplifications when optnone. llvm-svn: 335773 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 1b88f7c..723ab66 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -1692,6 +1692,10 @@ SDValue DAGCombiner::visitTokenFactor(SDNode *N) { return N->getOperand(1); } + // Don't simplify token factors if optnone. + if (OptLevel == CodeGenOpt::None) + return SDValue(); + SmallVector TFs; // List of token factors to visit. SmallVector Ops; // Ops for replacing token factor. SmallPtrSet SeenOps; -- 2.7.4