From: Nirav Dave Date: Wed, 27 Jun 2018 19:41:25 +0000 (+0000) Subject: [DAGCombine] Disable TokenFactor simplifications when optnone. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7c57ae57a890126ba646bd97dc94ba00e5e96704;p=platform%2Fupstream%2Fllvm.git [DAGCombine] Disable TokenFactor simplifications when optnone. llvm-svn: 335773 --- 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;