public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/112707] New: gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid'
@ 2023-11-25 3:30 csfore at posteo dot net
2023-11-25 3:31 ` [Bug target/112707] [14 regression] " csfore at posteo dot net
` (16 more replies)
0 siblings, 17 replies; 18+ messages in thread
From: csfore at posteo dot net @ 2023-11-25 3:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112707
Bug ID: 112707
Summary: gcc 14 outputs invalid assembly on ppc: Error:
unrecognized opcode: `fctid'
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: csfore at posteo dot net
Target Milestone: ---
Created attachment 56682
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56682&action=edit
original preprocessed file
Error is first hit when building libvorbis-1.3.7-r1. Needs `gcc -O3 -ffast-math
foo.i to reproduce`. It is successful on GCC 13
`
/tmp/ccv3vNGH.s: Assembler messages:
/tmp/ccv3vNGH.s:34: Error: unrecognized opcode: `fctid'
`
I believe this is a GCC bug given that Apple release notes[0] specifically
state this instruction is 64-bit only (it's a bit down, but a search for the
instruction should find it)
[0]:
https://opensource.apple.com/source/cctools/cctools-446.1/as/notes.auto.html
gcc -v:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/powerpc-unknown-linux-gnu/14/lto-wrapper
Target: powerpc-unknown-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-14.0.0_pre20231119/work/gcc-14-20231119/configure
--host=powerpc-unknown-linux-gnu --build=powerpc-unknown-linux-gnu
--prefix=/usr --bindir=/usr/powerpc-unknown-linux-gnu/gcc-bin/14
--includedir=/usr/lib/gcc/powerpc-unknown-linux-gnu/14/include
--datadir=/usr/share/gcc-data/powerpc-unknown-linux-gnu/14
--mandir=/usr/share/gcc-data/powerpc-unknown-linux-gnu/14/man
--infodir=/usr/share/gcc-data/powerpc-unknown-linux-gnu/14/info
--with-gxx-include-dir=/usr/lib/gcc/powerpc-unknown-linux-gnu/14/include/g++-v14
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/powerpc-unknown-linux-gnu/14/python
--enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--disable-libunwind-exceptions --enable-checking=yes,extra
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo
14.0.0_pre20231119 p9' --with-gcc-major-version-only --enable-libstdcxx-time
--enable-lto --disable-libstdcxx-pch --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu --disable-multilib
--disable-fixed-point --enable-targets=all --enable-libgomp --disable-libssp
--disable-libada --disable-cet --disable-systemtap
--disable-valgrind-annotations --disable-vtable-verify --disable-libvtv
--without-zstd --without-isl --enable-default-pie --enable-host-pie
--disable-host-bind-now --enable-default-ssp
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.0.0 20231119 (experimental) (Gentoo 14.0.0_pre20231119 p9)
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/112707] [14 regression] gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid'
2023-11-25 3:30 [Bug c/112707] New: gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid' csfore at posteo dot net
@ 2023-11-25 3:31 ` csfore at posteo dot net
2023-11-25 3:31 ` csfore at posteo dot net
` (15 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: csfore at posteo dot net @ 2023-11-25 3:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112707
--- Comment #1 from Christopher Fore <csfore at posteo dot net> ---
Created attachment 56683
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56683&action=edit
trimmed file with cvise
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/112707] [14 regression] gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid'
2023-11-25 3:30 [Bug c/112707] New: gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid' csfore at posteo dot net
2023-11-25 3:31 ` [Bug target/112707] [14 regression] " csfore at posteo dot net
@ 2023-11-25 3:31 ` csfore at posteo dot net
2023-11-25 3:37 ` pinskia at gcc dot gnu.org
` (14 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: csfore at posteo dot net @ 2023-11-25 3:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112707
--- Comment #2 from Christopher Fore <csfore at posteo dot net> ---
Created attachment 56684
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56684&action=edit
assembly output of sharedbook.i
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/112707] [14 regression] gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid'
2023-11-25 3:30 [Bug c/112707] New: gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid' csfore at posteo dot net
2023-11-25 3:31 ` [Bug target/112707] [14 regression] " csfore at posteo dot net
2023-11-25 3:31 ` csfore at posteo dot net
@ 2023-11-25 3:37 ` pinskia at gcc dot gnu.org
2023-11-27 2:19 ` guihaoc at gcc dot gnu.org
` (13 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-25 3:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112707
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |14.0
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I am 99% sure it was caused by
r14-4485-gc1e474785859c9630fcae19c8d2d606f5642c636 .
I suspect the check on lrint<mode>di2 should have been changed to
`TARGET_HARD_FLOAT && TARGET_POWERPC64` instead of just `TARGET_HARD_FLOAT`.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/112707] [14 regression] gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid'
2023-11-25 3:30 [Bug c/112707] New: gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid' csfore at posteo dot net
` (2 preceding siblings ...)
2023-11-25 3:37 ` pinskia at gcc dot gnu.org
@ 2023-11-27 2:19 ` guihaoc at gcc dot gnu.org
2023-11-27 2:23 ` csfore at posteo dot net
` (12 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: guihaoc at gcc dot gnu.org @ 2023-11-27 2:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112707
HaoChen Gui <guihaoc at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |linkw at gcc dot gnu.org
--- Comment #4 from HaoChen Gui <guihaoc at gcc dot gnu.org> ---
I can't reproduce it on my env. Could you inform me the assembler version and
CPU type you used or the default CPU type. Thanks.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/112707] [14 regression] gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid'
2023-11-25 3:30 [Bug c/112707] New: gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid' csfore at posteo dot net
` (3 preceding siblings ...)
2023-11-27 2:19 ` guihaoc at gcc dot gnu.org
@ 2023-11-27 2:23 ` csfore at posteo dot net
2023-11-27 2:28 ` csfore at posteo dot net
` (11 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: csfore at posteo dot net @ 2023-11-27 2:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112707
--- Comment #5 from Christopher Fore <csfore at posteo dot net> ---
It's a PowerPC 7447A and the assembler version is:
GNU assembler version 2.40.0 (powerpc-unknown-linux-gnu) using BFD version
(Gentoo 2.40 p5) 2.40.0
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/112707] [14 regression] gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid'
2023-11-25 3:30 [Bug c/112707] New: gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid' csfore at posteo dot net
` (4 preceding siblings ...)
2023-11-27 2:23 ` csfore at posteo dot net
@ 2023-11-27 2:28 ` csfore at posteo dot net
2023-11-27 2:39 ` csfore at posteo dot net
` (10 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: csfore at posteo dot net @ 2023-11-27 2:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112707
--- Comment #6 from Christopher Fore <csfore at posteo dot net> ---
The original example in the wild was with -mcpu=7450 -O2 -maltivec
-mabi=altivec -pipe, plus the flags the build system added, then I minimised it
to the attachment above, where I only needed: -O3 -ffast-math.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/112707] [14 regression] gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid'
2023-11-25 3:30 [Bug c/112707] New: gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid' csfore at posteo dot net
` (5 preceding siblings ...)
2023-11-27 2:28 ` csfore at posteo dot net
@ 2023-11-27 2:39 ` csfore at posteo dot net
2023-11-27 13:30 ` segher at gcc dot gnu.org
` (9 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: csfore at posteo dot net @ 2023-11-27 2:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112707
--- Comment #7 from Christopher Fore <csfore at posteo dot net> ---
Created attachment 56691
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56691&action=edit
build log of the original compile
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/112707] [14 regression] gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid'
2023-11-25 3:30 [Bug c/112707] New: gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid' csfore at posteo dot net
` (6 preceding siblings ...)
2023-11-27 2:39 ` csfore at posteo dot net
@ 2023-11-27 13:30 ` segher at gcc dot gnu.org
2023-11-28 1:56 ` guihaoc at gcc dot gnu.org
` (8 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: segher at gcc dot gnu.org @ 2023-11-27 13:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112707
Segher Boessenkool <segher at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |segher at gcc dot gnu.org
--- Comment #8 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Yeah, it tested for ISA 2.04 before. That was an attempt at including 476
probably?
We really should have a TARGET_FCTID, on for TARGET_POWERPC64 or for cpu 476
(so
NOT user-selectable separately, of course!); not try to use pre-existing flags
for this, which might work but will forever stay confusing.
So either a separate OPTION_FCTID for in rs6000-cpus.def, or TARGET_FCTID.
Either
works for me.
(Background: in ISA 1.xx it was for 64-bit implementations only. But it does
not
need 64-bit registers or a 64-bit integer pipeline at all, it is an FP
instruction
that works on FP registers, which always are 64-bit. The instruction was
implemented
on the 476).
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/112707] [14 regression] gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid'
2023-11-25 3:30 [Bug c/112707] New: gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid' csfore at posteo dot net
` (7 preceding siblings ...)
2023-11-27 13:30 ` segher at gcc dot gnu.org
@ 2023-11-28 1:56 ` guihaoc at gcc dot gnu.org
2023-11-28 2:26 ` linkw at gcc dot gnu.org
` (7 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: guihaoc at gcc dot gnu.org @ 2023-11-28 1:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112707
--- Comment #9 from HaoChen Gui <guihaoc at gcc dot gnu.org> ---
(In reply to Segher Boessenkool from comment #8)
> Yeah, it tested for ISA 2.04 before. That was an attempt at including 476
> probably?
>
> We really should have a TARGET_FCTID, on for TARGET_POWERPC64 or for cpu 476
> (so
> NOT user-selectable separately, of course!); not try to use pre-existing
> flags for this, which might work but will forever stay confusing.
>
> So either a separate OPTION_FCTID for in rs6000-cpus.def, or TARGET_FCTID.
> Either
> works for me.
>
> (Background: in ISA 1.xx it was for 64-bit implementations only. But it
> does not
> need 64-bit registers or a 64-bit integer pipeline at all, it is an FP
> instruction
> that works on FP registers, which always are 64-bit. The instruction was
> implemented
> on the 476).
Thanks for your explanation.
I found "fctid" is supported on PPC64 and PPC476 from assembler source code.
{“fctid”, XRC(63,814,0), XRA_MASK, PPC64, PPCVLE, {FRT,
FRB}},
{“fctid”, XRC(63,814,0), XRA_MASK, PPC476, PPCVLE, {FRT,
FRB}},
But powerpc7450 only enables PPC. That's why assembler complains.
{ "7450", PPC_OPCODE_PPC | PPC_OPCODE_7450 | PPC_OPCODE_ALTIVEC, 0 },
My question is: can "fctid" be executed on powerpc7450 such a 32bit processor?
If it's supported, should the assembler be changed also (replace the PPC64 with
PPC for fctid)?
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/112707] [14 regression] gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid'
2023-11-25 3:30 [Bug c/112707] New: gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid' csfore at posteo dot net
` (8 preceding siblings ...)
2023-11-28 1:56 ` guihaoc at gcc dot gnu.org
@ 2023-11-28 2:26 ` linkw at gcc dot gnu.org
2023-12-04 23:02 ` bergner at gcc dot gnu.org
` (6 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: linkw at gcc dot gnu.org @ 2023-11-28 2:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112707
--- Comment #10 from Kewen Lin <linkw at gcc dot gnu.org> ---
(In reply to HaoChen Gui from comment #9)
> (In reply to Segher Boessenkool from comment #8)
> > Yeah, it tested for ISA 2.04 before. That was an attempt at including 476
> > probably?
> >
> > We really should have a TARGET_FCTID, on for TARGET_POWERPC64 or for cpu 476
> > (so
> > NOT user-selectable separately, of course!); not try to use pre-existing
> > flags for this, which might work but will forever stay confusing.
> >
> > So either a separate OPTION_FCTID for in rs6000-cpus.def, or TARGET_FCTID.
> > Either
> > works for me.
> >
> > (Background: in ISA 1.xx it was for 64-bit implementations only. But it
> > does not
> > need 64-bit registers or a 64-bit integer pipeline at all, it is an FP
> > instruction
> > that works on FP registers, which always are 64-bit. The instruction was
> > implemented
> > on the 476).
>
> Thanks for your explanation.
>
> I found "fctid" is supported on PPC64 and PPC476 from assembler source code.
> {“fctid”, XRC(63,814,0), XRA_MASK, PPC64, PPCVLE,
> {FRT, FRB}},
> {“fctid”, XRC(63,814,0), XRA_MASK, PPC476, PPCVLE,
> {FRT, FRB}},
>
> But powerpc7450 only enables PPC. That's why assembler complains.
> { "7450", PPC_OPCODE_PPC | PPC_OPCODE_7450 | PPC_OPCODE_ALTIVEC, 0 },
>
> My question is: can "fctid" be executed on powerpc7450 such a 32bit
> processor? If it's supported, should the assembler be changed also (replace
> the PPC64 with PPC for fctid)?
Good question, I think it's no, the assembler implementation looks to match the
documentation, as I can't find insn fctid in powerpc7450 doc:
https://www.nxp.com.cn/docs/en/reference-manual/MPC7450UM.pdf
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/112707] [14 regression] gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid'
2023-11-25 3:30 [Bug c/112707] New: gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid' csfore at posteo dot net
` (9 preceding siblings ...)
2023-11-28 2:26 ` linkw at gcc dot gnu.org
@ 2023-12-04 23:02 ` bergner at gcc dot gnu.org
2023-12-05 0:52 ` bergner at gcc dot gnu.org
` (5 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: bergner at gcc dot gnu.org @ 2023-12-04 23:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112707
--- Comment #11 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to Kewen Lin from comment #10)
> (In reply to HaoChen Gui from comment #9)
>
>> My question is: can "fctid" be executed on powerpc7450 such a 32bit
>> processor? If it's supported, should the assembler be changed also (replace
>> the PPC64 with PPC for fctid)?
>
> Good question, I think it's no, the assembler implementation looks to match
> the documentation, as I can't find insn fctid in powerpc7450 doc:
> https://www.nxp.com.cn/docs/en/reference-manual/MPC7450UM.pdf
I believe the only 32-bit cpu that supports fctid is the 476 which has
explicitly enabled it here.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/112707] [14 regression] gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid'
2023-11-25 3:30 [Bug c/112707] New: gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid' csfore at posteo dot net
` (10 preceding siblings ...)
2023-12-04 23:02 ` bergner at gcc dot gnu.org
@ 2023-12-05 0:52 ` bergner at gcc dot gnu.org
2023-12-05 14:19 ` segher at gcc dot gnu.org
` (4 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: bergner at gcc dot gnu.org @ 2023-12-05 0:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112707
Peter Bergner <bergner at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2023-12-05
--- Comment #12 from Peter Bergner <bergner at gcc dot gnu.org> ---
Confirmed.
A simpler test case with minimal rtl insns. I'll note that you don't always
get an assembler error, since gcc still passes -many to the assembler for non
--enable-checking gcc builds, which causes it to accept the fctid insn.
extern double rint (double);
void
foo (long long *dst, double a)
{
*dst = rint (a);
}
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/112707] [14 regression] gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid'
2023-11-25 3:30 [Bug c/112707] New: gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid' csfore at posteo dot net
` (11 preceding siblings ...)
2023-12-05 0:52 ` bergner at gcc dot gnu.org
@ 2023-12-05 14:19 ` segher at gcc dot gnu.org
2023-12-05 17:46 ` bergner at gcc dot gnu.org
` (3 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: segher at gcc dot gnu.org @ 2023-12-05 14:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112707
--- Comment #13 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to Peter Bergner from comment #12)
> I'll note that you don't always
> get an assembler error, since gcc still passes -many to the assembler for
> non --enable-checking gcc builds, which causes it to accept the fctid insn.
Hrm. Was that an oversight? Should we always do that now? Can you prepare a
patch (and test on some common configs) please?
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/112707] [14 regression] gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid'
2023-11-25 3:30 [Bug c/112707] New: gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid' csfore at posteo dot net
` (12 preceding siblings ...)
2023-12-05 14:19 ` segher at gcc dot gnu.org
@ 2023-12-05 17:46 ` bergner at gcc dot gnu.org
2023-12-11 0:46 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: bergner at gcc dot gnu.org @ 2023-12-05 17:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112707
--- Comment #14 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to Segher Boessenkool from comment #13)
> (In reply to Peter Bergner from comment #12)
> > I'll note that you don't always
> > get an assembler error, since gcc still passes -many to the assembler for
> > non --enable-checking gcc builds, which causes it to accept the fctid insn.
>
> Hrm. Was that an oversight? Should we always do that now? Can you prepare
> a patch (and test on some common configs) please?
I was surprised as you that we were still passing -many to the assembler under
some circumstances. That said, removing all -many usage is orthogonal to this
bug. I'll open another bug where we can discuss what to do wrt that.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/112707] [14 regression] gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid'
2023-11-25 3:30 [Bug c/112707] New: gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid' csfore at posteo dot net
` (13 preceding siblings ...)
2023-12-05 17:46 ` bergner at gcc dot gnu.org
@ 2023-12-11 0:46 ` cvs-commit at gcc dot gnu.org
2023-12-11 0:47 ` cvs-commit at gcc dot gnu.org
2023-12-11 0:48 ` guihaoc at gcc dot gnu.org
16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-12-11 0:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112707
--- Comment #15 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by HaoChen Gui <guihaoc@gcc.gnu.org>:
https://gcc.gnu.org/g:46e342b985e6b4058db73875103cced2666e84e2
commit r14-6391-g46e342b985e6b4058db73875103cced2666e84e2
Author: Haochen Gui <guihaoc@gcc.gnu.org>
Date: Mon Dec 11 08:40:34 2023 +0800
rs6000: Enable lrint<mode>si2 on old archs with stfiwx enabled
The powerpc 32-bit processors (e.g. 5470) supports "fctiw" instruction,
but the instruction can't be generated on such platforms as the insn is
guard by TARGET_POPCNTD. The root cause is SImode in float register is
supported from Power7. Actually implementation of "fctiw" only needs
stfiwx which is supported by the old 32-bit processors. This patch
enables "fctiw" expand for these processors.
gcc/
PR target/112707
* config/rs6000/rs6000.md (expand lrint<mode>si2): New.
(insn lrint<mode>si2): Rename to...
(*lrint<mode>si): ...this.
(lrint<mode>si_di): New.
gcc/testsuite/
PR target/112707
* gcc.target/powerpc/pr112707-1.c: New.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/112707] [14 regression] gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid'
2023-11-25 3:30 [Bug c/112707] New: gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid' csfore at posteo dot net
` (14 preceding siblings ...)
2023-12-11 0:46 ` cvs-commit at gcc dot gnu.org
@ 2023-12-11 0:47 ` cvs-commit at gcc dot gnu.org
2023-12-11 0:48 ` guihaoc at gcc dot gnu.org
16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-12-11 0:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112707
--- Comment #16 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by HaoChen Gui <guihaoc@gcc.gnu.org>:
https://gcc.gnu.org/g:ae226cb1ee17d61c416c9d4d8c5a142788b8afff
commit r14-6392-gae226cb1ee17d61c416c9d4d8c5a142788b8afff
Author: Haochen Gui <guihaoc@gcc.gnu.org>
Date: Mon Dec 11 08:41:55 2023 +0800
rs6000: Guard fctid on PowerPC64 and PowerPC476
fctid is only supported on 64-bit Power processors and powerpc 476. It
should be guarded by this condition. The patch fixes the issue.
gcc/
PR target/112707
* config/rs6000/rs6000.h (TARGET_FCTID): Define.
* config/rs6000/rs6000.md (lrint<mode>di2): Add guard TARGET_FCTID.
* (lround<mode>di2): Replace TARGET_FPRND with TARGET_FCTID.
gcc/testsuite/
PR target/112707
* gcc.target/powerpc/pr112707.h: New.
* gcc.target/powerpc/pr112707-2.c: New.
* gcc.target/powerpc/pr112707-3.c: New.
* gcc.target/powerpc/pr88558-p7.c: Check fctid on ilp32 and
has_arch_ppc64 as it's now guarded by powerpc64.
* gcc.target/powerpc/pr88558-p8.c: Likewise.
* gfortran.dg/nint_p7.f90: Add powerpc64 target requirement as
lround<mode>di2 is now guarded by powerpc64.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/112707] [14 regression] gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid'
2023-11-25 3:30 [Bug c/112707] New: gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid' csfore at posteo dot net
` (15 preceding siblings ...)
2023-12-11 0:47 ` cvs-commit at gcc dot gnu.org
@ 2023-12-11 0:48 ` guihaoc at gcc dot gnu.org
16 siblings, 0 replies; 18+ messages in thread
From: guihaoc at gcc dot gnu.org @ 2023-12-11 0:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112707
HaoChen Gui <guihaoc at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #17 from HaoChen Gui <guihaoc at gcc dot gnu.org> ---
fixed
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2023-12-11 0:48 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-25 3:30 [Bug c/112707] New: gcc 14 outputs invalid assembly on ppc: Error: unrecognized opcode: `fctid' csfore at posteo dot net
2023-11-25 3:31 ` [Bug target/112707] [14 regression] " csfore at posteo dot net
2023-11-25 3:31 ` csfore at posteo dot net
2023-11-25 3:37 ` pinskia at gcc dot gnu.org
2023-11-27 2:19 ` guihaoc at gcc dot gnu.org
2023-11-27 2:23 ` csfore at posteo dot net
2023-11-27 2:28 ` csfore at posteo dot net
2023-11-27 2:39 ` csfore at posteo dot net
2023-11-27 13:30 ` segher at gcc dot gnu.org
2023-11-28 1:56 ` guihaoc at gcc dot gnu.org
2023-11-28 2:26 ` linkw at gcc dot gnu.org
2023-12-04 23:02 ` bergner at gcc dot gnu.org
2023-12-05 0:52 ` bergner at gcc dot gnu.org
2023-12-05 14:19 ` segher at gcc dot gnu.org
2023-12-05 17:46 ` bergner at gcc dot gnu.org
2023-12-11 0:46 ` cvs-commit at gcc dot gnu.org
2023-12-11 0:47 ` cvs-commit at gcc dot gnu.org
2023-12-11 0:48 ` guihaoc at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).