[Bug tree-optimization/103559] Can't optimize away < 0 check on sqrt

2023-03-30 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103559 --- Comment #11 from Jakub Jelinek --- Actually, I was just misreading the tree dumps, we use hw insn for x u>= 0.0, which is UNGE_EXPR, so it is true if x is NAN or GE_EXPR, or as described in the tree-call-cdce.cc comment: y = sqrt

[Bug tree-optimization/103559] Can't optimize away < 0 check on sqrt

2023-03-30 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103559 --- Comment #10 from Xi Ruoyao --- (In reply to Jakub Jelinek from comment #9) > isless (NAN, 0.0) should be false, no, so NAN shouldn't errno = EDOM for > glibc. Oh, I misunderstood your question.

[Bug tree-optimization/103559] Can't optimize away < 0 check on sqrt

2023-03-30 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103559 --- Comment #9 from Jakub Jelinek --- isless (NAN, 0.0) should be false, no, so NAN shouldn't errno = EDOM for glibc.

[Bug tree-optimization/103559] Can't optimize away < 0 check on sqrt

2023-03-30 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103559 Xi Ruoyao changed: What|Removed |Added CC||xry111 at gcc dot gnu.org --- Comment #8

[Bug tree-optimization/103559] Can't optimize away < 0 check on sqrt

2023-03-29 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103559 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment

[Bug tree-optimization/103559] Can't optimize away < 0 check on sqrt

2023-03-29 Thread llvm at rifkin dot dev via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103559 --- Comment #6 from Jeremy R. --- Thanks!

[Bug tree-optimization/103559] Can't optimize away < 0 check on sqrt

2023-03-29 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103559 Aldy Hernandez changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug tree-optimization/103559] Can't optimize away < 0 check on sqrt

2021-12-05 Thread vanyacpp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103559 Ivan Sorokin changed: What|Removed |Added CC||vanyacpp at gmail dot com --- Comment

[Bug tree-optimization/103559] Can't optimize away < 0 check on sqrt

2021-12-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103559 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement Keywords|

[Bug tree-optimization/103559] Can't optimize away < 0 check on sqrt

2021-12-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103559 --- Comment #3 from Andrew Pinski --- Also with -fno-trapping-math GCC is able to remove if even for < case.

[Bug tree-optimization/103559] Can't optimize away < 0 check on sqrt

2021-12-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103559 --- Comment #2 from Andrew Pinski --- Oh it is because you are using the wrong test. Try: if (isless (x, 0)) __builtin_unreachable(); And yes there is a difference.

[Bug tree-optimization/103559] Can't optimize away < 0 check on sqrt

2021-12-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103559 --- Comment #1 from Andrew Pinski --- I think there is another bug about this. Basically right now there is no jump threading done for float comparisons nor any kind of VRP for them either.