[Bug tree-optimization/114121] wrong code with _BitInt() arithmetics at -O2

2024-05-06 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114121 --- Comment #18 from GCC Commits --- The releases/gcc-13 branch has been updated by Richard Biener : https://gcc.gnu.org/g:14a16787d99831a28b0c9690e80c420d765ba26f commit r13-8702-g14a16787d99831a28b0c9690e80c420d765ba26f Author: Richard Biene

[Bug tree-optimization/114121] wrong code with _BitInt() arithmetics at -O2

2024-03-12 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114121 --- Comment #17 from GCC Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:73dac51b32575f980289c073969c6d825963d076 commit r14-9440-g73dac51b32575f980289c073969c6d825963d076 Author: Richard Biener Date:

[Bug tree-optimization/114121] wrong code with _BitInt() arithmetics at -O2

2024-02-28 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114121 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |14.0

[Bug tree-optimization/114121] wrong code with _BitInt() arithmetics at -O2

2024-02-28 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114121 Richard Biener changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug tree-optimization/114121] wrong code with _BitInt() arithmetics at -O2

2024-02-28 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114121 --- Comment #15 from GCC Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:c841144a94363ff26e40ab3f26b14702c32987a8 commit r14-9215-gc841144a94363ff26e40ab3f26b14702c32987a8 Author: Richard Biener Date:

[Bug tree-optimization/114121] wrong code with _BitInt() arithmetics at -O2

2024-02-27 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114121 --- Comment #14 from Jakub Jelinek --- Tried __attribute__((noipa)) unsigned long foo (unsigned long x) { unsigned long y[128], z = 0, w = 0; y[127] = x; __builtin_memset (&y, 0, 127 * sizeof (long)); for (unsigned long i = 0; i < 128;

[Bug tree-optimization/114121] wrong code with _BitInt() arithmetics at -O2

2024-02-27 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114121 --- Comment #13 from Richard Biener --- (In reply to Jakub Jelinek from comment #10) > Could we for lookups if range isn't a subset of the found range pretend > there was not a match, try to see through definitions again and only if it > yields

[Bug tree-optimization/114121] wrong code with _BitInt() arithmetics at -O2

2024-02-27 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114121 --- Comment #12 from Richard Biener --- (In reply to Jakub Jelinek from comment #11) > Shall I try to construct a non-bitint testcase for this? That would be nice, more coverage is always good.

[Bug tree-optimization/114121] wrong code with _BitInt() arithmetics at -O2

2024-02-27 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114121 --- Comment #11 from Jakub Jelinek --- Shall I try to construct a non-bitint testcase for this?

[Bug tree-optimization/114121] wrong code with _BitInt() arithmetics at -O2

2024-02-27 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114121 --- Comment #10 from Jakub Jelinek --- Could we for lookups if range isn't a subset of the found range pretend there was not a match, try to see through definitions again and only if it yields an equivalent result value range it the same? Perha

[Bug tree-optimization/114121] wrong code with _BitInt() arithmetics at -O2

2024-02-27 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114121 --- Comment #9 from Richard Biener --- Which of course would regress something like int a[16]; int foo (int i) { if (i > 7) return a[i]; else return a[i]; } where we'd no longer hoist as we no longer would value-number the refs the

[Bug tree-optimization/114121] wrong code with _BitInt() arithmetics at -O2

2024-02-27 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114121 --- Comment #8 from Richard Biener --- Created attachment 57549 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57549&action=edit prototype fix This is very similar to PR113831. We again have two refs looking seemingly the same: _80 =

[Bug tree-optimization/114121] wrong code with _BitInt() arithmetics at -O2

2024-02-27 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114121 --- Comment #7 from Richard Biener --- I will have a look.

[Bug tree-optimization/114121] wrong code with _BitInt() arithmetics at -O2

2024-02-26 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114121 Jakub Jelinek changed: What|Removed |Added CC||rguenth at gcc dot gnu.org --- Comment

[Bug tree-optimization/114121] wrong code with _BitInt() arithmetics at -O2

2024-02-26 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114121 --- Comment #5 from Jakub Jelinek --- And it works even with -O2 -ftree-loop-vectorize -fno-tree-slp-vectorize and doesn't work with -O2 -fno-tree-loop-vectorize -ftree-slp-vectorize so will need to look at what SLP vectorization does here.

[Bug tree-optimization/114121] wrong code with _BitInt() arithmetics at -O2

2024-02-26 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114121 --- Comment #4 from Jakub Jelinek --- (In reply to Andrew Pinski from comment #2) > As an aside we at -O3 has: > _87 = .USUBC (_30, 3, 0); > _93 = IMAGPART_EXPR <_87>; > _88 = .USUBC (0, 0, _93); > _29 = IMAGPART_EXPR <_88>; > _187 = .

[Bug tree-optimization/114121] wrong code with _BitInt() arithmetics at -O2

2024-02-26 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114121 --- Comment #3 from Jakub Jelinek --- Indeed. And -O2 -fno-tree-vectorize works. I've changed it to unsigned a, b, c, d, e; unsigned _BitInt(256) f; __attribute__((noipa)) unsigned short bswap16 (int t) { return __builtin_bswap16 (t); } vo

[Bug tree-optimization/114121] wrong code with _BitInt() arithmetics at -O2

2024-02-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114121 --- Comment #2 from Andrew Pinski --- As an aside we at -O3 has: _87 = .USUBC (_30, 3, 0); _93 = IMAGPART_EXPR <_87>; _88 = .USUBC (0, 0, _93); _29 = IMAGPART_EXPR <_88>; _187 = .USUBC (0, 0, _29); _217 = IMAGPART_EXPR <_187>; _218

[Bug tree-optimization/114121] wrong code with _BitInt() arithmetics at -O2

2024-02-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114121 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED