[Bug target/113353] New: Wrong rounding in std::nearbyint when vectorized with -funsafe-math-optimizations on PPC

2024-01-12 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113353 Bug ID: 113353 Summary: Wrong rounding in std::nearbyint when vectorized with -funsafe-math-optimizations on PPC Product: gcc Version: 12.2.0 Status: UNCONFIRMED

[Bug c++/112513] Misoptimization of argument

2023-11-14 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112513 --- Comment #4 from Alexander Grund --- Thank you, I replaced that by unsigned unused; __cpuid(1, cpuid1.val, unused, unused, unused); and it works in the setup I have.

[Bug c++/112513] Misoptimization of argument

2023-11-14 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112513 Alexander Grund changed: What|Removed |Added Resolution|INVALID |FIXED --- Comment #2 from Alexander

[Bug c++/112513] New: Misoptimization of argument

2023-11-13 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112513 Bug ID: 112513 Summary: Misoptimization of argument Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++

[Bug target/112443] [12/13/14 Regression] Misoptimization of _mm256_blendv_epi8 intrinsic on avx512bw+avx512vl

2023-11-09 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112443 --- Comment #3 from Alexander Grund --- > I can confirm that the suggested patch can be applied to 12.2.0 and fixes > the issue I observed Also tested 12.1, 12.3, 13.1, 13.2 with this patch and it works (as expected) too

[Bug target/112443] [12/13/14 Regression] Misoptimization of _mm256_blendv_epi8 intrinsic on avx512bw+avx512vl

2023-11-09 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112443 --- Comment #2 from Alexander Grund --- I can confirm that the suggested patch can be applied to 12.2.0 and fixes the issue I observed

[Bug tree-optimization/112443] New: Misoptimization of _mm256_blendv_epi8 intrinsic on avx512bw+avx512vl

2023-11-08 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112443 Bug ID: 112443 Summary: Misoptimization of _mm256_blendv_epi8 intrinsic on avx512bw+avx512vl Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal

[Bug tree-optimization/112370] -Wfree-nonheap-object in std::vector dtor on sapphirerapids with -O3

2023-11-06 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112370 --- Comment #3 from Alexander Grund --- Created attachment 56513 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56513=edit INVALID reduced example (after running cvise on the former example)

[Bug tree-optimization/112370] -Wfree-nonheap-object in std::vector dtor on sapphirerapids with -O3

2023-11-06 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112370 --- Comment #2 from Alexander Grund --- FWIW: I tried to run cvise on this however it created an invalid example where indeed a non-heap pointer would be freed. I'll attach it anyway for reference as it took hours to run the reduce

[Bug c++/112370] -Wfree-nonheap-object in std::vector dtor on sapphirerapids with -O3

2023-11-03 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112370 --- Comment #1 from Alexander Grund --- Created attachment 56503 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56503=edit Preprocessed source

[Bug c++/112370] New: -Wfree-nonheap-object in std::vector dtor on sapphirerapids with -O3

2023-11-03 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112370 Bug ID: 112370 Summary: -Wfree-nonheap-object in std::vector dtor on sapphirerapids with -O3 Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal

[Bug c++/112301] [12/13/14 regression] Double destruction of returned object when exiting the scope causes an exception which gets rethrown since r12-6333-gb10e031458d541

2023-11-03 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112301 --- Comment #4 from Alexander Grund --- Thank you! Will there be backports for 12.x? The current patch is conflicting due to "c++: enable NRVO from inner block [PR51571]" and while it seems to be easy enough to backport both patches in order

[Bug c++/112301] New: Double destruction of returned object when exiting the scope causes an exception which gets rethrown

2023-10-30 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112301 Bug ID: 112301 Summary: Double destruction of returned object when exiting the scope causes an exception which gets rethrown Product: gcc Version: 12.3.0 Status:

[Bug target/100799] Stackoverflow in optimized code on PPC

2022-07-20 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100799 --- Comment #11 from Alexander Grund --- Some more experiments with GCC 10.3, OpenBLAS 0.3.15 and FlexiBLAS 3.0.4: Baseline: Broken at -O1, working at -Og I got it to break with "-Og -fmove-loop-invariants". Then it worked again by adding

[Bug target/100799] Stackoverflow in optimized code on PPC

2022-07-20 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100799 --- Comment #10 from Alexander Grund --- (In reply to Peter Bergner from comment #2) > The failure with GCC 7 and later coincides with the PPC port starting to > default to LRA instead of reload. Is there a compiler flag that can switch the

[Bug target/100799] Stackoverflow in optimized code on PPC

2022-07-08 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100799 --- Comment #7 from Alexander Grund --- Hi, it's more than 1 year later now. Peter seemingly has a simple reproducer. Is there anything new on this? Any patch to fix that or at least anything to try or a workaround like disabling a specific

[Bug ipa/54569] Compiling code with -O3 results to segfault in MAME/MESS binary

2021-07-15 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54569 Alexander Grund changed: What|Removed |Added CC||alexander.grund@tu-dresden.

[Bug tree-optimization/101061] tree-vrp misoptimization on skylake+ using union-based aliasing

2021-06-16 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101061 --- Comment #13 from Alexander Grund --- > But what you can see is that the resulting pointer is used for the > initialization and not the placement address as literally written in source. So I assume it was supposed to be "Y::Y (D_6557, 1);"

[Bug tree-optimization/101061] tree-vrp misoptimization on skylake+ using union-based aliasing

2021-06-16 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101061 Alexander Grund changed: What|Removed |Added Version|8.4.0 |8.5.0 Known to fail|

[Bug tree-optimization/101061] tree-vrp misoptimization on skylake+ using union-based aliasing

