[Bug tree-optimization/90055] [7 Regression] Incorrect result with ffast-math + tree-vectorize
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90055 Richard Biener changed: What|Removed |Added Target Milestone|7.5 |8.0
[Bug tree-optimization/90055] [7 Regression] Incorrect result with ffast-math + tree-vectorize
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90055 Richard Biener changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED Known to fail||7.5.0 --- Comment #5 from Richard Biener --- Issue goes away with GCC 8.
[Bug tree-optimization/90055] [7 Regression] Incorrect result with ffast-math + tree-vectorize
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90055 --- Comment #4 from Richard Biener --- (In reply to Andrew Pinski from comment #3) > (In reply to Martin Liška from comment #2) > > Fixed on trunk with r250959 which is: > > > > 364bc5b93b76cf88(08 Aug 2017 14:09): [took: 2.844s] result: OK > > sum: 0. > > SVN revision: 250959 > > Author: amker > > * doc/invoke.texi: Document -ftree-loop-distribution for O3. > > * opts.c (default_options_table): Add OPT_ftree_loop_distribution. > > > > > > git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250959 > > 138bc75d-0d04-0410-961f-82ee72b054a4 > > > > Using: > > gcc pr90055.c -O3 -ffast-math -march=haswell -mtune=haswell > > -fno-tree-loop-distribution > > > > it disappeared in r253934: > > > > Author: hubicka > > * x86-tune-costs.h (core_cost): Fix div, move and sqrt latencies. > > Those look like they are all would cause the issue to go latent. > > > > > and it started with r238033. > > This one does it might be the real cause of the issue. Nope, it just does less peeling for gaps.
[Bug tree-optimization/90055] [7 Regression] Incorrect result with ffast-math + tree-vectorize
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90055 --- Comment #3 from Andrew Pinski --- (In reply to Martin Liška from comment #2) > Fixed on trunk with r250959 which is: > > 364bc5b93b76cf88(08 Aug 2017 14:09): [took: 2.844s] result: OK > sum: 0. > SVN revision: 250959 > Author: amker > * doc/invoke.texi: Document -ftree-loop-distribution for O3. > * opts.c (default_options_table): Add OPT_ftree_loop_distribution. > > > git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250959 > 138bc75d-0d04-0410-961f-82ee72b054a4 > > Using: > gcc pr90055.c -O3 -ffast-math -march=haswell -mtune=haswell > -fno-tree-loop-distribution > > it disappeared in r253934: > > Author: hubicka > * x86-tune-costs.h (core_cost): Fix div, move and sqrt latencies. Those look like they are all would cause the issue to go latent. > > and it started with r238033. This one does it might be the real cause of the issue.
[Bug tree-optimization/90055] [7 Regression] Incorrect result with ffast-math + tree-vectorize
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90055 Martin Liška changed: What|Removed |Added CC||rsandifo at gcc dot gnu.org --- Comment #2 from Martin Liška --- Fixed on trunk with r250959 which is: 364bc5b93b76cf88(08 Aug 2017 14:09): [took: 2.844s] result: OK sum: 0. SVN revision: 250959 Author: amker * doc/invoke.texi: Document -ftree-loop-distribution for O3. * opts.c (default_options_table): Add OPT_ftree_loop_distribution. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250959 138bc75d-0d04-0410-961f-82ee72b054a4 Using: gcc pr90055.c -O3 -ffast-math -march=haswell -mtune=haswell -fno-tree-loop-distribution it disappeared in r253934: Author: hubicka * x86-tune-costs.h (core_cost): Fix div, move and sqrt latencies. and it started with r238033.
[Bug tree-optimization/90055] [7 Regression] Incorrect result with ffast-math + tree-vectorize
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90055 Richard Biener changed: What|Removed |Added Priority|P3 |P2 Status|UNCONFIRMED |NEW Known to work||6.5.0, 8.1.0 Keywords||needs-bisection, wrong-code Last reconfirmed||2019-04-12 CC||marxin at gcc dot gnu.org Ever confirmed|0 |1 Summary|Incorrect result with |[7 Regression] Incorrect |ffast-math + tree-vectorize |result with ffast-math + ||tree-vectorize Target Milestone|--- |7.5 Known to fail||7.1.0 --- Comment #1 from Richard Biener --- Confirmed - this is likely a duplicate since it seems to be fixed on the GCC 8 branch and trunk. -mavx2 -mfma triggers the issue. w/o -mfma the GCC 7 branch produces -0.0. The GCC 8 branch doesn't vectorize the loop at t.c:104 but the basic-block at 103. Note I observe different unrolling between 7 and 8 so the actual issue might be latent. Martin, can you bisect what fixed this?