[Bug rtl-optimization/102446] [9/10/11/12 Regression] wrong code at -O3 on x86_64-linux-gnu

2022-01-30 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102446

Andrew Pinski  changed:

   What|Removed |Added

   Keywords|needs-bisection |

--- Comment #12 from Andrew Pinski  ---
(In reply to Jakub Jelinek from comment #11)
> It still fails for me.  As I corrected in #c7, I didn't mean ICE but
> miscompilation (at -O3).

Yes it does still fail for me too, I don't know what I was doing wrong last
night.

[Bug rtl-optimization/102446] [9/10/11/12 Regression] wrong code at -O3 on x86_64-linux-gnu

2022-01-30 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102446

--- Comment #11 from Jakub Jelinek  ---
It still fails for me.  As I corrected in #c7, I didn't mean ICE but
miscompilation (at -O3).

[Bug rtl-optimization/102446] [9/10/11/12 Regression] wrong code at -O3 on x86_64-linux-gnu

2022-01-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102446

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||needs-bisection

--- Comment #10 from Andrew Pinski  ---
(In reply to Jakub Jelinek from comment #6)

This testcase seems to be fixed on the trunk. It would be useful to know where
it was fixed.

[Bug rtl-optimization/102446] [9/10/11/12 Regression] wrong code at -O3 on x86_64-linux-gnu

2021-09-22 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102446

--- Comment #9 from Jakub Jelinek  ---
I think PR23567 is quite different, that was about stores to a place that might
not be writable, this is about making a possibly trapping conditional load
being unconditional.

[Bug rtl-optimization/102446] [9/10/11/12 Regression] wrong code at -O3 on x86_64-linux-gnu

2021-09-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102446

Andrew Pinski  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=23567

--- Comment #8 from Andrew Pinski  ---
(In reply to Richard Biener from comment #3)
> I don't see any flags marking it as not trapping?

Related to PR 23567 (which was fixed but maybe not fully).

[Bug rtl-optimization/102446] [9/10/11/12 Regression] wrong code at -O3 on x86_64-linux-gnu

2021-09-22 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102446

--- Comment #7 from Jakub Jelinek  ---
I mean segfaults at runtime, not ICEs.

[Bug rtl-optimization/102446] [9/10/11/12 Regression] wrong code at -O3 on x86_64-linux-gnu

2021-09-22 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102446

--- Comment #6 from Jakub Jelinek  ---
int a = 1, c, e, f, *j, k, o, *r = , s;
char b, l;
short d, *g;
unsigned h;
static void m(void);
static inline void n(int);
void p(int *q) {
  while (1) {
if (*q)
  break;
if (*g)
  o = c;
while (l)
  ;
  }
}
void t() {
  for (; s < 8; s++)
m();
}
__attribute__((noinline)) void m() {
  int aa = 0, i = 0;
  for (; i < 3; i++)
if (k < 0)
  aa |= *j;
  if (d)
c = (h + *g + 2) & c;
  n(aa);
}
static inline __attribute__((always_inline)) void n(int ac) {
  char *ad = , u = ac, *v = 
  int ae = *ad = a;
  u && (*v = e > 0);
  *r = c;
  p();
}
int main() {
  t();
  return 0;
}

ICEs already in r105000.

[Bug rtl-optimization/102446] [9/10/11/12 Regression] wrong code at -O3 on x86_64-linux-gnu

2021-09-22 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102446

--- Comment #5 from Richard Biener  ---
(In reply to Jan Hubicka from comment #4)
> > Started with r5-6477-g3620b606822f80863488ca4883542d848d41f9f9
> This only affects early inlining decisions, so it may be useful to
> bisect this with --param early-inlining-insns=14
> 
> Honza

It's also miscompiled with -fno-inline.

[Bug rtl-optimization/102446] [9/10/11/12 Regression] wrong code at -O3 on x86_64-linux-gnu

2021-09-22 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102446

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
  Component|tree-optimization   |rtl-optimization