2021-06-16 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101061 --- Comment #9 from Alexander Grund --- > Note that when the union type is visible in the access path then GCC allows > punning without further restrictions. Thus the accesses as written above are > OK. Now I have to ask again for

[Bug tree-optimization/101061] tree-vrp misoptimization on skylake+ using union-based aliasing

2021-06-15 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101061 --- Comment #6 from Alexander Grund --- Oh and for completeness: The same applies to the following union, doesn't it? I.e. given this: struct TF_TString_Raw { uint8_t raw[24]; }; struct TF_TString_Small { uint8_t size; char str[23]; };

[Bug tree-optimization/101061] tree-vrp misoptimization on skylake+ using union-based aliasing

2021-06-15 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101061 --- Comment #5 from Alexander Grund --- So am I right assuming that the following is basically UB as per GCC (although it should work as per the standard)? template union slot_type { map_slot_type() {} ~map_slot_type() = delete; using

[Bug tree-optimization/101061] tree-vrp misoptimization on skylake+ using union-based aliasing

2021-06-15 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101061 --- Comment #3 from Alexander Grund --- You are right, it actually seems to be the combination of those to, so -O2 -fno-strict-aliasing and -O2 -fno-tree-vrp both make it work. The layout-compatible refers to the "common initial sequence" that

[Bug tree-optimization/101061] tree-vrp misoptimization on skylake+ using union-based aliasing

2021-06-14 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101061 --- Comment #1 from Alexander Grund --- Created attachment 51006 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51006=edit compressed preprocessed source

[Bug tree-optimization/101061] New: tree-vrp misoptimization on skylake+ using union-based aliasing

2021-06-14 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101061 Bug ID: 101061 Summary: tree-vrp misoptimization on skylake+ using union-based aliasing Product: gcc Version: 8.4.0 Status: UNCONFIRMED Severity: normal

[Bug target/100703] __vector_pair and __vector_quad cannot be passed by reference

2021-06-03 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100703 --- Comment #3 from Alexander Grund --- I found that this was fixed in 10.3 and 11.1 by https://github.com/gcc-mirror/gcc/commit/e2882e76089cecdc268d0835c54cabfa80b5b0be So yes only happens in 10.2. Thanks for checking that!

[Bug target/100799] Stackoverflow in optimized code on PPC

2021-05-28 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100799 --- Comment #1 from Alexander Grund --- Confirmed to also break with GCC 7.3, 8.2, 8.3 but works with 6.3, 6.4, 6.5

[Bug fortran/100799] New: Stackoverflow in optimized code on PPC

2021-05-27 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100799 Bug ID: 100799 Summary: Stackoverflow in optimized code on PPC Product: gcc Version: 10.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug target/100706] Invalid instructions in plt calls on PPC

2021-05-21 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100706 --- Comment #3 from Alexander Grund --- Ok, tested a few different bintuils versions. Bug occurs with 2.35 and 2.35.1 and seems to be fixed in 2.35.2 So I guess this can be closed

[Bug target/100706] Invalid instructions in plt calls on PPC

2021-05-21 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100706 --- Comment #2 from Alexander Grund --- Thanks for the reply. Although this was hard to test (need to interfere with TFs build process which must use the gold linker) I managed to link that one library manually with bfd and it did work. Hence

[Bug target/100706] New: Invalid instructions in plt calls on PPC

2021-05-20 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100706 Bug ID: 100706 Summary: Invalid instructions in plt calls on PPC Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug target/100703] __vector_pair and __vector_quad cannot be passed by reference

2021-05-20 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100703 --- Comment #1 from Alexander Grund --- It goes further: Even the usual conversion rules for pointer types don't apply: void foo(__vector_pair*){} void bar(const __vector_pair*){} int main(){ __vector_pair p; foo(p); // works bar(p); //

[Bug c++/100703] New: __vector_pair and __vector_quad cannot be passed by reference

2021-05-20 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100703 Bug ID: 100703 Summary: __vector_pair and __vector_quad cannot be passed by reference Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal

[Bug c++/100677] New: False positive unused-but-set-parameter warning when using VSX intrinsics

2021-05-19 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100677 Bug ID: 100677 Summary: False positive unused-but-set-parameter warning when using VSX intrinsics Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity:

[Bug c++/100448] New: internal compiler error: Segmentation fault

2021-05-06 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100448 Bug ID: 100448 Summary: internal compiler error: Segmentation fault Product: gcc Version: 10.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug middle-end/98561] -Wstringop-overflow triggered when memcpy to single char and writing to differently sized array members

2021-01-06 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98561 --- Comment #2 from Alexander Grund --- I did some work to reduce this further: https://godbolt.org/z/sezTPs For some reason it seems to be related to std::array. So may I suggest to include the above (or the original reproducer) in the test

[Bug middle-end/98561] New: -Wstringop-overflow triggered when memcpy to single char and writing to differently sized array members

2021-01-06 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98561 Bug ID: 98561 Summary: -Wstringop-overflow triggered when memcpy to single char and writing to differently sized array members Product: gcc Version: 10.2.1 Status:

[Bug target/98140] Reused register by xsmincdp leads to wrong NaN propagation on Power9

2020-12-04 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98140 --- Comment #1 from Alexander Grund --- It looks like this was fixed in 10.1 by this commit https://github.com/gcc-mirror/gcc/commit/37e0df8a9be5a8232f4ccb73cdadb02121ba523f However the codegen looks worse: 390: 20 00 9e c3 lfs

[Bug target/98140] New: Reused register by xsmincdp leads to wrong NaN propagation on Power9

2020-12-04 Thread alexander.grund--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98140 Bug ID: 98140 Summary: Reused register by xsmincdp leads to wrong NaN propagation on Power9 Product: gcc Version: 8.3.0 Status: UNCONFIRMED Severity: normal