Skip to content
Commit 1d2c27b2 authored by Wojciech Matyjewicz's avatar Wojciech Matyjewicz
Browse files

Fix PR2002. Suppose n is the initial value for the induction

variable (with step 1) and m is its final value. Then, the correct trip 
count is SMAX(m,n)-n. Previously, we used SMAX(0,m-n), but m-n may 
overflow and can't in general be interpreted as signed.

Patch by Nick Lewycky.

llvm-svn: 47007
parent 716c10c0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment