[Bug tree-optimization/91069] [10 Regression] Miscompare of 453.povray since r272843
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91069 --- Comment #11 from Jakub Jelinek --- Author: jakub Date: Thu Jul 4 05:10:52 2019 New Revision: 273039 URL: https://gcc.gnu.org/viewcvs?rev=273039&root=gcc&view=rev Log: PR middle-end/91069 * gcc.dg/pr91069.c (v2df): Use 2 * sizeof (double) instead of hardcoded 16 for better portability. (v2di): Change from long vector to long long vector. Use 2 * sizeof (long long) instead of hardcoded 16. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/pr91069.c
[Bug tree-optimization/91069] [10 Regression] Miscompare of 453.povray since r272843
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91069 --- Comment #10 from Richard Biener --- Author: rguenth Date: Wed Jul 3 12:47:07 2019 New Revision: 273007 URL: https://gcc.gnu.org/viewcvs?rev=273007&root=gcc&view=rev Log: 2019-07-03 Richard Biener PR middle-end/91069 * match.pd (vec_perm -> bit_insert): Fix element read from first vector. * gcc.dg/pr91069.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/pr91069.c Modified: trunk/gcc/ChangeLog trunk/gcc/match.pd trunk/gcc/testsuite/ChangeLog
[Bug tree-optimization/91069] [10 Regression] Miscompare of 453.povray since r272843
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91069 Richard Biener changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #9 from Richard Biener --- Fixed.
[Bug tree-optimization/91069] [10 Regression] Miscompare of 453.povray since r272843
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91069 --- Comment #8 from Richard Biener --- It "mismatches" in if (sel.series_p (1, 1, nelts + 1, 1)) { /* After canonicalizing the first elt to come from the first vector we only can insert the first elt from the first vector. */ at = 0; if ((ins = fold_read_from_vector (cop0, 0))) op0 = op1; } it should read from element sel[0], not 0. Testing patch.
[Bug tree-optimization/91069] [10 Regression] Miscompare of 453.povray since r272843
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91069 Richard Biener changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #7 from Richard Biener --- Testcase: typedef double v2df __attribute__((vector_size(16))); typedef long v2di __attribute__((vector_size(16))); void foo (v2df *res, v2df *src) { v2df x = *src; *res = __builtin_shuffle ((v2df) { 1.0, 0.0 }, x, (v2di) { 1, 3 }); } int main() { v2df x = (v2df) { 0.0, 2.0 }; foo (&x, &x); if (x[0] != 0.0 || x[1] != 2.0) __builtin_abort (); return 0; }
[Bug tree-optimization/91069] [10 Regression] Miscompare of 453.povray since r272843
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91069 --- Comment #6 from Richard Biener --- -march=x86-64 -mtune=generic (aka "default") is also broken, haswell (AVX2) is fine. -O3 is enough to trigger the issue for that. Disabling either of loop or SLP vectorization hides the issue. Inlining can be tuned down for Compute_Rotation_Transform by not inlining MTimesA, MTranspose (MATRIX *) and MTimesB. Disabling the BIT_INSERT_EXPR generation from match.pd seems to fix it though.
[Bug tree-optimization/91069] [10 Regression] Miscompare of 453.povray since r272843
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91069 --- Comment #5 from Martin Liška --- Created attachment 46553 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46553&action=edit FRE4 dump file with -O3 for the problematic function
[Bug tree-optimization/91069] [10 Regression] Miscompare of 453.povray since r272843
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91069 --- Comment #4 from Martin Liška --- Created attachment 46552 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46552&action=edit FRE4 dump file with -Ofast
[Bug tree-optimization/91069] [10 Regression] Miscompare of 453.povray since r272843
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91069 --- Comment #3 from Martin Liška --- Created attachment 46551 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46551&action=edit pre-processed source file
[Bug tree-optimization/91069] [10 Regression] Miscompare of 453.povray since r272843
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91069 --- Comment #2 from Martin Liška --- And the problematic function in the file is: void Compute_Rotation_Transform (TRANSFORM *transform, VECTOR vector)
[Bug tree-optimization/91069] [10 Regression] Miscompare of 453.povray since r272843
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91069 --- Comment #1 from Martin Liška --- So the problematic file is: $ g++ -c -o matrices.o -DSPEC_CPU -DNDEBUG -Ofast -march=native -g -fpermissive -DSPEC_CPU_LP64 matrices.cpp
[Bug tree-optimization/91069] [10 Regression] Miscompare of 453.povray since r272843
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91069 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2019-07-03 CC||rguenth at gcc dot gnu.org Known to work||9.1.0 Target Milestone|--- |10.0 Ever confirmed|0 |1 Known to fail||10.0