[Bug tree-optimization/126827] New: Missing vrp due to builtin calls are not all handled (only handled in nonnegative)

"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=126827

            Bug ID: 126827
           Summary: Missing vrp due to builtin calls are not all handled
                    (only handled in nonnegative)
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: pinskia at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
            Blocks: 126814
  Target Milestone: ---

Take:
```
double f(double a)
{
    if (a > 0)
    {
      a = __builtin_ceil(a);
      if (a < 0)
        __builtin_trap();
    }
    return a;
}
```

the condition leading to trap should be removed.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126814
[Bug 126814] [17 Regression] ICE in RTL expand in fill_ranger_cache at
gimple-range-cache.cc:1658 since r17-3171
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.