[Bug middle-end/96733] std::clamp for floats and doubles produces worse code than a combo of std::min / std::max

2020-08-24 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96733 --- Comment #4 from Jakub Jelinek --- (In reply to Jonathan Wakely from comment #3) > Shouldn't this help in the library then? > > if (__hi < __lo) > __builtin_unreachable(); For integers, I guess it could if Andrew's/Aldy's

[Bug middle-end/96733] std::clamp for floats and doubles produces worse code than a combo of std::min / std::max

2020-08-24 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96733 --- Comment #3 from Jonathan Wakely --- Shouldn't this help in the library then? if (__hi < __lo) __builtin_unreachable();

[Bug middle-end/96733] std::clamp for floats and doubles produces worse code than a combo of std::min / std::max

2020-08-24 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96733 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org,

[Bug middle-end/96733] std::clamp for floats and doubles produces worse code than a combo of std::min / std::max

2020-08-22 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96733 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement

[Bug middle-end/96733] std::clamp for floats and doubles produces worse code than a combo of std::min / std::max

2020-08-21 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96733 Jonathan Wakely changed: What|Removed |Added Component|c++ |middle-end Last reconfirmed|