[Bug c++/91645] New: Missed optimization with sqrt(x*x)

2019-09-03 Thread lisyarus at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: lisyarus at gmail dot com Target Milestone: --- Based on a discussion on stackoverflow: https://stackoverflow.com/questions/57673825/how-to-force-gcc-to-assume-that-a-floating-point-expression-is-non-negative. With gcc-trunk and '

[Bug tree-optimization/91645] Missed optimization with sqrt(x*x)

2019-09-04 Thread lisyarus at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91645 --- Comment #2 from Nikita Lisitsa --- If by 'isless(y, 0.0)' you mean 'y < 0.f', then no, it doesn't change anything, it produces the same 'ucomiss ... call sqrtf' boilerplate. May I have misunderstood you? By the way, what about '#pragma GCC o

[Bug tree-optimization/91645] Missed optimization with sqrt(x*x)

2019-09-05 Thread lisyarus at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91645 --- Comment #5 from Nikita Lisitsa --- Oh, thank you a lot! Indeed, this version compiles to just mulss & sqrtss float test (float x) { float y = x*x; if (std::isless(y, 0.f)) __builtin_unreachable(); return std::sqrt(y); }

[Bug c++/89062] class template argument deduction failure with parentheses

2020-10-01 Thread lisyarus at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89062 Nikita Lisitsa changed: What|Removed |Added CC||lisyarus at gmail dot com --- Comment