https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125774

--- Comment #1 from Drea Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 64733
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64733&action=edit
gimple testcase that shows the issue on the trunk

dom2 output

Optimizing statement _20 = *_19;
 Registering value_relation (_19 > a_8(D)) (bb3) at _19 = a_8(D) + 4;
LKUP STMT _20 = *_19 with .MEM_26(D)
2>>> STMT _20 = *_19 with .MEM_26(D)
Optimizing statement _21 = _20 > lower_9;
LKUP STMT _21 = _20 gt_expr lower_9
2>>> STMT _21 = _20 gt_expr lower_9
Optimizing statement _22 = lower_9 > _20;
LKUP STMT _22 = lower_9 gt_expr _20
2>>> STMT _22 = lower_9 gt_expr _20
Optimizing statement _23 = _21 | _22;
LKUP STMT _23 = _21 bit_ior_expr _22
2>>> STMT _23 = _21 bit_ior_expr _22
Optimizing statement if (_23 != 0)
  Relation adjustment: _21  and _22  combine to produce [irange] _Bool [1, 1]
  Replaced '_23' with constant '1'

Huh `a > b | b < a` is just `a != b` and not just 1. Unless I messed up
somewhere.

Reply via email to