[Bug tree-optimization/109564] [13/14 Regression] libkeccak miscompiled

2023-04-21 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109564 Richard Biener changed: What|Removed |Added Priority|P3 |P1 Status|NEW

[Bug tree-optimization/109564] [13/14 Regression] libkeccak miscompiled

2023-04-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109564 --- Comment #20 from CVS Commits --- The releases/gcc-13 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:f980561c60b0446cc427595198d7f3f4f90e0924 commit r13-7231-gf980561c60b0446cc427595198d7f3f4f90e0924 Author: Andrew MacLeod

[Bug tree-optimization/109564] [13/14 Regression] libkeccak miscompiled

2023-04-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109564 --- Comment #19 from CVS Commits --- The master branch has been updated by Andrew Macleod : https://gcc.gnu.org/g:17aa9ddb34581855dd013745c8be27dda024de4a commit r14-122-g17aa9ddb34581855dd013745c8be27dda024de4a Author: Andrew MacLeod Date:

[Bug tree-optimization/109564] [13/14 Regression] libkeccak miscompiled

2023-04-20 Thread amacleod at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109564 --- Comment #18 from Andrew Macleod --- (In reply to Richard Biener from comment #16) > (In reply to Richard Biener from comment #15) > > Created attachment 54892 [details] > > patch I am testing > > Bootstrapped and tested on x86_64-unknown-li

[Bug tree-optimization/109564] [13/14 Regression] libkeccak miscompiled

2023-04-20 Thread amacleod at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109564 --- Comment #17 from Andrew Macleod --- Created attachment 54893 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54893&action=edit new patch Alternatively, we can simply allow undefined SSA_NAMES to also be checked or single arguments like

[Bug tree-optimization/109564] [13/14 Regression] libkeccak miscompiled

2023-04-20 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109564 --- Comment #16 from Richard Biener --- (In reply to Richard Biener from comment #15) > Created attachment 54892 [details] > patch I am testing Bootstrapped and tested on x86_64-unknown-linux-gnu, the XFAILs of gcc.dg/pr102648.c and gcc.dg/pr10

[Bug tree-optimization/109564] [13/14 Regression] libkeccak miscompiled

2023-04-20 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109564 --- Comment #15 from Richard Biener --- Created attachment 54892 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54892&action=edit patch I am testing This is the patch I am testing which XFAILs the four testcases. It would be nice to some

[Bug tree-optimization/109564] [13/14 Regression] libkeccak miscompiled

2023-04-20 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109564 --- Comment #14 from Richard Biener --- I think the issue is a bit more involved - when _1 = PHI <_2, _3> and _2 is UNDEFINED _on the edge!_, the equivalence _1 == _3 only holds when the condition making _2 UNDEFINED holds. Trivially that's

[Bug tree-optimization/109564] [13/14 Regression] libkeccak miscompiled

2023-04-20 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109564 --- Comment #13 from Richard Biener --- (In reply to Martin Liška from comment #9) > Simplified a bit more to: > > struct libkeccak_generalised_spec { > int state_size; > int word_size; > } main_gspec; > > long gvar; > > int libkeccak_deg

[Bug tree-optimization/109564] [13/14 Regression] libkeccak miscompiled

2023-04-20 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109564 --- Comment #12 from Richard Biener --- Completely scrapping PHI equivalences will cause FAIL: gcc.dg/pr102648.c scan-tree-dump-not optimized "foo" FAIL: gcc.dg/pr103359.c scan-tree-dump-not evrp "c = 0" FAIL: gcc.dg/tree-ssa/evrp-ignore.c scan

[Bug tree-optimization/109564] [13/14 Regression] libkeccak miscompiled

2023-04-20 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109564 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #1

[Bug tree-optimization/109564] [13/14 Regression] libkeccak miscompiled

2023-04-20 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109564 --- Comment #10 from Richard Biener --- (In reply to Richard Biener from comment #8) > I fear something more fundamental is broken here and we > possibly should play safe and not register any equivalence relation > from PHIs. > > diff --git a/g

[Bug tree-optimization/109564] [13/14 Regression] libkeccak miscompiled

2023-04-20 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109564 --- Comment #9 from Martin Liška --- Simplified a bit more to: struct libkeccak_generalised_spec { int state_size; int word_size; } main_gspec; long gvar; int libkeccak_degeneralise_spec(struct libkeccak_generalised_spec *spec) { int st

[Bug tree-optimization/109564] [13/14 Regression] libkeccak miscompiled

2023-04-20 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109564 --- Comment #8 from Richard Biener --- We basically see if (!have_bitrate) { state_size = (have_state_size ? state_size : (1600L)); output = ((state_size << 5) / 100L + 7L) & ~0x07L; bitrate = output << 1; } optimized to if (!have_b

[Bug tree-optimization/109564] [13/14 Regression] libkeccak miscompiled

2023-04-20 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109564 Richard Biener changed: What|Removed |Added Attachment #54887|0 |1 is obsolete|

[Bug tree-optimization/109564] [13/14 Regression] libkeccak miscompiled

2023-04-20 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109564 --- Comment #6 from Martin Liška --- (In reply to Richard Biener from comment #4) > Created attachment 54887 [details] > testcase Note the reduced test-case already started to fail with r13-1938-g87dd4c8c83768a.

[Bug tree-optimization/109564] [13/14 Regression] libkeccak miscompiled

2023-04-20 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109564 --- Comment #5 from Richard Biener --- So the failure mode is different than the previous case since there's no backedge involved at all. Instead all of the VREL_EQ relations we add are for PHIs like output_73 = PHI where we equate the resul

[Bug tree-optimization/109564] [13/14 Regression] libkeccak miscompiled

2023-04-20 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109564 --- Comment #4 from Richard Biener --- Created attachment 54887 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54887&action=edit testcase

[Bug tree-optimization/109564] [13/14 Regression] libkeccak miscompiled

2023-04-20 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109564 --- Comment #3 from Richard Biener --- Created attachment 54886 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54886&action=edit preprocessed source of the affected TU it contains the single affected function libkeccak_degeneralise_spec a

[Bug tree-optimization/109564] [13/14 Regression] libkeccak miscompiled

2023-04-20 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109564 Richard Biener changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED

[Bug tree-optimization/109564] [13/14 Regression] libkeccak miscompiled

2023-04-20 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109564 Richard Biener changed: What|Removed |Added Target Milestone|--- |13.0 Keywords|