[Bug tree-optimization/60001] New: VRP fails to fold identical unsigned comparisons
glisse at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 30 22:07:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60001
Bug ID: 60001
Summary: VRP fails to fold identical unsigned comparisons
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: glisse at gcc dot gnu.org
void f(unsigned p,unsigned q){
if(p>=q) throw 42;
if(p>=q) throw 33;
}
VRP fails to eliminate the redundant comparison, only DOM manages to do it.
Since VRP manages with either s/unsigned/int/ or s/>=/>/, I assume it should be
doable.
(in practice, p is an index, q the size of an array, and I wish using unsigned
for anything but bitops and modular arithmetic could be banned)
More information about the Gcc-bugs
mailing list