https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62261
Bug ID: 62261
Summary: [sh64] ICE for negative shift counts
Product: gcc
Version: 4.9.1
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: kkojima at gcc dot gnu.org
CC: dhowells at redhat dot com, olegendo at gcc dot gnu.org
Target: sh64-*
This was reported originally by dhowells at #c7 of PR62111.
void foo (unsigned long long x)
{
bar (x << -1);
}
causes an error: unrecognizable insn:
(insn 7 6 8 2 (set (reg:DI 160 [ D.1442 ])
(ashift:DI (reg:DI 161)
(const_int -1 [0xffffffffffffffff]))) xx.c:3 -1
(nil))
A possible patch is proposed at #c14 of PR62111.