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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2025-10-12
             Blocks|                            |53947, 85316
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |missed-optimization
     Ever confirmed|0                           |1

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Also using:

#define ASSUME(EXPR) do { if (!(EXPR)) __builtin_unreachable(); } while(0)

Looks does not work either:
  _8 = MEM[(const double *)_7 clique 1 base 2];
  _9 = __builtin_isfinite (_8);
  if (_9 == 0)
    goto <bb 5>; [0.04%]
  else
    goto <bb 6>; [99.96%]

  <bb 5> [local count: 839926]:
  __builtin_unreachable ();

_8 should have a range that does not include inf.

Oh that works for x86_64:
```
  _8 = MEM[(const double *)_7 clique 1 base 2];
  # RANGE [frange] double [0.0 (0x0.0p+0), +Inf] +NAN
  _9 = ABS_EXPR <_8>;
  if (_9 u> 1.79769313486231570814527423731704356798070567525844996599e+308)
    goto <bb 5>; [0.04%]
  else
    goto <bb 6>; [99.96%]

  <bb 5> [local count: 839926]:
  __builtin_unreachable ();
```

But the         ASSUME(pa[d] > 0 && pb[d] > 0);

does not work.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947
[Bug 53947] [meta-bug] vectorizer missed-optimizations
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85316
[Bug 85316] [meta-bug] VRP range propagation missed cases

Reply via email to