[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-bugs
Subject: [Bug tree-optimization/64130] vrp: handle non zero constant divided by range cannot be zero.
From: "andi-gcc at firstfloor dot org" <gcc-bugzilla () gcc ! gnu ! org>
Date: 2014-11-30 20:57:20
Message-ID: bug-64130-4-JCWmRQ7LGw () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64130
--- Comment #3 from Andi Kleen <andi-gcc at firstfloor dot org> ---
You're right. I actually meant
x >= maxval(typeof(a)), x / a cannot be 0.
Corrected test case (assuming 64bit target):
#include <limits.h>
int fsigned(int a)
{
return 0x1fffffffL / a == 0;
}
int funsigned(unsigned a)
{
return 0x1fffffffL / a == 0;
}
>So this should be optimized to a > 100 instead.
Yes this would make sense too.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic