From 5cb586acf52331d5d71f02224570230e0abc8f72 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 28 Apr 2007 05:27:36 +0000 Subject: [PATCH] fix a bug triggered by 403.gcc llvm-svn: 36527 --- lib/Transforms/Scalar/InstructionCombining.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 073b9dd52b8..b3496c34399 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -6408,8 +6408,7 @@ Instruction *InstCombiner::commonPointerCastTransforms(CastInst &CI) { // Handle silly modulus not returning values values [0..TySize). if (Offset < 0) { - assert(FirstIdx == 0); - FirstIdx = -1; + --FirstIdx; Offset += TySize; assert(Offset >= 0); }