From: Simon Pilgrim Date: Mon, 14 Nov 2016 10:40:23 +0000 (+0000) Subject: Remove redundant condition (PR28800) NFCI. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c4d8c58337a78668e8662672bd58fb2ce7031c28;p=llvm Remove redundant condition (PR28800) NFCI. 'A || (!A && B)' is equivalent to 'A || B': (LoopCycle > DefCycle) || (LoopCycle <= DefCycle && LoopStage <= DefStage) --> (LoopCycle > DefCycle) || (LoopStage <= DefStage) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286811 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/MachinePipeliner.cpp b/lib/CodeGen/MachinePipeliner.cpp index 37455c5b7d3..23d7c6094a9 100644 --- a/lib/CodeGen/MachinePipeliner.cpp +++ b/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