diff options
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/InstCombine/InstructionCombining.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/Transforms/InstCombine/InstructionCombining.cpp b/lib/Transforms/InstCombine/InstructionCombining.cpp index dc7fe5cf6b..e9e05ceb65 100644 --- a/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -758,12 +758,7 @@ Type *InstCombiner::FindElementAtOffset(Type *Ty, int64_t Offset, FirstIdx = Offset/TySize; Offset -= FirstIdx*TySize; - // Handle hosts where % returns negative instead of values [0..TySize). - if (Offset < 0) { - --FirstIdx; - Offset += TySize; - assert(Offset >= 0); - } + assert(Offset >= 0 && "Offset should never be negative!"); assert((uint64_t)Offset < (uint64_t)TySize && "Out of range offset"); } |