This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
re: [patch] Deal with larger anti-ranages in compare_range_with_value
- From: Tom Truscott <trt at unx dot sas dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: ja2morri at csclub dot uwaterloo dot ca
- Date: Wed, 27 Jul 2005 13:26:03 -0400 (EDT)
- Subject: re: [patch] Deal with larger anti-ranages in compare_range_with_value
Interesting. But don't EQ/NE work the same way?
E.g. ~[0,1] != 0 should be considered true, I think.
Something like:
/* VAL_1 <= VAL <= VAL_2 implies ~[VAL1, VAL2] != VAL */
if ((min_comp == 0 || min_comp == -1) && (max_comp == 0 || max_comp == 1))
return (comp == NE_EXPR) ? boolean_true_node : boolean_false_node;
Tom Truscott