From 54c2ca25392d242fcf1e5cdc3d97737c8b002384 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Fri, 26 Dec 2014 09:10:14 +0000 Subject: InstCombe: Infer nsw for multiplies We already utilize this logic for reducing overflow intrinsics, it makes sense to reuse it for normal multiplies as well. llvm-svn: 224847 --- llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp') diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp index 6a4e721db46..a5dd89cc4af 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp @@ -886,8 +886,7 @@ Value *InstCombiner::simplifyRangeCheck(ICmpInst *Cmp0, ICmpInst *Cmp1, // This simplification is only valid if the upper range is not negative. bool IsNegative, IsNotNegative; - ComputeSignBit(RangeEnd, IsNotNegative, IsNegative, DL, 0, AT, - Cmp1, DT); + ComputeSignBit(RangeEnd, IsNotNegative, IsNegative, /*Depth=*/0, Cmp1); if (!IsNotNegative) return nullptr; -- cgit v1.2.3