From 3d8482a88d5a3a43ef251e642b352fb1e4505335 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Mon, 14 Nov 2016 10:40:23 +0000 Subject: [PATCH] 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 --- llvm/lib/CodeGen/MachinePipeliner.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 -- 2.7.4