From: Simon Pilgrim Date: Mon, 14 Nov 2016 10:40:23 +0000 (+0000) Subject: Remove redundant condition (PR28800) NFCI. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d8482a88d5a3a43ef251e642b352fb1e4505335;p=platform%2Fupstream%2Fllvm.git Remove redundant condition (PR28800) NFCI. 'A || (!A && B)' is equivalent to 'A || B': (LoopCycle > DefCycle) || (LoopCycle <= DefCycle && LoopStage <= DefStage) --> (LoopCycle > DefCycle) || (LoopStage <= DefStage) llvm-svn: 286811 --- diff --git a/llvm/lib/CodeGen/MachinePipeliner.cpp b/llvm/lib/CodeGen/MachinePipeliner.cpp index 37455c5..23d7c60 100644 --- a/llvm/lib/CodeGen/MachinePipeliner.cpp +++ b/llvm/lib/CodeGen/MachinePipeliner.cpp @@ -3805,8 +3805,7 @@ bool SMSchedule::isLoopCarried(SwingSchedulerDAG *SSD, MachineInstr &Phi) { return true; unsigned LoopCycle = cycleScheduled(UseSU); int LoopStage = stageScheduled(UseSU); - return LoopCycle > DefCycle || - (LoopCycle <= DefCycle && LoopStage <= DefStage); + return (LoopCycle > DefCycle) || (LoopStage <= DefStage); } /// Return true if the instruction is a definition that is loop carried