[Bug tree-optimization/126743] If a != b, then (a | b) (==,!=) 0 -> (false, true)
"pinskia at gcc dot gnu.org via Gcc-bugs" <[email protected]>
| Newsgroups | gmane.comp.gcc.bugs |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126743
Drea Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2026-08-09
Status|UNCONFIRMED |NEW
Severity|normal |enhancement
Blocks| |85316
Ever confirmed|0 |1
--- Comment #1 from Drea Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
That is the range of `a|b` when `a != b` is non-zero. (For integer and
pointers).
Yes this should an easy thing to do I think.
Add an operator_bitwise_or::op1_op2_relation_effect which does that for
rel==VREL_NE.
See operator_bitwise_xor::op1_op2_relation_effect also for a quick example.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85316
[Bug 85316] [meta-bug] VRP range propagation missed cases