[Bug target/52731] internal compiler error: in ia64_st_address_bypass_p, at config/ia64/ia64.c:9357

2019-06-02 Thread jason.duerstock at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52731

Jason Duerstock  changed:

   What|Removed |Added

 CC||jason.duerstock at gmail dot 
com

--- Comment #2 from Jason Duerstock  ---
I just tested this against 8.3.0 and it does not occur.

[Bug target/52731] internal compiler error: in ia64_st_address_bypass_p, at config/ia64/ia64.c:9357

2013-11-19 Thread kirill.yukhin at intel dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52731

--- Comment #1 from Yukhin Kirill kirill.yukhin at intel dot com ---
Reproduced on recent trunk.

It seems that we have in ia64.c:
int
ia64_st_address_bypass_p (rtx producer, rtx consumer)
{
  rtx dest, reg, mem;

  gcc_assert (producer  consumer);
  dest = ia64_single_set (producer);
  gcc_assert (dest);
  ...

The problem is that we have as `producer':
(insn 18 17 4 2 (cond_exec (eq (reg:BI 262 p6 [351])
(const_int 0 [0]))
(parallel [
(set (reg:DI 16 r16 [orig:346 D.1446 ] [346])
(reg/v:DI 112 r32 [orig:340 size ] [340]))
(set (reg/v:DI 112 r32 [orig:340 size ] [340])
(reg/v:DI 112 r32 [orig:340 size ] [340]))
])) 1188 {*p epilogue_deallocate_stack}
 (nil))

ia64_single_set can handle cond_exec (this is actually its purpose).
But it (after going into cond_exec) calls rtlanal.c's `single_set_2',
which returns non zero if we have only one *live* set expr after
the insn. It returns 0 otherwise (this case), which in turn triggers
assert in `ia64_st_address_bypass_p'.

I think, we could fix `ia64_st_address_bypass_p' not to use
`ia64_single_set', but iterate through all set exprs in producer.