From 11326cbcdb9710311832774ccb08e69a607813ef Mon Sep 17 00:00:00 2001 From: Philip Reames Date: Mon, 3 May 2021 18:23:41 -0700 Subject: [PATCH] [IndVarSimplify][NFC] Removed mayThrow from if-condition in predicateLoopExits of IndVarSimplify Instruction has mayHaveSideEffects method that returns true if mayThrow return true because this is called internally in the first method. As such, the call being removed is redundant. Patch By: vdsered (Daniil Seredkin) Differential Revision: https://reviews.llvm.org/D101685 --- llvm/lib/Transforms/Scalar/IndVarSimplify.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp index 64ae2b3..9ee2a2d 100644 --- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -1668,7 +1668,7 @@ bool IndVarSimplify::predicateLoopExits(Loop *L, SCEVExpander &Rewriter) { for (BasicBlock *BB : L->blocks()) for (auto &I : *BB) // TODO:isGuaranteedToTransfer - if (I.mayHaveSideEffects() || I.mayThrow()) + if (I.mayHaveSideEffects()) return false; bool Changed = false; -- 2.7.4