[Bug c++/69132] AVX optimization bug: extra unnecessary code insertion?

2016-01-04 Thread xuancong84 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69132 Wang Xuancong changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/69132] AVX optimization bug: extra unnecessary code insertion?

2016-01-04 Thread xuancong84 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69132 --- Comment #2 from Wang Xuancong --- I assume rcp(b)=1/b, so a/b=a*(1/b)=a*rcp(b). There is no longer a need to do the Newton-Rhapson method. And of course, computing [ a * ((rcp(b) + rcp(b)) - (b * rcp(b) * rcp (b)))] is slower than computing [

[Bug c++/69132] New: AVX optimization bug: extra unnecessary code insertion?

2016-01-03 Thread xuancong84 at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: xuancong84 at gmail dot com Target Milestone: --- It is great that gcc compiler 4.8 comes with AVX optimization with -Ofast option. However, I found an interesting but stupid bug, that it adds

[Bug c++/68784] deductible parameter type still requires explicit reference cast, e.g., std::thread

2015-12-08 Thread xuancong84 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68784 --- Comment #6 from Wang Xuancong --- You are right! I have tested myself. MSVC outputs 0 instead of crashing (crashing is what we expected), it is accepting compilation but not doing the job correctly, that it passes a temporarily created copy o

[Bug c++/68784] deductible parameter type still requires explicit reference cast, e.g., std::thread

2015-12-08 Thread xuancong84 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68784 --- Comment #2 from Wang Xuancong --- All standards are made by people. No standard is perfect. If a standard causes more inconvenience to the users, then it is considered sub-optimal and has room for improvement. Thus, unless you can give me a

[Bug c++/68784] New: deductible parameter type still requires explicit reference cast, e.g., std::thread

2015-12-08 Thread xuancong84 at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: xuancong84 at gmail dot com Target Milestone: --- G++ compiler is weaker than MSVC on this point. The following piece of code is compilable using MSVC but not in g