public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/47312] New: [4.6 Regression] ICE: in expand_ternary_op, at optabs.c:656 with -flto -mno-sse -mxop and __builtin_fmaf()
@ 2011-01-16 3:14 zsojka at seznam dot cz
2011-01-17 13:52 ` [Bug target/47312] " rguenth at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: zsojka at seznam dot cz @ 2011-01-16 3:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47312
Summary: [4.6 Regression] ICE: in expand_ternary_op, at
optabs.c:656 with -flto -mno-sse -mxop and
__builtin_fmaf()
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: zsojka@seznam.cz
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
------ testcase.c -------
int main ()
{
return __builtin_fmaf(1e+38F, 1e+38F, 0);
}
-------------------------
Compiler output:
$ gcc -O -flto -mno-sse -mxop testcase.c
In file included from testcase.c:1:0,
from :0:
testcase.c: In function 'main':
testcase.c:3:24: internal compiler error: in expand_ternary_op, at optabs.c:656
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper:
/mnt/svn/gcc-trunk/binary-168843-lto-fortran-checking-yes-rtl-df/bin/gcc
returned 1 exit status
collect2: lto-wrapper returned 1 exit status
Tested revisions:
r168843 - crash
4.5 r168785 - OK
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/47312] [4.6 Regression] ICE: in expand_ternary_op, at optabs.c:656 with -flto -mno-sse -mxop and __builtin_fmaf()
2011-01-16 3:14 [Bug target/47312] New: [4.6 Regression] ICE: in expand_ternary_op, at optabs.c:656 with -flto -mno-sse -mxop and __builtin_fmaf() zsojka at seznam dot cz
@ 2011-01-17 13:52 ` rguenth at gcc dot gnu.org
2011-01-17 15:54 ` jakub at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-17 13:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47312
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.01.17 13:29:34
Target Milestone|--- |4.6.0
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/47312] [4.6 Regression] ICE: in expand_ternary_op, at optabs.c:656 with -flto -mno-sse -mxop and __builtin_fmaf()
2011-01-16 3:14 [Bug target/47312] New: [4.6 Regression] ICE: in expand_ternary_op, at optabs.c:656 with -flto -mno-sse -mxop and __builtin_fmaf() zsojka at seznam dot cz
2011-01-17 13:52 ` [Bug target/47312] " rguenth at gcc dot gnu.org
@ 2011-01-17 15:54 ` jakub at gcc dot gnu.org
2011-01-19 21:29 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-17 15:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47312
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-17 15:46:52 UTC ---
With LTO, relying on FMA_EXPR being present in the IL only iff target supports
it is IMHO wrong, because using slightly different options between cc1 and lto1
can result in optab_handler (fma_optab, mode) == CODE_FOR_nothing even when
FMA_EXPR is present in the IL. I'd say we should expand FMA_EXPR as
__builtin_fma in that case. Richi, do you agree?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/47312] [4.6 Regression] ICE: in expand_ternary_op, at optabs.c:656 with -flto -mno-sse -mxop and __builtin_fmaf()
2011-01-16 3:14 [Bug target/47312] New: [4.6 Regression] ICE: in expand_ternary_op, at optabs.c:656 with -flto -mno-sse -mxop and __builtin_fmaf() zsojka at seznam dot cz
2011-01-17 13:52 ` [Bug target/47312] " rguenth at gcc dot gnu.org
2011-01-17 15:54 ` jakub at gcc dot gnu.org
@ 2011-01-19 21:29 ` jakub at gcc dot gnu.org
2011-02-02 15:24 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-19 21:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47312
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/47312] [4.6 Regression] ICE: in expand_ternary_op, at optabs.c:656 with -flto -mno-sse -mxop and __builtin_fmaf()
2011-01-16 3:14 [Bug target/47312] New: [4.6 Regression] ICE: in expand_ternary_op, at optabs.c:656 with -flto -mno-sse -mxop and __builtin_fmaf() zsojka at seznam dot cz
` (2 preceding siblings ...)
2011-01-19 21:29 ` jakub at gcc dot gnu.org
@ 2011-02-02 15:24 ` jakub at gcc dot gnu.org
2011-02-02 15:31 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-02-02 15:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47312
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-02-02 15:24:25 UTC ---
One possibility would be to only fold __builtin_fma* into FMA_EXPR after IPA
passes.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/47312] [4.6 Regression] ICE: in expand_ternary_op, at optabs.c:656 with -flto -mno-sse -mxop and __builtin_fmaf()
2011-01-16 3:14 [Bug target/47312] New: [4.6 Regression] ICE: in expand_ternary_op, at optabs.c:656 with -flto -mno-sse -mxop and __builtin_fmaf() zsojka at seznam dot cz
` (3 preceding siblings ...)
2011-02-02 15:24 ` jakub at gcc dot gnu.org
@ 2011-02-02 15:31 ` rguenth at gcc dot gnu.org
2011-02-02 15:39 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-02-02 15:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47312
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-02-02 15:30:51 UTC ---
(In reply to comment #2)
> One possibility would be to only fold __builtin_fma* into FMA_EXPR after IPA
> passes.
Expanding FMA_EXPR as __builtin_fma (thus, a libcall) as fallback sounds
safe. We probably have similar issues for other builtins (consider
the generic vector lowering code for example).
Thus, in expr.c only dispatch to expand_ternary_op if there is an optab
available, else emit a libcall.
"Folding" back to __builtin_fma* sounds ugly.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/47312] [4.6 Regression] ICE: in expand_ternary_op, at optabs.c:656 with -flto -mno-sse -mxop and __builtin_fmaf()
2011-01-16 3:14 [Bug target/47312] New: [4.6 Regression] ICE: in expand_ternary_op, at optabs.c:656 with -flto -mno-sse -mxop and __builtin_fmaf() zsojka at seznam dot cz
` (4 preceding siblings ...)
2011-02-02 15:31 ` rguenth at gcc dot gnu.org
@ 2011-02-02 15:39 ` jakub at gcc dot gnu.org
2011-02-03 10:53 ` jakub at gcc dot gnu.org
2011-02-03 11:00 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-02-02 15:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47312
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-02-02 15:39:00 UTC ---
FMA_EXPR is created though not only just for __builtin_fma{,l,f} in the code,
but also for x * y + z when contracting. Can expansion rely that this is
happening only after IPA passes? Otherwise we could be creating fma,f,l} calls
in freestanding environments, or try create it say for __float128 where there
is no such builtin, etc.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/47312] [4.6 Regression] ICE: in expand_ternary_op, at optabs.c:656 with -flto -mno-sse -mxop and __builtin_fmaf()
2011-01-16 3:14 [Bug target/47312] New: [4.6 Regression] ICE: in expand_ternary_op, at optabs.c:656 with -flto -mno-sse -mxop and __builtin_fmaf() zsojka at seznam dot cz
` (5 preceding siblings ...)
2011-02-02 15:39 ` jakub at gcc dot gnu.org
@ 2011-02-03 10:53 ` jakub at gcc dot gnu.org
2011-02-03 11:00 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-02-03 10:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47312
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-02-03 10:53:21 UTC ---
Author: jakub
Date: Thu Feb 3 10:53:19 2011
New Revision: 169786
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169786
Log:
PR target/47312
* expr.c (expand_expr_real_2) <case FMA_EXPR>: If target doesn't expand
fma, expand FMA_EXPR as fma{,f,l} call.
* gcc.target/i386/pr47312.c: New test.
Added:
trunk/gcc/testsuite/gcc.target/i386/pr47312.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/expr.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/47312] [4.6 Regression] ICE: in expand_ternary_op, at optabs.c:656 with -flto -mno-sse -mxop and __builtin_fmaf()
2011-01-16 3:14 [Bug target/47312] New: [4.6 Regression] ICE: in expand_ternary_op, at optabs.c:656 with -flto -mno-sse -mxop and __builtin_fmaf() zsojka at seznam dot cz
` (6 preceding siblings ...)
2011-02-03 10:53 ` jakub at gcc dot gnu.org
@ 2011-02-03 11:00 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-02-03 11:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47312
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-02-03 11:00:11 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-02-03 11:00 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-16 3:14 [Bug target/47312] New: [4.6 Regression] ICE: in expand_ternary_op, at optabs.c:656 with -flto -mno-sse -mxop and __builtin_fmaf() zsojka at seznam dot cz
2011-01-17 13:52 ` [Bug target/47312] " rguenth at gcc dot gnu.org
2011-01-17 15:54 ` jakub at gcc dot gnu.org
2011-01-19 21:29 ` jakub at gcc dot gnu.org
2011-02-02 15:24 ` jakub at gcc dot gnu.org
2011-02-02 15:31 ` rguenth at gcc dot gnu.org
2011-02-02 15:39 ` jakub at gcc dot gnu.org
2011-02-03 10:53 ` jakub at gcc dot gnu.org
2011-02-03 11:00 ` jakub 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).