public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/26915] New: missed optimization / returning -1.0
@ 2006-03-29 10:42 pluto at agmk dot net
2006-03-29 19:23 ` [Bug other/26915] " pluto at agmk dot net
` (7 more replies)
0 siblings, 8 replies; 10+ messages in thread
From: pluto at agmk dot net @ 2006-03-29 10:42 UTC (permalink / raw)
To: gcc-bugs
double minus1() { return -1.0; }
.LC0: .long 3212836864
minus1: flds .LC0
ret
for -Os gcc should use `fld1;fchs'.
--
Summary: missed optimization / returning -1.0
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: other
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pluto at agmk dot net
GCC build triplet: i686-pld-linux
GCC host triplet: i686-pld-linux
GCC target triplet: i686-pld-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26915
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug other/26915] missed optimization / returning -1.0
2006-03-29 10:42 [Bug other/26915] New: missed optimization / returning -1.0 pluto at agmk dot net
@ 2006-03-29 19:23 ` pluto at agmk dot net
2006-05-01 10:42 ` [Bug target/26915] " pluto at agmk dot net
` (6 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: pluto at agmk dot net @ 2006-03-29 19:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pluto at agmk dot net 2006-03-29 19:23 -------
...and the current 4.2.0 ICEs on this testcase:
$ ./xgcc -B. 26915.c -m32 -march=i686
26915.c: In function ‘minus1’:
26915.c:1: error: bb_for_stmt (stmt) is set to a wrong basic block
26915.c:1: error: bb_for_stmt (stmt) is set to a wrong basic block
26915.c:1: internal compiler error: verify_stmts failed
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26915
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/26915] missed optimization / returning -1.0
2006-03-29 10:42 [Bug other/26915] New: missed optimization / returning -1.0 pluto at agmk dot net
2006-03-29 19:23 ` [Bug other/26915] " pluto at agmk dot net
@ 2006-05-01 10:42 ` pluto at agmk dot net
2006-05-02 8:08 ` [Bug target/26915] missed sized opt " pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: pluto at agmk dot net @ 2006-05-01 10:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pluto at agmk dot net 2006-05-01 10:41 -------
(In reply to comment #1)
> ...and the current 4.2.0 ICEs on this testcase:
>
> $ ./xgcc -B. 26915.c -m32 -march=i686
> 26915.c: In function ‘minus1’:
> 26915.c:1: error: bb_for_stmt (stmt) is set to a wrong basic block
> 26915.c:1: error: bb_for_stmt (stmt) is set to a wrong basic block
> 26915.c:1: internal compiler error: verify_stmts failed
>
please ignore this ICE. it's related to other patch:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17390#c10
current 4.1 and 4.2 don't optimize original testcase.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26915
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/26915] missed sized opt returning -1.0
2006-03-29 10:42 [Bug other/26915] New: missed optimization / returning -1.0 pluto at agmk dot net
2006-03-29 19:23 ` [Bug other/26915] " pluto at agmk dot net
2006-05-01 10:42 ` [Bug target/26915] " pluto at agmk dot net
@ 2006-05-02 8:08 ` pinskia at gcc dot gnu dot org
2006-11-04 9:10 ` pluto at agmk dot net
` (4 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-02 8:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2006-05-02 08:08 -------
Confirmed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |16996
nThis| |
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
GCC build triplet|i686-pld-linux |
GCC host triplet|i686-pld-linux |
GCC target triplet|i686-pld-linux |
Keywords| |missed-optimization
Last reconfirmed|0000-00-00 00:00:00 |2006-05-02 08:08:49
date| |
Summary|missed optimization / |missed sized opt returning -
|returning -1.0 |1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26915
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/26915] missed sized opt returning -1.0
2006-03-29 10:42 [Bug other/26915] New: missed optimization / returning -1.0 pluto at agmk dot net
` (2 preceding siblings ...)
2006-05-02 8:08 ` [Bug target/26915] missed sized opt " pinskia at gcc dot gnu dot org
@ 2006-11-04 9:10 ` pluto at agmk dot net
2006-11-04 9:11 ` pluto at agmk dot net
` (3 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: pluto at agmk dot net @ 2006-11-04 9:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pluto at agmk dot net 2006-11-04 09:10 -------
Created an attachment (id=12545)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12545&action=view)
patch from Uros Bizjak.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26915
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/26915] missed sized opt returning -1.0
2006-03-29 10:42 [Bug other/26915] New: missed optimization / returning -1.0 pluto at agmk dot net
` (3 preceding siblings ...)
2006-11-04 9:10 ` pluto at agmk dot net
@ 2006-11-04 9:11 ` pluto at agmk dot net
2006-11-04 23:12 ` uros at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: pluto at agmk dot net @ 2006-11-04 9:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pluto at agmk dot net 2006-11-04 09:11 -------
with attached patch gcc42 produces:
$ ./xgcc -B. PR26915.c -m32 -S -Os -fomit-frame-pointer
.file "PR26915.c"
.text
.globl minus1
.type minus1, @function
minus1:
fld1
fchs
ret
.size minus1, .-minus1
.ident "GCC: (GNU) 4.2.0 20061030 (prerelease) (PLD-Linux)"
.section .note.GNU-stack,"",@progbits
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26915
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/26915] missed sized opt returning -1.0
2006-03-29 10:42 [Bug other/26915] New: missed optimization / returning -1.0 pluto at agmk dot net
` (4 preceding siblings ...)
2006-11-04 9:11 ` pluto at agmk dot net
@ 2006-11-04 23:12 ` uros at gcc dot gnu dot org
2006-11-04 23:15 ` ubizjak at gmail dot com
2006-12-01 0:09 ` chaoyingfu at gcc dot gnu dot org
7 siblings, 0 replies; 10+ messages in thread
From: uros at gcc dot gnu dot org @ 2006-11-04 23:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from uros at gcc dot gnu dot org 2006-11-04 23:12 -------
Subject: Bug 26915
Author: uros
Date: Sat Nov 4 23:12:16 2006
New Revision: 118484
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118484
Log:
PR target/26915
* config/i386/i386.c (standard_80387_constant_p): Treat -0.0 and -1.0
as a valid 80387 constant.
(standard_80387_constant_opcode): Return "#" for -0.0 and -1.0.
* config/i386/i386.md (unnamed splitter): Split the load of
constant -0.0 or -1.0 into the load of 0.0 or 1.0, followed
by negation.
testsuite/ChangeLog:
PR target/26915
* gcc.target/i386/387-12.c: New test.
~
Added:
trunk/gcc/testsuite/gcc.target/i386/387-12.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
trunk/gcc/config/i386/i386.md
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26915
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/26915] missed sized opt returning -1.0
2006-03-29 10:42 [Bug other/26915] New: missed optimization / returning -1.0 pluto at agmk dot net
` (5 preceding siblings ...)
2006-11-04 23:12 ` uros at gcc dot gnu dot org
@ 2006-11-04 23:15 ` ubizjak at gmail dot com
2006-12-01 0:09 ` chaoyingfu at gcc dot gnu dot org
7 siblings, 0 replies; 10+ messages in thread
From: ubizjak at gmail dot com @ 2006-11-04 23:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from ubizjak at gmail dot com 2006-11-04 23:15 -------
Fixed.
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2006-
| |11/msg00220.html
Status|NEW |RESOLVED
Keywords| |patch
Known to fail|4.1.2 4.2.0 |4.1.2
Known to work| |4.2.0
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26915
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/26915] missed sized opt returning -1.0
2006-03-29 10:42 [Bug other/26915] New: missed optimization / returning -1.0 pluto at agmk dot net
` (6 preceding siblings ...)
2006-11-04 23:15 ` ubizjak at gmail dot com
@ 2006-12-01 0:09 ` chaoyingfu at gcc dot gnu dot org
7 siblings, 0 replies; 10+ messages in thread
From: chaoyingfu at gcc dot gnu dot org @ 2006-12-01 0:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from chaoyingfu at gcc dot gnu dot org 2006-12-01 00:07 -------
Subject: Bug 26915
Author: chaoyingfu
Date: Fri Dec 1 00:05:26 2006
New Revision: 119383
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119383
Log:
Merged revisions 118455-118543 via svnmerge from
svn+ssh://chaoyingfu@sources.redhat.com/svn/gcc/trunk
........
r118455 | fxcoudert | 2006-11-03 03:51:09 -0800 (Fri, 03 Nov 2006) | 20 lines
PR libfortran/27895
* intrinsics/reshape_generic.c (reshape_internal): Fix so that it
works correctly for zero-sized arrays.
* m4/reshape.m4: Likewise.
* generated/reshape_r16.c: Regenerate.
* generated/reshape_c4.c: Regenerate.
* generated/reshape_i4.c: Regenerate.
* generated/reshape_c16.c: Regenerate.
* generated/reshape_r10.c: Regenerate.
* generated/reshape_r8.c: Regenerate.
* generated/reshape_c10.c: Regenerate.
* generated/reshape_c8.c: Regenerate.
* generated/reshape_i8.c: Regenerate.
* generated/reshape_i16.c: Regenerate.
* generated/reshape_r4.c: Regenerate.
* gcc/testsuite/gfortran.dg/zero_sized_1.f90: Uncomment checks
for RESHAPE.
........
r118458 | amylaar | 2006-11-03 06:52:19 -0800 (Fri, 03 Nov 2006) | 97 lines
gcc:
2006-11-03 J"orn Rennecke <joern.rennecke@st.com>
* config/sh/crt1.asm: Fix #ifdef indent.
2006-11-03 J"orn Rennecke <joern.rennecke@st.com>
Merged from STMicroelectronics sources:
2006-10-06 Andrew Stubbs <andrew.stubbs@st.com>
* config/sh/crt1.asm (vbr_600): Add missing #if.
2006-08-03 J"orn Rennecke <joern.rennecke@st.com>
* sh.opt (mfused-madd): New option.
* sh.md (mac_media, macsf3): Make conditional on TARGET_FMAC.
2006-07-04 Andrew Stubbs <andrew.stubbs@st.com>
* config/sh/crt1.asm (vbr_start): Move to new section .test.vbr.
Remove pointless handler at VBR+0.
(vbr_200, vbr_300, vbr_500): Remove pointless handler.
(vbr_600): Save and restore mach and macl, fpul and fpscr and fr0 to
fr7. Make sure the timer handler is called with the correct FPU
precision setting, according to the ABI.
2006-06-14 J"orn Rennecke <joern.rennecke@st.com>
* config/sh/sh.opt (m2a-single, m2a-single-only): Fix Condition.
* config/sh/sh.h (SUPPORT_SH2A_NOFPU): Fix condition.
(SUPPORT_SH2A_SINGLE_ONLY, SUPPORT_SH2A_SINGLE_ONLY): Likewise.
2006-06-09 J"orn Rennecke <joern.rennecke@st.com>
* sh.md (cmpgeusi_t): Change into define_insn_and_split. Accept
zero as second operand.
2006-04-28 J"orn Rennecke <joern.rennecke@st.com>
* config/sh/divtab-sh4-300.c, config/sh/lib1funcs-4-300.asm:
Fixed some bugs related to negative values, in particular -0
and overflow at -0x80000000.
* config/sh/divcost-analysis: Added sh4-300 figures.
2006-04-27 J"orn Rennecke <joern.rennecke@st.com>
* config/sh/t-sh (MULTILIB_MATCHES): Add -m4-300* / -m4-340 options.
2006-04-26 J"orn Rennecke <joern.rennecke@st.com>
* config/sh/t-sh (OPT_EXTRA_PARTS): Add libgcc-4-300.a.
($(T)div_table-4-300.o, $(T)libgcc-4-300.a): New rules.
* config/sh/divtab-sh4-300.c, config/sh/lib1funcs-4-300.asm:
New files.
* config/sh/embed-elf.h (LIBGCC_SPEC): Use -lgcc-4-300 for -m4-300* /
-m4-340.
2006-04-24 J"orn Rennecke <joern.rennecke@st.com>
SH4-300 scheduling description & fixes to SH4-[12]00 description:
* sh.md: New instruction types: fstore, movi8, fpscr_toggle, gp_mac,
mac_mem, mem_mac, dfp_mul, fp_cmp.
(insn_class, dfp_comp, any_fp_comp): Update.
(push_fpul, movsf_ie, fpu_switch, toggle_sz, toggle_pr): Update type.
(cmpgtsf_t, "cmpeqsf_t, cmpgtsf_t_i4, cmpeqsf_t_i4): Likewise.
(muldf3_i): Likewise.
(movsi_i): Split rI08 alternative into two separate alternatives.
Update type.
(movsi_ie, movsi_i_lowpart): Likewise.
(movqi_i): Split ri alternative into two separate alternatives.
Update type.
* sh1.md (sh1_load_store, sh1_fp): Update.
* sh4.md (sh4_store, sh4_mac_gp, fp_arith, fp_double_arith): Update.
(mac_mem, sh4_fpscr_toggle): New insn_reservations.
* sh4a.md (sh4a_mov, sh4a_load, sh4a_store, sh4a_fp_arith): Update.
(sh4a_fp_double_arith): Likewise.
* sh4-300.md: New file.
* sh.c (sh_handle_option): Handle m4-300* options.
(sh_adjust_cost): Fix latency of auto-increments.
Handle SH4-300 differently than other SH4s. Check for new insn
types.
* sh.h (OVERRIDE_OPTIONS): Initilize sh_branch_cost if it has not
been set by an option.
* sh.opt (m4-300, m4-100-nofpu, m4-200-nofpu): New options.
(m4-300-nofpu, -m4-340, m4-300-single, m4-300-single-only): Likewise.
(mbranch-cost=): Likewise.
* superh.h (STARTFILE_SPEC): Take -m4-340 into account.
* sh.md (mulsf3): Remove special expansion code.
(mulsf3_ie): Now a define_insn_and_split.
(macsf3): Allow for TARGET_SH4.
* sh.md (cbranchsi4, cbranchdi4, cbranchdi4_i): New patterns.
* sh.c (prepare_cbranch_operands, expand_cbranchsi4): New functions.
(expand_cbranchdi4): Likewise.
(sh_rtx_costs): Give lower cost for certain CONST_INT values and for
CONST_DOUBLE if the outer code is COMPARE.
* sh.h (OPTIMIZATION_OPTIONS): If not optimizing for size, set
TARGET_CBRANCHDI4 and TARGET_EXPAND_CBRANCHDI4.
(OVERRIDE_OPTIONS): For TARGET_SHMEDIA, clear TARGET_CBRANCHDI4.
(LEGITIMATE_CONSTANT_P): Also allow DImode and VOIDmode
CONST_DOUBLEs.
Remove redundant fp_{zero,one}_operand checks.
* sh.opt (mcbranchdi, mexpand-cbranchdi, mcmpeqdi): New options.
* sh-protos.h (prepare_cbranch_operands, expand_cbranchsi4): Declare.
(expand_cbranchdi4): Likewise.
2006-04-20 J"orn Rennecke <joern.rennecke@st.com>
* sh.h (LOCAL_ALIGNMENT): Use DATA_ALIGNMENT.
gcc/testsuite:
2006-11-03 J"orn Rennecke <joern.rennecke@st.com>
* testsuite/gcc.c-torture/execute/arith-rand-ll.c:
Also test for bogus rest sign.
........
r118459 | davidu | 2006-11-03 09:32:39 -0800 (Fri, 03 Nov 2006) | 9 lines
* config/mips/mips.h (processor_type): Removed PROCESSOR_24K, add
PROCESSOR_24KC and PROCESSOR_24KF.
* config/mips/mips.c (mips_cpu_info_table): Add processor names
and aliases for 4kec/4kem/4kep/24kec/24kef/24kex/34kc/34kf/34kx.
(mips_rtx_cost_data): Add costs for the 24kc.
* config/mips/mips.md ("cpu"): Remove 24k, add 24kc and 24kf.
* config/mips/24k.md: Remove references to 24k and replace with
uses of 24kc/24kf in the appropriate reservations.
* doc/invoke.texi (MIPS Options): Updated.
........
r118460 | davidu | 2006-11-03 09:39:44 -0800 (Fri, 03 Nov 2006) | 2 lines
typo
........
r118461 | pbrook | 2006-11-03 09:49:43 -0800 (Fri, 03 Nov 2006) | 9 lines
2006-11-03 Paul Brook <paul@codesourcery.com>
gcc/
* config/arm/arm.c (arm_file_start): New function.
(TARGET_ASM_FILE_START): Define.
(arm_default_cpu): New variable.
(arm_override_options): Set arm_default_cpu.
........
r118465 | steven | 2006-11-03 14:12:37 -0800 (Fri, 03 Nov 2006) | 15 lines
* tree-dump.c (dump_enable_all): Rename local variable
ir_type to avoid name conflicts.
* cfgloopmanip.c (lv_adjust_loop_entry_edge): Check for IR_GIMPLE
instead of using ir_type().
* profile.c (tree_register_profile_hooks): Likewise.
* value-prof.c (tree_register_value_prof_hooks): Likewise.
* basic-block.h (struct edge_def): Likewise.
* config/arm/arm.c (legitimize_pic_address): Likewise.
* coretypes.h (ir_type): New enum of all intermediate languages
used in GCC.
* cfghooks.c (ir_type): Rename to...
(current_ir_type): ...this. Distinguish between cfgrtl and
cfglayout mode when the current IR is RTL. Return enum ir_type.
* cfghooks.h (ir_type): Replace with current_ir_type prototype.
........
r118470 | gccadmin | 2006-11-03 16:17:39 -0800 (Fri, 03 Nov 2006) | 1 line
Daily bump.
........
r118472 | sayle | 2006-11-03 16:51:51 -0800 (Fri, 03 Nov 2006) | 11 lines
* call.c (build_op_delete_call): Test user-visible type against
size_type_node, instead of against the internal type, sizetype.
* class.c (type_requires_array_cookie): Likewise.
* mangle.c (write_builtin_type) <INTEGER_TYPE>: Remove special
handling of TYPE_IS_SIZETYPE.
* typeck.c (type_after_usual_arithmetic_conversions): Remove
special case handling of TYPE_IS_SIZETYPE.
(comptypes): Likewise.
........
r118474 | geoffk | 2006-11-03 18:59:52 -0800 (Fri, 03 Nov 2006) | 4 lines
* c-decl.c (WANT_C99_INLINE_SEMANTICS): New, set to 1.
(merge_decls): Implement WANT_C99_INLINE_SEMANTICS.
(grokdeclarator): Likewise.
........
r118475 | bonzini | 2006-11-04 00:36:45 -0800 (Sat, 04 Nov 2006) | 30 lines
2006-11-03 Paolo Bonzini <bonzini@gnu.org>
Steven Bosscher <stevenb.gcc@gmail.com>
* fwprop.c: New file.
* Makefile.in: Add fwprop.o.
* tree-pass.h (pass_rtl_fwprop, pass_rtl_fwprop_with_addr): New.
* passes.c (init_optimization_passes): Schedule forward propagation.
* rtlanal.c (loc_mentioned_in_p): Support NULL value of the second
parameter.
* timevar.def (TV_FWPROP): New.
* common.opt (-fforward-propagate): New.
* opts.c (decode_options): Enable forward propagation at -O2.
* gcse.c (one_cprop_pass): Do not run local cprop unless touching
jumps.
* cse.c (fold_rtx_subreg, fold_rtx_mem, fold_rtx_mem_1,
find_best_addr,
canon_for_address, table_size): Remove.
(new_basic_block, insert, remove_from_table): Remove references to
table_size.
(fold_rtx): Process SUBREGs and MEMs with equiv_constant, make
simplification loop more straightforward by not calling fold_rtx
recursively.
(equiv_constant): Move here a small part of fold_rtx_subreg,
do not call fold_rtx. Call avoid_constant_pool_reference
to process MEMs.
* recog.c (canonicalize_change_group): New.
* recog.h (canonicalize_change_group): New.
* doc/invoke.texi (Optimization Options): Document fwprop.
* doc/passes.texi (RTL passes): Document fwprop.
........
r118478 | steven | 2006-11-04 03:13:57 -0800 (Sat, 04 Nov 2006) | 2 lines
ChangeLog fix
........
r118479 | uros | 2006-11-04 04:07:29 -0800 (Sat, 04 Nov 2006) | 4 lines
* config/i386/i386.md (*movxf_nointeger, *movxf_integer): Enable
patterns for standard 80387 constants.
........
r118481 | rearnsha | 2006-11-04 06:26:34 -0800 (Sat, 04 Nov 2006) | 2 lines
* arm.c (thumb_legitimate_addres_p): Allow any constant offset
from the soft-frame, argument and virtual registers.
........
r118483 | fxcoudert | 2006-11-04 12:58:26 -0800 (Sat, 04 Nov 2006) | 6 lines
PR fortran/29713
* expr.c (gfc_simplify_expr): Correct memory allocation.
* gfortran.dg/pr29713.f90: New test.
........
r118484 | uros | 2006-11-04 15:12:16 -0800 (Sat, 04 Nov 2006) | 14 lines
PR target/26915
* config/i386/i386.c (standard_80387_constant_p): Treat -0.0 and -1.0
as a valid 80387 constant.
(standard_80387_constant_opcode): Return "#" for -0.0 and -1.0.
* config/i386/i386.md (unnamed splitter): Split the load of
constant -0.0 or -1.0 into the load of 0.0 or 1.0, followed
by negation.
testsuite/ChangeLog:
PR target/26915
* gcc.target/i386/387-12.c: New test.
~
........
r118489 | gccadmin | 2006-11-04 16:17:22 -0800 (Sat, 04 Nov 2006) | 1 line
Daily bump.
........
r118491 | brooks | 2006-11-04 16:28:08 -0800 (Sat, 04 Nov 2006) | 6 lines
* fortran/error.c (show_locus): Add trailing colon in error messages.
(error_print): Avoid leading space in error lines.
* testsuite/lib/gfortran-dg.exp (gfortran-dg-test): Adjust pattern
for matching error messages.
........
r118492 | pault | 2006-11-04 22:27:48 -0800 (Sat, 04 Nov 2006) | 18 lines
2006-11-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu,org>
Paul Thomas <pault@gcc.gnu.org>
PR fortran/24518
* trans-intrinsic.c (gfc_conv_intrinsic_mod): Use built_in fmod
for both MOD and MODULO, if it is available.
PR fortran/29565
* trans-expr.c (gfc_conv_aliased_arg): For an INTENT(OUT), save
the declarations from the unused loops by merging the block
scope for each; this ensures that the temporary is declared.
2006-11-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29565
* gfortran.dg/gfortran.dg/aliasing_dummy_3.f90: New test.
........
r118494 | ebotcazou | 2006-11-05 02:19:18 -0800 (Sun, 05 Nov 2006) | 1 line
Fix typos.
........
r118496 | charlet | 2006-11-05 02:58:41 -0800 (Sun, 05 Nov 2006) | 4 lines
* s-osinte-linux-alpha.ads, s-osinte-linux-hppa.ads
(To_Target_Priority): New function.
Fix PR ada/29707
........
r118497 | jakub | 2006-11-05 04:13:46 -0800 (Sun, 05 Nov 2006) | 7 lines
PR middle-end/29695
* fold-const.c (fold_ternary): Fix A < 0 ? <sign bit of A> : 0
simplification.
* gcc.c-torture/execute/pr29695-1.c: New test.
* gcc.c-torture/execute/pr29695-2.c: New test.
........
r118500 | kkojima | 2006-11-05 04:58:28 -0800 (Sun, 05 Nov 2006) | 4 lines
* config/sh/lib1funcs-4-300.asm: Guard entire file with
#if !__SHMEDIA__ .
........
r118501 | aldot | 2006-11-05 06:57:24 -0800 (Sun, 05 Nov 2006) | 9 lines
2006-11-05 Bernhard Fischer <aldot@gcc.gnu.org>
PR fortran/21061
* error.c (gfc_warning): If warnings_are_errors then treat
warnings as errors with respect to the exit code.
(gfc_notify_std): Ditto.
(gfc_warning_now): Ditto.
........
r118502 | paolo | 2006-11-05 08:17:03 -0800 (Sun, 05 Nov 2006) | 6 lines
2006-11-05 Paolo Carlini <pcarlini@suse.de>
* docs/html/ext/lwg-active.html, lwg-defects.html: Import Revision 45.
* docs/html/ext/lwg-closed.html: Add.
* docs/html/ext/howto.html: Adjust.
........
r118506 | jvdelisle | 2006-11-05 09:35:30 -0800 (Sun, 05 Nov 2006) | 10 lines
2006-11-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/25545
* io/transfer.c (write_block): Cleanup code paths between
stream and non-stream I/O.
(write_buf): Cleanup.
(read_block): Cleanup.
(finalize_transfer): Call next_record for '$' edit descriptor handling
of internal unit. Cleanup code for readability.
........
r118507 | jvdelisle | 2006-11-05 09:40:42 -0800 (Sun, 05 Nov 2006) | 5 lines
2006-11-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/25545
* gfortran.dg/dollar_edit_descriptor-2.f: New test.
........
r118508 | jvdelisle | 2006-11-05 09:54:17 -0800 (Sun, 05 Nov 2006) | 4 lines
2006-11-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
* io/transfer.c (next_record_w): Fix indentation.
........
r118515 | gccadmin | 2006-11-05 16:17:47 -0800 (Sun, 05 Nov 2006) | 1 line
Daily bump.
........
r118518 | vprus | 2006-11-06 01:49:07 -0800 (Mon, 06 Nov 2006) | 10 lines
* config/arm/t-strongarm-pe: (TARGET_LIBGCC2_CFLAGS): Do no
set inhibit_libc.
* config/arm/t-strongarm-elf: Likewise.
* config/arm/t-pe: Likewise.
* config/arm/t-arm-elf: Likewise.
* config/arm/t-xscale-elf: Likewise.
* config/arm/t-arm-coff: Likewise.
* config/arm/t-xscale-coff: Likewise.
* config/arm/t-wince-pe: Likewise.
........
r118523 | fche | 2006-11-06 10:02:13 -0800 (Mon, 06 Nov 2006) | 10 lines
2006-11-06 Frank Ch. Eigler <fche@redhat.com>
* configure.ac (__libc_freeres): Look for it.
* mf-impl.h (call_libc_freeres): New configuration flag.
* mf-runtime.c (__mf_set_default_options): Set it by default.
(__mfu_report): Call it if needed.
(__mfu_unregister): Remove "unaccessed registered object" warning.
* configure, config.h.in: Regenerated.
........
r118524 | bwilson | 2006-11-06 10:50:37 -0800 (Mon, 06 Nov 2006) | 24 lines
* longlong.h (__xtensa__): Add definitions for umul_ppmm, __umulsidi3,
count_leading_zeros, and count_trailing_zeros.
* config/xtensa/xtensa.c (TARGET_INIT_BUILTINS): Define.
(TARGET_FOLD_BUILTIN): Define.
(TARGET_EXPAND_BUILTIN): Define.
(xtensa_init_builtins): New.
(xtensa_fold_builtin): New.
(xtensa_expand_builtin): New.
(xtensa_rtx_costs): Add CTZ and CLZ. Adjust costs for MULT.
* config/xtensa/xtensa.h (TARGET_MUL32_HIGH): Define.
(CLZ_DEFINED_VALUE_AT_ZERO): Define.
(CTZ_DEFINED_VALUE_AT_ZERO): Define.
* config/xtensa/xtensa.md (UNSPEC_NSAU): Remove.
(any_extend): New code macro.
(u, su): New code attributes.
(<u>mulsidi3, <u>mulsi3_highpart, clzsi2, ctzsi2): New.
(nsau): Remove; replaced by clzsi2.
(ffssi2): Use clzsi2.
* config/xtensa/t-xtensa (LIB1ASMFUNCS): Add _umulsidi3,
_clzsi2, _ctzsi2, and _ffssi2. Rename _nsau to _clz.
* config/xtensa/lib1funcs.asm (__mulsi3): Support Mul32 option.
(__umulsidi3, __clzsi2, __ctzsi2, __ffssi2): New.
(__nsau_data): Guard with ifdef L_clz instead of L_nsau.
........
r118525 | dannysmith | 2006-11-06 11:49:31 -0800 (Mon, 06 Nov 2006) | 5 lines
2006-11-06 Jan van Dijk <jan@etpmod.phys.tue.nl>
* configure.ac: Fix typo in case statement: :: changed to ;;
* configure: Regenerate.
........
r118526 | fche | 2006-11-06 12:04:14 -0800 (Mon, 06 Nov 2006) | 6 lines
2006-11-06 Frank Ch. Eigler <fche@redhat.com>
From Herman ten Brugge <hermantenbrugge@home.nl>:
* mf-runtime.c (__mf_uncache_object): Optimize the code so that
small and large objects are handled a lot faster.
........
r118528 | eedelman | 2006-11-06 14:18:54 -0800 (Mon, 06 Nov 2006) | 18 lines
fortran/
2006-11-06 Erik Edelmann <eedelman@gcc.gnu.org>
PR fortran/29630
PR fortran/29679
* expr.c (find_array_section): Support vector subscripts. Don't
add sizes for dimen_type == DIMEN_ELEMENT to the shape array.
testsuite/
2006-11-06 Erik Edelmann <eedelman@gcc.gnu.org>
PR fortran/29630
PR fortran/29679
* gfortran.dg/initialization_2.f90: Test PRs 29630 and 29679 too.
* gfortran.dg/initialization_3.f90: New.
........
r118530 | pinskia | 2006-11-06 15:25:19 -0800 (Mon, 06 Nov 2006) | 7 lines
2006-11-06 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR tree-opt/29439
* tree-vrp.c (vrp_int_const_binop): Use the correct tree when
checking for overflow.
........
r118531 | janis | 2006-11-06 16:08:32 -0800 (Mon, 06 Nov 2006) | 22 lines
gcc/
2006-11-06 Janis Johnson <janis187@us.ibm.com>
* gcc/doc/sourcebuild.texi (Test Directives): Add output-exists
and output-exists-not.
gcc/testsuite/
2006-11-06 Janis Johnson <janis187@us.ibm.com
Bernhard Fischer <aldot@gcc.gnu.org>
* lib/gcc-dg.exp (output-exists): New proc.
(output-exists-not): New proc.
* gcc.test-framework/test-framework.awk: Support new directives.
* gcc.test-framework/dg-outexistsnot-exp-F.c: New test.
* gcc.test-framework/dg-outexistsnot-exp-P.c: New test.
* gcc.test-framework/dg-outexists-exp-F.c: New test.
* gcc.test-framework/dg-outexists-exp-XP.c: New test.
* gcc.test-framework/dg-outexistsnot-exp-XF.c: New test.
* gcc.test-framework/dg-outexists-exp-P.c: New test.
........
r118536 | gccadmin | 2006-11-06 16:17:48 -0800 (Mon, 06 Nov 2006) | 1 line
Daily bump.
........
r118538 | brooks | 2006-11-06 17:49:55 -0800 (Mon, 06 Nov 2006) | 3 lines
* intrinsic.texi: Added documentation for FTELL, GETLOG, and HOSTNM
intrinsics.
........
r118540 | brooks | 2006-11-06 17:52:49 -0800 (Mon, 06 Nov 2006) | 2 lines
Fixed incorrect date in changelog entry.
........
r118541 | echristo | 2006-11-06 21:40:34 -0800 (Mon, 06 Nov 2006) | 7 lines
2006-11-06 Eric Christopher <echristo@apple.com>
* config.gcc: Add x86_64-darwin host support.
* config.host: Ditto.
* config/i386/darwin64.h: New file.
* config/i386/t-darwin64: Ditto.
........
r118542 | burnus | 2006-11-07 01:11:08 -0800 (Tue, 07 Nov 2006) | 21 lines
fortran/
2006-11-06 Tobias Burnus <burnus@net-b.de>
* decl.c (match_attr_spec, gfc_match_enum): Unify gfc_notify_std
message for GFC_STD_F2003.
* array.c (gfc_match_array_constructor): Unify gfc_notify_std
message for GFC_STD_F2003.
* io.c (check_io_constraints): Unify gfc_notify_std message for
GFC_STD_F2003.
* resolve.c (resolve_actual_arglist): Unify gfc_notify_std message
for GFC_STD_F2003.
testsuite/
2006-11-06 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/io_constraints_2.f90: Adjust pattern
for matching error messages.
* gfortran.dg/specifics_3.f90: Adjust pattern
for matching error messages.
........
r118543 | bkoz | 2006-11-07 04:33:20 -0800 (Tue, 07 Nov 2006) | 8 lines
2006-11-07 Benjamin Kosnik <bkoz@redhat.com>
* include/ext/pb_ds/exception.hpp: Add translation support to
exception strings.
* include/ext/concurrence.h: Same.
* include/tr1/array: Same.
........
Added:
branches/fixed-point/gcc/config/i386/darwin64.h
- copied unchanged from r118543, trunk/gcc/config/i386/darwin64.h
branches/fixed-point/gcc/config/i386/t-darwin64
- copied unchanged from r118543, trunk/gcc/config/i386/t-darwin64
branches/fixed-point/gcc/testsuite/gcc.test-framework/dg-outexists-exp-F.c
- copied unchanged from r118543,
trunk/gcc/testsuite/gcc.test-framework/dg-outexists-exp-F.c
branches/fixed-point/gcc/testsuite/gcc.test-framework/dg-outexists-exp-P.c
- copied unchanged from r118543,
trunk/gcc/testsuite/gcc.test-framework/dg-outexists-exp-P.c
branches/fixed-point/gcc/testsuite/gcc.test-framework/dg-outexists-exp-XP.c
- copied unchanged from r118543,
trunk/gcc/testsuite/gcc.test-framework/dg-outexists-exp-XP.c
branches/fixed-point/gcc/testsuite/gcc.test-framework/dg-outexistsnot-exp-F.c
- copied unchanged from r118543,
trunk/gcc/testsuite/gcc.test-framework/dg-outexistsnot-exp-F.c
branches/fixed-point/gcc/testsuite/gcc.test-framework/dg-outexistsnot-exp-P.c
- copied unchanged from r118543,
trunk/gcc/testsuite/gcc.test-framework/dg-outexistsnot-exp-P.c
branches/fixed-point/gcc/testsuite/gcc.test-framework/dg-outexistsnot-exp-XF.c
- copied unchanged from r118543,
trunk/gcc/testsuite/gcc.test-framework/dg-outexistsnot-exp-XF.c
Modified:
branches/fixed-point/ (props changed)
branches/fixed-point/gcc/ChangeLog
branches/fixed-point/gcc/DATESTAMP
branches/fixed-point/gcc/Makefile.in
branches/fixed-point/gcc/ada/ChangeLog
branches/fixed-point/gcc/ada/s-osinte-linux-alpha.ads
branches/fixed-point/gcc/ada/s-osinte-linux-hppa.ads
branches/fixed-point/gcc/basic-block.h
branches/fixed-point/gcc/c-decl.c
branches/fixed-point/gcc/cfghooks.c
branches/fixed-point/gcc/cfghooks.h
branches/fixed-point/gcc/cfgloopmanip.c
branches/fixed-point/gcc/common.opt
branches/fixed-point/gcc/config.gcc
branches/fixed-point/gcc/config.host
branches/fixed-point/gcc/config/arm/arm.c
branches/fixed-point/gcc/config/arm/t-arm-coff
branches/fixed-point/gcc/config/arm/t-arm-elf
branches/fixed-point/gcc/config/arm/t-pe
branches/fixed-point/gcc/config/arm/t-strongarm-elf
branches/fixed-point/gcc/config/arm/t-strongarm-pe
branches/fixed-point/gcc/config/arm/t-wince-pe
branches/fixed-point/gcc/config/arm/t-xscale-coff
branches/fixed-point/gcc/config/arm/t-xscale-elf
branches/fixed-point/gcc/config/i386/i386.c
branches/fixed-point/gcc/config/i386/i386.md
branches/fixed-point/gcc/config/mips/24k.md
branches/fixed-point/gcc/config/mips/mips.c
branches/fixed-point/gcc/config/mips/mips.h
branches/fixed-point/gcc/config/mips/mips.md
branches/fixed-point/gcc/config/sh/crt1.asm
branches/fixed-point/gcc/config/sh/divcost-analysis
branches/fixed-point/gcc/config/sh/embed-elf.h
branches/fixed-point/gcc/config/sh/sh-protos.h
branches/fixed-point/gcc/config/sh/sh.c
branches/fixed-point/gcc/config/sh/sh.h
branches/fixed-point/gcc/config/sh/sh.md
branches/fixed-point/gcc/config/sh/sh.opt
branches/fixed-point/gcc/config/sh/sh1.md
branches/fixed-point/gcc/config/sh/sh4.md
branches/fixed-point/gcc/config/sh/sh4a.md
branches/fixed-point/gcc/config/sh/superh.h
branches/fixed-point/gcc/config/sh/t-sh
branches/fixed-point/gcc/config/xtensa/lib1funcs.asm
branches/fixed-point/gcc/config/xtensa/t-xtensa
branches/fixed-point/gcc/config/xtensa/xtensa.c
branches/fixed-point/gcc/config/xtensa/xtensa.h
branches/fixed-point/gcc/config/xtensa/xtensa.md
branches/fixed-point/gcc/configure
branches/fixed-point/gcc/configure.ac
branches/fixed-point/gcc/coretypes.h
branches/fixed-point/gcc/cp/ChangeLog
branches/fixed-point/gcc/cp/call.c
branches/fixed-point/gcc/cp/class.c
branches/fixed-point/gcc/cp/mangle.c
branches/fixed-point/gcc/cp/typeck.c
branches/fixed-point/gcc/cse.c
branches/fixed-point/gcc/doc/invoke.texi
branches/fixed-point/gcc/doc/passes.texi
branches/fixed-point/gcc/doc/sourcebuild.texi
branches/fixed-point/gcc/fold-const.c
branches/fixed-point/gcc/fortran/ChangeLog
branches/fixed-point/gcc/fortran/array.c
branches/fixed-point/gcc/fortran/decl.c
branches/fixed-point/gcc/fortran/error.c
branches/fixed-point/gcc/fortran/expr.c
branches/fixed-point/gcc/fortran/f95-lang.c
branches/fixed-point/gcc/fortran/intrinsic.texi
branches/fixed-point/gcc/fortran/io.c
branches/fixed-point/gcc/fortran/resolve.c
branches/fixed-point/gcc/fortran/trans-expr.c
branches/fixed-point/gcc/fortran/trans-intrinsic.c
branches/fixed-point/gcc/gcse.c
branches/fixed-point/gcc/longlong.h
branches/fixed-point/gcc/opts.c
branches/fixed-point/gcc/passes.c
branches/fixed-point/gcc/profile.c
branches/fixed-point/gcc/recog.c
branches/fixed-point/gcc/recog.h
branches/fixed-point/gcc/rtlanal.c
branches/fixed-point/gcc/testsuite/ChangeLog
branches/fixed-point/gcc/testsuite/gcc.c-torture/execute/arith-rand-ll.c
branches/fixed-point/gcc/testsuite/gcc.test-framework/test-framework.awk
branches/fixed-point/gcc/testsuite/gfortran.dg/initialization_2.f90
branches/fixed-point/gcc/testsuite/gfortran.dg/io_constraints_2.f90
branches/fixed-point/gcc/testsuite/gfortran.dg/specifics_3.f90
branches/fixed-point/gcc/testsuite/gfortran.dg/zero_sized_1.f90
branches/fixed-point/gcc/testsuite/lib/gcc-dg.exp
branches/fixed-point/gcc/testsuite/lib/gfortran-dg.exp
branches/fixed-point/gcc/timevar.def
branches/fixed-point/gcc/tree-dump.c
branches/fixed-point/gcc/tree-pass.h
branches/fixed-point/gcc/tree-vrp.c
branches/fixed-point/gcc/value-prof.c
branches/fixed-point/libgfortran/ChangeLog
branches/fixed-point/libgfortran/generated/reshape_c10.c
branches/fixed-point/libgfortran/generated/reshape_c16.c
branches/fixed-point/libgfortran/generated/reshape_c4.c
branches/fixed-point/libgfortran/generated/reshape_c8.c
branches/fixed-point/libgfortran/generated/reshape_i16.c
branches/fixed-point/libgfortran/generated/reshape_i4.c
branches/fixed-point/libgfortran/generated/reshape_i8.c
branches/fixed-point/libgfortran/generated/reshape_r10.c
branches/fixed-point/libgfortran/generated/reshape_r16.c
branches/fixed-point/libgfortran/generated/reshape_r4.c
branches/fixed-point/libgfortran/generated/reshape_r8.c
branches/fixed-point/libgfortran/intrinsics/reshape_generic.c
branches/fixed-point/libgfortran/io/transfer.c
branches/fixed-point/libgfortran/m4/reshape.m4
branches/fixed-point/libmudflap/ChangeLog
branches/fixed-point/libmudflap/config.h.in
branches/fixed-point/libmudflap/configure
branches/fixed-point/libmudflap/configure.ac
branches/fixed-point/libmudflap/mf-impl.h
branches/fixed-point/libmudflap/mf-runtime.c
branches/fixed-point/libstdc++-v3/ChangeLog
branches/fixed-point/libstdc++-v3/docs/html/ext/howto.html
branches/fixed-point/libstdc++-v3/docs/html/ext/lwg-active.html
branches/fixed-point/libstdc++-v3/docs/html/ext/lwg-defects.html
branches/fixed-point/libstdc++-v3/include/ext/concurrence.h
branches/fixed-point/libstdc++-v3/include/ext/pb_ds/exception.hpp
branches/fixed-point/libstdc++-v3/include/tr1/array
Propchange: branches/fixed-point/
('svnmerge-integrated' modified)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26915
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/26915] missed sized opt returning -1.0
[not found] <bug-26915-4@http.gcc.gnu.org/bugzilla/>
@ 2021-10-18 11:18 ` cvs-commit at gcc dot gnu.org
0 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-18 11:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26915
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Roger Sayle <sayle@gcc.gnu.org>:
https://gcc.gnu.org/g:247c407c83f0015f4b92d5f71e45b63192f6757e
commit r12-4475-g247c407c83f0015f4b92d5f71e45b63192f6757e
Author: Roger Sayle <roger@nextmovesoftware.com>
Date: Mon Oct 18 12:15:40 2021 +0100
Try placing RTL folded constants in the constant pool.
My recent attempts to come up with a testcase for my patch to evaluate
ss_plus in simplify-rtx.c, identified a missed optimization opportunity
(that's potentially a long-time regression): The RTL optimizers no longer
place constants in the constant pool.
The motivating x86_64 example is the simple program:
typedef char v8qi __attribute__ ((vector_size (8)));
v8qi foo()
{
v8qi tx = { 1, 0, 0, 0, 0, 0, 0, 0 };
v8qi ty = { 2, 0, 0, 0, 0, 0, 0, 0 };
v8qi t = __builtin_ia32_paddsb(tx, ty);
return t;
}
which (with my previous patch) currently results in:
foo: movq .LC0(%rip), %xmm0
movq .LC1(%rip), %xmm1
paddsb %xmm1, %xmm0
ret
even though the RTL contains the result in a REG_EQUAL note:
(insn 7 6 12 2 (set (reg:V8QI 83)
(ss_plus:V8QI (reg:V8QI 84)
(reg:V8QI 85))) "ssaddqi3.c":7:12 1419 {*mmx_ssaddv8qi3}
(expr_list:REG_DEAD (reg:V8QI 85)
(expr_list:REG_DEAD (reg:V8QI 84)
(expr_list:REG_EQUAL (const_vector:V8QI [
(const_int 3 [0x3])
(const_int 0 [0]) repeated x7
])
(nil)))))
Together with the patch below, GCC will now generate the much
more sensible:
foo: movq .LC2(%rip), %xmm0
ret
My first approach was to look in cse.c (where the REG_EQUAL note gets
added) and notice that the constant pool handling functionality has been
unreachable for a while. A quick search for constant_pool_entries_cost
shows that it's initialized to zero, but never set to a non-zero value,
meaning that force_const_mem is never called. This functionality used
to work way back in 2003, but has been lost over time:
https://gcc.gnu.org/pipermail/gcc-patches/2003-October/116435.html
The changes to cse.c below restore this functionality (placing suitable
constants in the constant pool) with two significant refinements;
(i) it only attempts to do this if the function already uses a constant
pool (thanks to the availability of crtl->uses_constant_pool since 2003).
(ii) it allows different constants (i.e. modes) to have different costs,
so that floating point "doubles" and 64-bit, 128-bit, 256-bit and 512-bit
vectors don't all have the share the same cost. Back in 2003, the
assumption was that everything in a constant pool had the same
cost, hence the global variable constant_pool_entries_cost.
Although this is a useful CSE fix, it turns out that it doesn't cure
my motivating problem above. CSE only considers a single instruction,
so determines that it's cheaper to perform the ss_plus (COSTS_N_INSNS(1))
than read the result from the constant pool (COSTS_N_INSNS(2)). It's
only when the other reads from the constant pool are also eliminated,
that this transformation is a win. Hence a better place to perform
this transformation is in combine, where after failing to "recog" the
load of a suitable constant, it can retry after calling force_const_mem.
This achieves the desired transformation and allows the backend insn_cost
call-back to control whether or not using the constant pool is preferrable.
Alas, it's rare to change code generation without affecting something in
GCC's testsuite. On x86_64-pc-linux-gnu there were two families of new
failures (and I'd predict similar benign fallout on other platforms).
One failure was gcc.target/i386/387-12.c (aka PR target/26915), where
the test is missing an explicit -m32 flag. On i686, it's very reasonable
to materialize -1.0 using "fld1; fchs", but on x86_64-pc-linux-gnu we
currently generate the awkward:
testm1: fld1
fchs
fstpl -8(%rsp)
movsd -8(%rsp), %xmm0
ret
which combine now very reasonably simplifies to just:
testm1: movsd .LC3(%rip), %xmm0
ret
The other class of x86_64-pc-linux-gnu failure was from materialization
of vector constants using vpbroadcast (e.g. gcc.target/i386/pr90773-17.c)
where the decision is finely balanced; the load of an integer register
with an immediate constant, followed by a vpbroadcast is deemed to be
COSTS_N_INSNS(2), whereas a load from the constant pool is also reported
as COSTS_N_INSNS(2). My solution is to tweak the i386.c's rtx_costs
so that all other things being equal, an instruction (sequence) that
accesses memory is fractionally more expensive than one that doesn't.
2021-10-18 Roger Sayle <roger@nextmovesoftware.com>
gcc/ChangeLog
* combine.c (recog_for_combine): For an unrecognized move/set of
a constant, try force_const_mem to place it in the constant pool.
* cse.c (constant_pool_entries_cost,
constant_pool_entries_regcost):
Delete global variables (that are no longer assigned a cost value).
(cse_insn): Simplify logic for deciding whether to place a folded
constant in the constant pool using force_const_mem.
(cse_main): Remove zero initialization of
constant_pool_entries_cost
and constant_pool_entries_regcost.
* config/i386/i386.c (ix86_rtx_costs): Make memory accesses
fractionally more expensive, when optimizing for speed.
gcc/testsuite/ChangeLog
* gcc.target/i386/387-12.c: Add explicit -m32 option.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2021-10-18 11:18 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-29 10:42 [Bug other/26915] New: missed optimization / returning -1.0 pluto at agmk dot net
2006-03-29 19:23 ` [Bug other/26915] " pluto at agmk dot net
2006-05-01 10:42 ` [Bug target/26915] " pluto at agmk dot net
2006-05-02 8:08 ` [Bug target/26915] missed sized opt " pinskia at gcc dot gnu dot org
2006-11-04 9:10 ` pluto at agmk dot net
2006-11-04 9:11 ` pluto at agmk dot net
2006-11-04 23:12 ` uros at gcc dot gnu dot org
2006-11-04 23:15 ` ubizjak at gmail dot com
2006-12-01 0:09 ` chaoyingfu at gcc dot gnu dot org
[not found] <bug-26915-4@http.gcc.gnu.org/bugzilla/>
2021-10-18 11:18 ` cvs-commit 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).