This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]