https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91919
Bug ID: 91919
Summary: [10 Regression] arm-linux-eabi ICE with building
kernel
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: law at redhat dot com
Target Milestone: ---
> commit fa761b10d40aaa71e62fbc0c9f2ab8fc07a98b49 (HEAD, refs/bisect/bad)
> Author: wilco <wilco@138bc75d-0d04-0410-961f-82ee72b054a4>
> Date: Wed Sep 18 18:33:30 2019 +0000
>
> [ARM] Cleanup 64-bit multiplies
>
> Cleanup 64-bit multiplies. Combine the expanders using iterators.
> Merge the signed/unsigned multiplies as well as the pre-Armv6 and Armv6
> variants. Split DImode operands early into parallel sets inside the
> MULL/MLAL instructions - this improves register allocation and avoids
> subreg issues due to other DImode operations splitting early.
>
> gcc/
> * config/arm/arm.md (maddsidi4): Remove expander.
> (mulsidi3adddi): Remove pattern.
> (mulsidi3adddi_v6): Likewise.
> (mulsidi3_nov6): Likewise.
> (mulsidi3_v6): Likewise.
> (umulsidi3): Remove expander.
> (umulsidi3_nov6): Remove pattern.
> (umulsidi3_v6): Likewise.
> (umulsidi3adddi): Likewise.
> (umulsidi3adddi_v6): Likewise.
> (<Us>mulsidi3): Add combined expander.
> (<Us>maddsidi4): Likewise.
> (<US>mull): Add combined umull and smull pattern.
> (<US>mlal): Likewise.
> * config/arm/iterators.md (Us): Add new iterator.
Is causing the linux kernel to fail to build for arm-linux-gnueabi.
-O2 with this testcase:
__extension__ typedef unsigned long long __u64;
typedef __u64 u64;
static inline unsigned long
__timespec64_to_jiffies (u64 sec, long nsec)
{
return ((sec *
((unsigned
long) ((((u64) 1000000000L << (32 - 7)) +
((1000000000L + 100 / 2) / 100) -
1) / (u64) ((1000000000L + 100 / 2) / 100)))) +
(((u64) nsec *
((unsigned
long) ((((u64) 1 << ((32 - 7) + 29)) +
((1000000000L + 100 / 2) / 100) -
1) / (u64) ((1000000000L + 100 / 2) / 100)))) >>
(((32 -
7) +
29) -
(32 -
7))))
>> (32 - 7);
}
unsigned long
__timespec_to_jiffies (unsigned long sec, long nsec)
{
return __timespec64_to_jiffies ((u64) sec, nsec);
}
(insn 14 13 16 2 (parallel [
(set (reg:SI 132)
(plus:SI (mult:SI (zero_extend:DI (reg/v:SI 115 [ sec ]))
(zero_extend:DI (reg:SI 124)))
(reg:SI 130)))
...)
Jakub noted the mode of the mult is SImode, while the operands are DImode.
That's not valid RTL.