[Bug rtl-optimization/91656] [10 Regression] wrong code with -fgcse-after-reload
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91656 --- Comment #12 from Alan Modra --- Author: amodra Date: Sat Sep 28 07:12:14 2019 New Revision: 276236 URL: https://gcc.gnu.org/viewcvs?rev=276236=gcc=rev Log: Fix endian issue in pr91656 testcases PR testsuite/91676 PR rtl-optimization/91656 * gcc.dg/torture/pr91656-1.c: Correct for big and pdp endian. * gcc.dg/torture/pr91656-2.c: Likewise. * gcc.dg/torture/pr91656-3.c: Likewise. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/torture/pr91656-1.c trunk/gcc/testsuite/gcc.dg/torture/pr91656-2.c trunk/gcc/testsuite/gcc.dg/torture/pr91656-3.c
[Bug testsuite/91676] new test case gcc.dg/torture/pr91656-1.c in r275406 fails on powerpc64 BE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91676 --- Comment #3 from Alan Modra --- Author: amodra Date: Sat Sep 28 07:12:14 2019 New Revision: 276236 URL: https://gcc.gnu.org/viewcvs?rev=276236=gcc=rev Log: Fix endian issue in pr91656 testcases PR testsuite/91676 PR rtl-optimization/91656 * gcc.dg/torture/pr91656-1.c: Correct for big and pdp endian. * gcc.dg/torture/pr91656-2.c: Likewise. * gcc.dg/torture/pr91656-3.c: Likewise. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/torture/pr91656-1.c trunk/gcc/testsuite/gcc.dg/torture/pr91656-2.c trunk/gcc/testsuite/gcc.dg/torture/pr91656-3.c
[Bug target/91349] [9 regression] powerpc*-*-freebsd* defines _GNU_SOURCE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91349 --- Comment #3 from Alan Modra --- Author: amodra Date: Mon Aug 5 01:53:31 2019 New Revision: 274106 URL: https://gcc.gnu.org/viewcvs?rev=274106=gcc=rev Log: PR91349, powerpc64*-*-freebsd* defines _GNU_SOURCE rev 266496 (git ab6b1bb456) undefined some macros in rs6000/freebsd.h but missed doing the same in rs6000/freebsd64.h. PR target/91349 * config/rs6000/freebsd64.h (CPLUSPLUS_CPP_SPEC), (LINK_GCC_C_SEQUENCE_SPEC): Undef. Modified: branches/gcc-9-branch/gcc/ChangeLog branches/gcc-9-branch/gcc/config/rs6000/freebsd64.h
[Bug target/91349] [9 regression] powerpc*-*-freebsd* defines _GNU_SOURCE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91349 --- Comment #2 from Alan Modra --- Author: amodra Date: Mon Aug 5 01:52:33 2019 New Revision: 274105 URL: https://gcc.gnu.org/viewcvs?rev=274105=gcc=rev Log: PR91349, powerpc64*-*-freebsd* defines _GNU_SOURCE rev 266496 (git ab6b1bb456) undefined some macros in rs6000/freebsd.h but missed doing the same in rs6000/freebsd64.h. PR target/91349 * config/rs6000/freebsd64.h (CPLUSPLUS_CPP_SPEC), (LINK_GCC_C_SEQUENCE_SPEC): Undef. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/freebsd64.h
[Bug target/91135] [9 Regression] __linux__ not defined with -mcall-aixdesc on 9.x and ppc64
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91135 --- Comment #11 from Alan Modra --- Author: amodra Date: Thu Aug 1 05:57:12 2019 New Revision: 273962 URL: https://gcc.gnu.org/viewcvs?rev=273962=gcc=rev Log: [RS6000] PR91135, __linux__ not defined with -mcall-aixdesc on 9.x and ppc64 This patch makes the obvious fix for PR91135, and deletes extraneous copies of GNU_USER_TARGET_D_OS_VERSIONS that appear in rs6000/linux.h and rs6000/linux64.h. Since all configurations using either of these files also include linux.h there is no need to duplicate the macro. PR target/91135 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Don't define. * config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Invoke GNU_USER_TARGET_OS_CPP_BUILTINS for aixdesc abi. (GNU_USER_TARGET_D_OS_VERSIONS): Don't define. Modified: branches/gcc-9-branch/gcc/ChangeLog branches/gcc-9-branch/gcc/config/rs6000/linux.h branches/gcc-9-branch/gcc/config/rs6000/linux64.h
[Bug target/91135] [9/10 Regression] __linux__ not defined with -mcall-aixdesc on 9.x and ppc64
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91135 --- Comment #10 from Alan Modra --- Author: amodra Date: Sun Jul 28 09:29:11 2019 New Revision: 273854 URL: https://gcc.gnu.org/viewcvs?rev=273854=gcc=rev Log: [RS6000] PR91135, __linux__ not defined with -mcall-aixdesc on 9.x and ppc64 This patch makes the obvious fix for PR91135, and deletes extraneous copies of GNU_USER_TARGET_D_OS_VERSIONS that appear in rs6000/linux.h and rs6000/linux64.h. Since all configurations using either of these files also include linux.h there is no need to duplicate the macro. PR target/91135 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Don't define. * config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Invoke GNU_USER_TARGET_OS_CPP_BUILTINS for aixdesc abi. (GNU_USER_TARGET_D_OS_VERSIONS): Don't define. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/linux.h trunk/gcc/config/rs6000/linux64.h
[Bug target/91050] -mdejagnu-cpu= does not affect the -m assembler option
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91050 --- Comment #14 from Alan Modra --- Author: amodra Date: Sun Jul 28 09:26:13 2019 New Revision: 273853 URL: https://gcc.gnu.org/viewcvs?rev=273853=gcc=rev Log: [RS6000] Make assembler command line cpu match default for gcc When gcc is configured using --with-cpu=, the specified cpu effectively becomes a default -mcpu= passed to gcc. This then affects the cpu passed to gas via ASM_CPU_SPEC. If gcc is not configured using --with-cpu then the cpu passed to gas is that given by ASM_DEFAULT_SPEC, which currently does not match the default flags selected in default64.h. This patch makes ASM_DEFAULT_SPEC agree with TARGET_DEFAULT flags. rs6000/default64.h appears in three places in config.gcc, the first one immediately followed by rs6000/freebsd64.h in $tm_file, and the other two immediately followed by rs6000/linux64.h. To be able to define ASM_DEFAULT_SPEC in rs6000/default64.h we don't want to redefine in the other two files. rs6000/freebsd64.h is easy since that file is always preceded by rs6000/default64.h, but rs6000/linux64.h can appear without rs6000/default64.h (a powerpc*-linux config where the default is -m32). In that case we will have TARGET_DEFAULT flags of 0 (from rs6000/sysv4.h) and want to use -mppc without -m64 and -mppc64 with -m64. This can be done by using the rs6000/rtems.h ASM_DEFAULT_SPEC in rs6000/sysv4.h, a change that won't affect sysv4 configurations where -m64 is invalid. The patch also introduces ASM_DEFAULT_EXTRA for the altivec variant targets so as to enable -maltivec by default. PR target/91050 * config/rs6000/sysv4.h (ASM_DEFAULT_SPEC): Modify if -m64. * config/rs6000/default64.h (ASM_DEFAULT_SPEC): Define. * config/rs6000/freebsd64.h (ASM_DEFAULT_SPEC): Don't define. * config/rs6000/linux64.h (ASM_DEFAULT_SPEC): Likewise. * config/rs6000/rtems.h (ASM_DEFAULT_SPEC): Likewise. * config/rs6000/rs6000.h (ASM_DEFAULT_EXTRA): Define and use in asm_default spec. * config/rs6000/eabialtivec.h (ASM_DEFAULT_EXTRA): Redefine. * config/rs6000/linuxaltivec.h (ASM_DEFAULT_EXTRA): Redefine. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/default64.h trunk/gcc/config/rs6000/eabialtivec.h trunk/gcc/config/rs6000/freebsd64.h trunk/gcc/config/rs6000/linux64.h trunk/gcc/config/rs6000/linuxaltivec.h trunk/gcc/config/rs6000/rs6000.h trunk/gcc/config/rs6000/rtems.h trunk/gcc/config/rs6000/sysv4.h
[Bug target/90689] [10 Regression] ICE in extract_insn, at recog.c:2310 on ppc64le
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90689 --- Comment #6 from Alan Modra --- Author: amodra Date: Tue Jun 4 00:13:07 2019 New Revision: 271895 URL: https://gcc.gnu.org/viewcvs?rev=271895=gcc=rev Log: PR90689, ICE in extract_insn on ppc64le PR target/90689 * config/rs6000/rs6000.c (rs6000_call_aix): Correct r271753 merge error. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.c
[Bug target/90545] [10 regression] gcc.target/powerpc/fold-vec-splats-floatdouble.c fails starting with r271022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90545 --- Comment #1 from Alan Modra --- Author: amodra Date: Tue May 21 13:36:04 2019 New Revision: 271464 URL: https://gcc.gnu.org/viewcvs?rev=271464=gcc=rev Log: PR90545, gcc.target/powerpc/fold-vec-splats-floatdouble.c fails I figure a tweak to register_move_cost is better than sprinkling ?s in instruction operand alternatives. PR target/90545 * config/rs6000/rs6000.c (rs6000_register_move_cost): Increase power9 direct move cost. * testsuite/gcc.target/powerpc/fold-vec-splats-floatdouble.c: Correct comments and rename functions to suit parameters. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.c trunk/gcc/testsuite/gcc.target/powerpc/fold-vec-splats-floatdouble.c
[Bug target/89271] [9/10 Regression] gcc.target/powerpc/vsx-simode2.c stopped working in GCC 9
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89271 --- Comment #23 from Alan Modra --- Author: amodra Date: Wed May 8 23:07:26 2019 New Revision: 271022 URL: https://gcc.gnu.org/viewcvs?rev=271022=gcc=rev Log: [RS6000] PR89271, gcc.target/powerpc/vsx-simode2.c This patch makes a number of corrections to rs6000_register_move_cost, adds a new register union class, GEN_OR_VSX_REGS, and adjusts insn alternative costs to suit. The patch initially just corrected register move cost when direct moves are available, but that resulted in regressions. Inspection of those regressions showed ALL_REGS being used as the register allocno class, which isn't ideal. gcc/doc/tm.texi says: "You should define a class for the union of two classes whenever some instruction allows both classes". Thus, define GEN_OR_VSX_REGS for the register allocator. (IRA wants to use the union of two register classes when the costs of the classes are below memory cost, which happens more often with the low direct move cost.) As per https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89271#c11 we ought to be returning the minimal cost for union classes. That can be done by rs6000_register_move_cost testing for vsx first, where the number of regs for a given mode might be smaller than the same mode in gprs, and changing the LINK_OR_CTR_REGS case to exclude SPEC_OR_GEN_REGS and NON_FLOAT_REGS. I removed the VECTOR_MEM_VSX_P test since that leads to silly results for scalar mode moves between altivec and float when TARGET_VSX. eg. rs6000_register_move_cost:, ret=2, mode=DF, from=FLOAT_REGS, to=FLOAT_REGS rs6000_register_move_cost:, ret=16, mode=DF, from=FLOAT_REGS, to=ALTIVEC_REGS rs6000_register_move_cost:, ret=2, mode=DF, from=FLOAT_REGS, to=VSX_REGS The patch also fixes wrong results for moves within and between any of the non-gpr, non-vsx special reg classes. The comment about "moving between two similar registers is just one instruction" is false. We can't move lr to ctr directly, for example. I believe the intent of the "reg_classes_intersect_p (to, from)" was to cover moves within float or altivec, so I moved that test inside the code handling vsx, and made sure the intersection wasn't anything besides vsx by masking off everything else. Masking isn't strictly necessary at the moment, but would be if we create a GEN_OR_ALTIVEC_REGS class some time in the future. TARGET_IRA_CHANGE_PSEUDO_ALLOCNO_CLASS is needed for rs6000 in order to fix the 20% cactus_adm spec regression when using GEN_OR_VSX_REGS as an allocno class. It is similar to the aarch64 version but without any selection by regno mode if the best class is a union class. PR target/89271 * config/rs6000/rs6000.h (enum reg_class, REG_CLASS_NAMES), (REG_CLASS_CONTENTS): Add GEN_OR_VSX_REGS class. * config/rs6000/rs6000.c (rs6000_register_move_cost): Correct cost for general <-> vsx when direct moves are available. Cost union classes at minimal cost for any reg in the class. Correct calculation for moves between vsx, float, and altivec. Don't return a low cost for moves between special regs. Don't use hard coded register numbers. (TARGET_IRA_CHANGE_PSEUDO_ALLOCNO_CLASS): Define. (rs6000_ira_change_pseudo_allocno_class): New function. * config/rs6000/rs6000.md (movsi_internal1, mov_internal), (movdi_internal32, movdi_internal64): Remove '*' from vsx register alternatives. (movsi_internal1): Don't disparage vector alternatives. (mov_internal): Likewise, excepting alternative that will be split. * config/rs6000/vsx.md (vsx_splat__reg): Don't disparage we <- b alternative. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.c trunk/gcc/config/rs6000/rs6000.h trunk/gcc/config/rs6000/rs6000.md trunk/gcc/config/rs6000/vsx.md
[Bug target/89271] [9 Regression] gcc.target/powerpc/vsx-simode2.c stopped working in GCC 9
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89271 --- Comment #12 from Alan Modra --- Author: amodra Date: Sun Feb 24 02:01:05 2019 New Revision: 269174 URL: https://gcc.gnu.org/viewcvs?rev=269174=gcc=rev Log: [RS6000] Fix _ and tf_ splitters This patch fixes a bug that can result in "insn does not satisfy its constraints" if these splitters fire due to not getting ctr for the jump insn. Since the jump insn can have any of r,m,d,wi,c,l as the decremented count output, it's not sufficient to check for gpc_reg_operand (which matches VSX regs for example). Seen after correcting register_move_cost when the cost of gpr <-> vsx is much lower. Since this is a prerequisite to fixing PR89271, I'm mentioning that PR in the ChangeLog. The tf_ split had a further bug in that it wouldn't match if the count output was m,d,wi, or l. PR target/89271 * config/rs6000/rs6000.md (_ split): Check for an int output reg on add insn. (tf_ split): Likewise. Match predicates with insn. Modified: branches/gcc-8-branch/gcc/ChangeLog branches/gcc-8-branch/gcc/config/rs6000/rs6000.md
[Bug target/89271] [9 Regression] gcc.target/powerpc/vsx-simode2.c stopped working in GCC 9
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89271 --- Comment #4 from Alan Modra --- Author: amodra Date: Sun Feb 17 03:01:41 2019 New Revision: 268968 URL: https://gcc.gnu.org/viewcvs?rev=268968=gcc=rev Log: [RS6000] Fix _ and tf_ splitters This patch fixes a bug that can result in "insn does not satisfy its constraints" if these splitters fire due to not getting ctr for the jump insn. Since the jump insn can have any of r,m,d,wi,c,l as the decremented count output, it's not sufficient to check for gpc_reg_operand (which matches VSX regs for example). Seen after correcting register_move_cost when the cost of gpr <-> vsx is much lower. Since this is a prerequisite to fixing PR89271, I'm mentioning that PR in the ChangeLog. The tf_ split had a further bug in that it wouldn't match if the count output was m,d,wi, or l. PR target/89271 * config/rs6000/rs6000.md (_ split): Check for an int output reg on add insn. (tf_ split): Likewise. Match predicates with insn. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.md
[Bug target/88343] [7/8 Regression] R31 is unconditionally saved/restored on powerpc-darwin even when it's not necessary.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88343 --- Comment #35 from Alan Modra --- Author: amodra Date: Sat Feb 9 12:44:02 2019 New Revision: 268722 URL: https://gcc.gnu.org/viewcvs?rev=268722=gcc=rev Log: [RS6000] Correct save_reg_p PR target/88343 * config/rs6000/rs6000.c (rs6000_reg_live_or_pic_offset_p): Match logic in rs6000_emit_prologue emitting pic_offset_table setup. Modified: branches/gcc-7-branch/gcc/ChangeLog branches/gcc-7-branch/gcc/config/rs6000/rs6000.c
[Bug target/88343] [7/8 Regression] R31 is unconditionally saved/restored on powerpc-darwin even when it's not necessary.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88343 --- Comment #31 from Alan Modra --- Author: amodra Date: Sat Feb 9 08:39:58 2019 New Revision: 268715 URL: https://gcc.gnu.org/viewcvs?rev=268715=gcc=rev Log: [RS6000] Correct save_reg_p PR target/88343 * config/rs6000/rs6000.c (save_reg_p): Match logic in rs6000_emit_prologue emitting pic_offset_table setup. Modified: branches/gcc-8-branch/gcc/ChangeLog branches/gcc-8-branch/gcc/config/rs6000/rs6000.c
[Bug target/88343] [7/8 Regression] R31 is unconditionally saved/restored on powerpc-darwin even when it's not necessary.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88343 --- Comment #30 from Alan Modra --- Author: amodra Date: Fri Feb 8 22:20:58 2019 New Revision: 268708 URL: https://gcc.gnu.org/viewcvs?rev=268708=gcc=rev Log: [RS6000] Correct save_reg_p Fixes lack of r30 save/restore on // -m32 -fpic -ftls-model=initial-exec __thread char* p; char** f1 (void) { return } and // -m32 -fpic -msecure-plt extern int foo (int); int f1 (int x) { return foo (x); } These are both caused by save_reg_p returning false when the pic offset table reg (r30 for ABI_V4) was used, due to the logic not exactly matching that in rs6000_emit_prologue to set up r30. I also noticed that save_reg_p isn't following the comment regarding calls_eh_return (since svn 267049, git 0edf78b1b2a0), and the comment needs tweaking too. For why the revised comment is correct, grep for saves_all_registers in lra.c, and yes, we do want to save the pic offset table reg for eh_return. PR target/88343 * config/rs6000/rs6000.c (save_reg_p): Correct calls_eh_return case. Match logic in rs6000_emit_prologue emitting pic_offset_table setup. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.c
[Bug target/88614] ICE: output_operand: invalid %z value
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88614 --- Comment #3 from Alan Modra --- Author: amodra Date: Tue Jan 22 02:29:47 2019 New Revision: 268135 URL: https://gcc.gnu.org/viewcvs?rev=268135=gcc=rev Log: [RS6000] PR88614, output_operand: invalid %z value The direct cause of this PR is the fact that tls_gdld_nomark didn't handle indirect calls. Also, most indirect calls were being optimised back to direct calls anyway, due to tls_gdld_nomark not checking any of the parallel elements except the first (plus the extra element that distinguishes this call from normal calls). There were other unwanted substitutions too. So this patch attacks the problem of handling special calls in a different way. Rather than adding another element to the call insn parallel to distinguish -mno-tls-markers __tls_get_addr calls from any other calls, we now inspect the second CALL arg. Each call_value_nonlocal and call_value_indirect insn now checks for the tlsgd/ld unspecs when !TARGET_TLS_MARKERS and emits the arg setup insns. I disallow the local call patterns since we'll only see local calls to __tls_get_addr in testcases, and it doesn't seem a good idea to complicate the patterns just for a minor optimisation. Sibling call insns aren't used for libcalls, so none of these insns need to change. The patch also fixes a minor problem with -mno-tls-markers __tls_get_addr calls causing a "li 3,0" instruction to be emitted prior to the arg setup instructions, due to using a libcall with one arg. That isn't correct when the call insn itself sets up its arg. Also, I've tidied the V4 secure-plt calls, generating them in rs6000_call_sysv rather than by splitting in rs6000.md. The CALL_INSN_FUNCTION_USAGE added in edit_tls_call_insn is no longer needed (since git commit 0a4b5c66df9). On the subject of unwanted substitutions, I also saw a _GLOBAL_OFFSET_TABLE_ symbol_ref being substituted for the GOT reg, resulting in code like "addi 3,_GLOBAL_OFFSET_TABLE_,tls_ld@got@tlsld". Fixed by the unspec_tls change. PR target/88614 * config/rs6000/predicates.md (unspec_tls): Ensure GOT reg stays a reg. Allow a const_int. * config/rs6000/rs6000-protos.h (rs6000_output_tlsargs): Declare. * config/rs6000/rs6000.h (IS_V4_FP_ARGS): Define. (IS_NOMARK_TLSGETADDR): Define. * config/rs6000/rs6000.c (edit_tls_call_insn): Delete. (rs6000_output_tlsargs): New function. (rs6000_legitimize_tls_address): Don't say a !TARGET_TLS_MARKERS __tls_get_addr call takes an arg. (rs6000_call_sysv): Generate sysv4 secure plt call pattern here.. * config/rs6000/rs6000.md (call_nonlocal_sysv): ..rather than here, delete split.. (call_value_nonlocal_sysv): ..or here, delete split. (tls_gdld_nomark): Delete. (call_value_indirect_nonlocal_sysv): Use unspec_tls as operand2 predicate. Call rs6000_output_tlsargs. Adjust length to suit. (call_value_nonlocal_sysv): Likewise. (call_value_nonlocal_sysv_secure): Likewise. (call_value_nonlocal_aix): Likewise. (call_value_indirect_aix): Likewise. (call_value_indirect_elfv2): Likewise. (call_value_local32, call_value_local64): Disable for no-mark tls. (call_value_local_aix): Likewise. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/predicates.md trunk/gcc/config/rs6000/rs6000-protos.h trunk/gcc/config/rs6000/rs6000.c trunk/gcc/config/rs6000/rs6000.h trunk/gcc/config/rs6000/rs6000.md
[Bug target/88614] ICE: output_operand: invalid %z value
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88614 --- Comment #1 from Alan Modra --- Author: amodra Date: Mon Jan 7 22:54:40 2019 New Revision: 267666 URL: https://gcc.gnu.org/viewcvs?rev=267666=gcc=rev Log: genattrtab bit-rot, and if_then_else in values This patch started off just by adding if_then_else support in write_attr_value to be able to write a saner expression for powerpc tls_gdld_nomark length. Then I noticed bit-rot in functions used to calculate insn_default_length, insn_min_length, and length_unit_log (which are used by the shorten_branches pass). These functions don't handle a const_int length value and return an "unknown" status that isn't used, or in the case of or_attr_value, doesn't need to be used. min_attr_value also attempts to return INT_MAX for the unhandled rtl case, but this can get lost in recursive calls. I fixed that problem by returning INT_MIN instead, and translating that to INT_MAX in the only caller of min_attr_value. PR target/88614 * genattrtab.c (max_attr_value, min_attr_value, or_attr_value): Delete "unknownp" parameter. Adjust callers. Handle CONST_INT, PLUS, MINUS, and MULT. (attr_value_aligned): Renamed from or_attr_value. (min_attr_value): Return INT_MIN for unhandled rtl case.. (min_fn): ..and translate to INT_MAX here. (write_length_unit_log): Modify to cope without "unknown". (write_attr_value): Handle IF_THEN_ELSE. Modified: trunk/gcc/ChangeLog trunk/gcc/genattrtab.c
[Bug target/88346] [9 Regression] Inconsistent list of CPUs supported by the rs6000 backend after r266502
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88346 --- Comment #2 from Alan Modra --- Author: amodra Date: Sun Dec 23 13:28:20 2018 New Revision: 267375 URL: https://gcc.gnu.org/viewcvs?rev=267375=gcc=rev Log: [RS6000] PR88346, Inconsistent list of CPUs supported after r266502 This patch removes the %e error for AIX, since it seems there has been no attempt to keep cpu support up to date for AIX, and adds missing entries to ASM_CPU_SPEC in rs6000.h. The rs64a->rs64 name change happened a long time ago as a fix for PR20813 (git commit c92b4c3f5b). PR 88346 * config/rs6000/rs6000.h (ASM_CPU_SPEC): Correct %e message. Handle -mcpu=rs64, not -mcpu=rs64a. Handle -mcpu=powerpc64 and -mcpu=titan. * config/rs6000/driver-rs6000.c (asm_names): Similarly. * config/rs6000/aix71.h (ASM_CPU_SPEC): Delete %e message. Handle -mcpu=rs64, not -mcpu=rs64a. * config/rs6000/aix72.h (ASM_CPU_SPEC): Likewise. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/aix71.h trunk/gcc/config/rs6000/aix72.h trunk/gcc/config/rs6000/driver-rs6000.c trunk/gcc/config/rs6000/rs6000.h
[Bug rtl-optimization/88311] [9 Regression] mlongcall indirections are optimised away (for binutils versions that don't support AS_PLTSEQ)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88311 --- Comment #10 from Alan Modra --- Author: amodra Date: Fri Dec 14 09:03:50 2018 New Revision: 267123 URL: https://gcc.gnu.org/viewcvs?rev=267123=gcc=rev Log: [RS6000] PR88311, mlongcall indirections are optimised away Masking CALL_LONG from the cookie was done in order to simplify and correct length attribute calculations for indirect calls at one point in my call series tidy when the indirect patterns used alternatives "0,n" on the cookie operand. (Leaving the CALL_LONG in place calculated the wrong length for long calls without fp args.) This is no longer necessary now that the indirect sysv call patterns explicitly test for the fp arg bits in their length attribute expressions. And without the CALL_LONG to disable insns like call_value_local_svsv, combine merrily replaces the indirect long call sequence with a direct call. As it should. This patch reinstates the CALL_LONG bit. PR rtl-optimization/88311 * config/rs6000/rs6000.c (rs6000_call_sysv): Do not mask cookie. (rs6000_sibcall_sysv): Likewise. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.c
[Bug libgcc/85532] crtend.o built without --enable-initfini-array has bad .eh_frame
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85532 --- Comment #2 from Alan Modra --- Author: amodra Date: Fri Apr 27 09:17:49 2018 New Revision: 259703 URL: https://gcc.gnu.org/viewcvs?rev=259703=gcc=rev Log: PR85532, crtend.o built without --enable-initfini-array has bad .eh_frame PR libgcc/85532 * config/rs6000/t-crtstuff (CRTSTUFF_T_CFLAGS): Add -fno-asynchronous-unwind-tables. Modified: branches/gcc-8-branch/libgcc/ChangeLog branches/gcc-8-branch/libgcc/config/rs6000/t-crtstuff
[Bug libgcc/85532] New: crtend.o built without --enable-initfini-array has bad .eh_frame
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85532 Bug ID: 85532 Summary: crtend.o built without --enable-initfini-array has bad .eh_frame Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgcc Assignee: unassigned at gcc dot gnu.org Reporter: amodra at gmail dot com Target Milestone: --- Seen on a cross from x86_64-linux to powerpc64le-linux. If gcc is configured without --enable-initfini-array, the tests for linker initfini support are not run because those tests are native only. HAVE_INITFINI_ARRAY_SUPPORT is thus zero in auto-host.h, and crtend.o has bogus .eh_frame data past the zero terminator. GNU ld complains about this: error in gcc/crtend.o(.eh_frame); no .eh_frame_hdr table will be created The problem has been worked around on various targets by adding -fno-asynchronous-unwind-tables to CRTSTUFF_T_CFLAGS. See also pr31868 and pr80037. Building crtend.o (and crtendS.o) with -fno-asynchronous-unwind-tables is necessary for a native --disable-initfini-array build too. --- Comment #1 from Alan Modra --- Author: amodra Date: Fri Apr 27 09:06:39 2018 New Revision: 259702 URL: https://gcc.gnu.org/viewcvs?rev=259702=gcc=rev Log: PR85532, crtend.o built without --enable-initfini-array has bad .eh_frame PR libgcc/85532 * config/rs6000/t-crtstuff (CRTSTUFF_T_CFLAGS): Add -fno-asynchronous-unwind-tables. Modified: trunk/libgcc/ChangeLog trunk/libgcc/config/rs6000/t-crtstuff
[Bug debug/84300] ICE in dwarf2cfi on ppc64le with -fsplit-stack -fno-omit-frame-pointer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84300 --- Comment #3 from Alan Modra --- Author: amodra Date: Sat Feb 10 04:49:15 2018 New Revision: 257549 URL: https://gcc.gnu.org/viewcvs?rev=257549=gcc=rev Log: PR84300, ICE in dwarf2cfi on ppc64le with -fsplit-stack -fno-omit-frame-pointer PR target/84300 gcc/ * config/rs6000/rs6000.md (split_stack_return): Remove (use ..). Specify LR as an input. gcc/testsuite/ * gcc.dg/pr84300.c: New. Added: trunk/gcc/testsuite/gcc.dg/pr84300.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.md trunk/gcc/testsuite/ChangeLog
[Bug target/84033] powerpc64le -moptimize-swaps bad code with vec_vbpermq
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84033 --- Comment #5 from Alan Modra --- Author: amodra Date: Mon Jan 29 04:31:18 2018 New Revision: 257137 URL: https://gcc.gnu.org/viewcvs?rev=257137=gcc=rev Log: [PATCH] PR84033, powerpc64le -moptimize-swaps bad code with vec_vbpermq vbpermq produces its output in bits 48..63 of the target vector reg, so the output cannot be lane swapped. gcc/ PR target/84033 * config/rs6000/rs6000.c (rtx_is_swappable_p): Exclude UNSPEC_VBPERMQ. gcc/testsuite/ PR target/84033 * gcc.target/powerpc/swaps-p8-46.c: New. Backport svn r257070 Added: branches/gcc-6-branch/gcc/testsuite/gcc.target/powerpc/swaps-p8-46.c Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/config/rs6000/rs6000.c branches/gcc-6-branch/gcc/testsuite/ChangeLog
[Bug target/84033] powerpc64le -moptimize-swaps bad code with vec_vbpermq
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84033 --- Comment #4 from Alan Modra --- Author: amodra Date: Mon Jan 29 04:23:00 2018 New Revision: 257135 URL: https://gcc.gnu.org/viewcvs?rev=257135=gcc=rev Log: PR84033, powerpc64le -moptimize-swaps bad code with vec_vbpermq vbpermq produces its output in bits 48..63 of the target vector reg, so the output cannot be lane swapped. gcc/ PR target/84033 * config/rs6000/rs6000.c (rtx_is_swappable_p): Exclude UNSPEC_VBPERMQ. gcc/testsuite/ PR target/84033 * gcc.target/powerpc/swaps-p8-46.c: New. Backport svn r257070 Added: branches/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/swaps-p8-46.c Modified: branches/gcc-7-branch/gcc/ChangeLog branches/gcc-7-branch/gcc/config/rs6000/rs6000.c branches/gcc-7-branch/gcc/testsuite/ChangeLog
[Bug target/84033] powerpc64le -moptimize-swaps bad code with vec_vbpermq
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84033 --- Comment #3 from Alan Modra --- Author: amodra Date: Thu Jan 25 23:57:18 2018 New Revision: 257070 URL: https://gcc.gnu.org/viewcvs?rev=257070=gcc=rev Log: PR84033, powerpc64le -moptimize-swaps bad code with vec_vbpermq vbpermq produces its output in bits 48..63 of the target vector reg, so the output cannot be lane swapped. gcc/ PR target/84033 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude UNSPEC_VBPERMQ. Sort other unspecs. gcc/testsuite/ PR target/84033 * gcc.target/powerpc/swaps-p8-46.c: New. Added: trunk/gcc/testsuite/gcc.target/powerpc/swaps-p8-46.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000-p8swap.c trunk/gcc/testsuite/ChangeLog
[Bug lto/82687] [8 regression] g++.dg/asan/default-options-1.C fails starting with r253914
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82687 --- Comment #2 from Alan Modra --- Author: amodra Date: Tue Oct 24 12:45:01 2017 New Revision: 254042 URL: https://gcc.gnu.org/viewcvs?rev=254042=gcc=rev Log: PR82687, g++.dg/asan/default-options-1.C fails with PR82575 fix The problem with making discarded symbols hidden is that the non-default visibility is sticky. When symbols other than the __gnu_lto ones are discarded that turns out to be a bad idea. PR lto/82687 PR lto/82575 * simple-object-elf.c (simple_object_elf_copy_lto_debug_sections): Only make __gnu_lto symbols hidden. Delete outdated comment. Silence ISO C warning. Modified: trunk/libiberty/ChangeLog trunk/libiberty/simple-object-elf.c
[Bug lto/82575] [8 Regression] lto debugobj references __gnu_lto_slim, ld test liblto-17 fails
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82575 --- Comment #10 from Alan Modra --- Author: amodra Date: Tue Oct 24 12:45:01 2017 New Revision: 254042 URL: https://gcc.gnu.org/viewcvs?rev=254042=gcc=rev Log: PR82687, g++.dg/asan/default-options-1.C fails with PR82575 fix The problem with making discarded symbols hidden is that the non-default visibility is sticky. When symbols other than the __gnu_lto ones are discarded that turns out to be a bad idea. PR lto/82687 PR lto/82575 * simple-object-elf.c (simple_object_elf_copy_lto_debug_sections): Only make __gnu_lto symbols hidden. Delete outdated comment. Silence ISO C warning. Modified: trunk/libiberty/ChangeLog trunk/libiberty/simple-object-elf.c
[Bug lto/82575] [8 Regression] lto debugobj references __gnu_lto_slim, ld test liblto-17 fails
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82575 --- Comment #8 from Alan Modra --- Author: amodra Date: Thu Oct 19 23:06:20 2017 New Revision: 253914 URL: https://gcc.gnu.org/viewcvs?rev=253914=gcc=rev Log: PR82575, lto debugobj references __gnu_lto_slim, ld test liblto-17 fails If __gnu_lto_slim is global, undefined, default visibility in the early debug object, then it finds its way into .dynsym when creating shared libraries. __gnu_lto_slim in a symbol table (.dynsym or .symtab) signals nm and other binutils that the object is an LTO object needing a plugin, but that isn't the case for the ld liblti-17 tests. So, make __gnu_lto_slim hidden to prevent it becoming dynamic. Further, make it weak because some linkers may warn on finding an undefined global non-default visibility symbol. PR lto/82575 * simple-object-elf.c (simple_object_elf_copy_lto_debug_sections): Make discarded non-local symbols weak and hidden. Modified: trunk/libiberty/ChangeLog trunk/libiberty/simple-object-elf.c
[Bug target/81996] powerpc __builtin_return_address(0) fails with -fPIC -fstack-protector-all or -fsanitize=address
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81996 --- Comment #10 from Alan Modra --- Author: amodra Date: Thu Sep 21 13:25:45 2017 New Revision: 253070 URL: https://gcc.gnu.org/viewcvs?rev=253070=gcc=rev Log: PR81996, __builtin_return_address(0) fails rs6000_return_addr assumes that the stack link is at frame+0, which is true for count>0. For count==0, rs6000_return_addr is called with frame==frame_pointer_rtx and the stack link is *not* at frame+0 if -fstack-protector-all or -fsanitize=address because rs6000.h sets FRAME_GROWS_DOWNWARD for those options. PR target/81996 * gcc/config/rs6000/rs6000.c (rs6000_return_addr): Use stack_pointer_rtx for count 0. Update comments. Break up large rtl expression. Modified: branches/gcc-5-branch/gcc/ChangeLog branches/gcc-5-branch/gcc/config/rs6000/rs6000.c
[Bug target/81996] powerpc __builtin_return_address(0) fails with -fPIC -fstack-protector-all or -fsanitize=address
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81996 --- Comment #9 from Alan Modra --- Author: amodra Date: Thu Sep 21 12:57:24 2017 New Revision: 253068 URL: https://gcc.gnu.org/viewcvs?rev=253068=gcc=rev Log: PR81996, __builtin_return_address(0) fails rs6000_return_addr assumes that the stack link is at frame+0, which is true for count>0. For count==0, rs6000_return_addr is called with frame==frame_pointer_rtx and the stack link is *not* at frame+0 if -fstack-protector-all or -fsanitize=address because rs6000.h sets FRAME_GROWS_DOWNWARD for those options. PR target/81996 * gcc/config/rs6000/rs6000.c (rs6000_return_addr): Use stack_pointer_rtx for count 0. Update comments. Break up large rtl expression. Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/config/rs6000/rs6000.c
[Bug target/81996] powerpc __builtin_return_address(0) fails with -fPIC -fstack-protector-all or -fsanitize=address
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81996 --- Comment #8 from Alan Modra --- Author: amodra Date: Thu Sep 21 12:55:37 2017 New Revision: 253067 URL: https://gcc.gnu.org/viewcvs?rev=253067=gcc=rev Log: PR81996, __builtin_return_address(0) fails rs6000_return_addr assumes that the stack link is at frame+0, which is true for count>0. For count==0, rs6000_return_addr is called with frame==frame_pointer_rtx and the stack link is *not* at frame+0 if -fstack-protector-all or -fsanitize=address because rs6000.h sets FRAME_GROWS_DOWNWARD for those options. PR target/81996 * gcc/config/rs6000/rs6000.c (rs6000_return_addr): Use stack_pointer_rtx for count 0. Update comments. Break up large rtl expression. Modified: branches/gcc-7-branch/gcc/ChangeLog branches/gcc-7-branch/gcc/config/rs6000/rs6000.c
[Bug target/81996] powerpc __builtin_return_address(0) fails with -fPIC -fstack-protector-all or -fsanitize=address
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81996 --- Comment #7 from Alan Modra --- Author: amodra Date: Mon Sep 18 02:25:10 2017 New Revision: 252901 URL: https://gcc.gnu.org/viewcvs?rev=252901=gcc=rev Log: [RS6000] PR81996, __builtin_return_address(0) fails rs6000_return_addr assumes that the stack link is at frame+0, which is true for count>0. For count==0, rs6000_return_addr is called with frame==frame_pointer_rtx and the stack link is *not* at frame+0 if -fstack-protector-all or -fsanitize=address because rs6000.h sets FRAME_GROWS_DOWNWARD for those options. PR target/81996 * gcc/config/rs6000/rs6000.c (rs6000_return_addr): Use stack_pointer_rtx for count 0. Update comments. Break up large rtl expression. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.c
[Bug target/81295] bootstrap broken on powerpc-linux-gnu with --enable-default-pie
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81295 --- Comment #15 from Alan Modra --- Author: amodra Date: Tue Aug 29 08:27:02 2017 New Revision: 251405 URL: https://gcc.gnu.org/viewcvs?rev=251405=gcc=rev Log: [RS6000] linux startfile/endfile These need to match the gnu-user.h definitions to support --enable-default-pie. Otherwise we end up linking the wrong startup files when defaulting to PIE. PR target/81170 PR target/81295 * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to match gnu-user.h startfile. (ENDFILE_LINUX_SPEC): Similarly. Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/config/rs6000/sysv4.h
[Bug target/81170] powerpc*-linux --enable-default-pie chooses incorrect startup files
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81170 --- Comment #5 from Alan Modra --- Author: amodra Date: Tue Aug 29 08:27:02 2017 New Revision: 251405 URL: https://gcc.gnu.org/viewcvs?rev=251405=gcc=rev Log: [RS6000] linux startfile/endfile These need to match the gnu-user.h definitions to support --enable-default-pie. Otherwise we end up linking the wrong startup files when defaulting to PIE. PR target/81170 PR target/81295 * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to match gnu-user.h startfile. (ENDFILE_LINUX_SPEC): Similarly. Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/config/rs6000/sysv4.h
[Bug target/81170] powerpc*-linux --enable-default-pie chooses incorrect startup files
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81170 --- Comment #4 from Alan Modra --- Author: amodra Date: Tue Aug 29 08:25:17 2017 New Revision: 251404 URL: https://gcc.gnu.org/viewcvs?rev=251404=gcc=rev Log: PR driver/81523: Make -static override -pie -static and -pie together behave differently depending on whether GCC is configured with --enable-default-pie. On x86, "-static -pie" fails to create executable when --enable-default-pie isn't used, but creates a static executable when --enable-default-pie is used. This patch makes -static completely override -pie to create a static executable, regardless if --enable-default-pie is used to configure GCC. PR target/81170 PR target/81295 PR driver/81523 * gcc.c (NO_PIE_SPEC): Delete. (PIE_SPEC): Define as !no-pie/pie. Move static|shared|r exclusion.. (LINK_PIE_SPEC): ..to here. (LINK_COMMAND_SPEC): Support -no-pie. * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Correct chain of crtbegin*.o selection, update for PIE_SPEC changes and format. (GNU_USER_TARGET_ENDFILE_SPEC): Similarly. * config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Similarly. (ENDFILE_CRTEND_SPEC): Similarly. Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/config/gnu-user.h branches/gcc-6-branch/gcc/config/sol2.h branches/gcc-6-branch/gcc/gcc.c
[Bug target/81295] bootstrap broken on powerpc-linux-gnu with --enable-default-pie
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81295 --- Comment #14 from Alan Modra --- Author: amodra Date: Tue Aug 29 08:25:17 2017 New Revision: 251404 URL: https://gcc.gnu.org/viewcvs?rev=251404=gcc=rev Log: PR driver/81523: Make -static override -pie -static and -pie together behave differently depending on whether GCC is configured with --enable-default-pie. On x86, "-static -pie" fails to create executable when --enable-default-pie isn't used, but creates a static executable when --enable-default-pie is used. This patch makes -static completely override -pie to create a static executable, regardless if --enable-default-pie is used to configure GCC. PR target/81170 PR target/81295 PR driver/81523 * gcc.c (NO_PIE_SPEC): Delete. (PIE_SPEC): Define as !no-pie/pie. Move static|shared|r exclusion.. (LINK_PIE_SPEC): ..to here. (LINK_COMMAND_SPEC): Support -no-pie. * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Correct chain of crtbegin*.o selection, update for PIE_SPEC changes and format. (GNU_USER_TARGET_ENDFILE_SPEC): Similarly. * config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Similarly. (ENDFILE_CRTEND_SPEC): Similarly. Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/config/gnu-user.h branches/gcc-6-branch/gcc/config/sol2.h branches/gcc-6-branch/gcc/gcc.c
[Bug driver/81523] -static -pie behaves differently depending on if --enable-default-pie is used
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81523 --- Comment #6 from Alan Modra --- Author: amodra Date: Tue Aug 29 08:25:17 2017 New Revision: 251404 URL: https://gcc.gnu.org/viewcvs?rev=251404=gcc=rev Log: PR driver/81523: Make -static override -pie -static and -pie together behave differently depending on whether GCC is configured with --enable-default-pie. On x86, "-static -pie" fails to create executable when --enable-default-pie isn't used, but creates a static executable when --enable-default-pie is used. This patch makes -static completely override -pie to create a static executable, regardless if --enable-default-pie is used to configure GCC. PR target/81170 PR target/81295 PR driver/81523 * gcc.c (NO_PIE_SPEC): Delete. (PIE_SPEC): Define as !no-pie/pie. Move static|shared|r exclusion.. (LINK_PIE_SPEC): ..to here. (LINK_COMMAND_SPEC): Support -no-pie. * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Correct chain of crtbegin*.o selection, update for PIE_SPEC changes and format. (GNU_USER_TARGET_ENDFILE_SPEC): Similarly. * config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Similarly. (ENDFILE_CRTEND_SPEC): Similarly. Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/config/gnu-user.h branches/gcc-6-branch/gcc/config/sol2.h branches/gcc-6-branch/gcc/gcc.c
[Bug target/81170] powerpc*-linux --enable-default-pie chooses incorrect startup files
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81170 --- Comment #3 from Alan Modra --- Author: amodra Date: Tue Aug 29 08:23:44 2017 New Revision: 251403 URL: https://gcc.gnu.org/viewcvs?rev=251403=gcc=rev Log: [RS6000] linux startfile/endfile These need to match the gnu-user.h definitions to support --enable-default-pie. Otherwise we end up linking the wrong startup files when defaulting to PIE. PR target/81170 PR target/81295 * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to match gnu-user.h startfile. (ENDFILE_LINUX_SPEC): Similarly. Modified: branches/gcc-7-branch/gcc/ChangeLog branches/gcc-7-branch/gcc/config/rs6000/sysv4.h
[Bug target/81295] bootstrap broken on powerpc-linux-gnu with --enable-default-pie
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81295 --- Comment #13 from Alan Modra --- Author: amodra Date: Tue Aug 29 08:23:44 2017 New Revision: 251403 URL: https://gcc.gnu.org/viewcvs?rev=251403=gcc=rev Log: [RS6000] linux startfile/endfile These need to match the gnu-user.h definitions to support --enable-default-pie. Otherwise we end up linking the wrong startup files when defaulting to PIE. PR target/81170 PR target/81295 * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to match gnu-user.h startfile. (ENDFILE_LINUX_SPEC): Similarly. Modified: branches/gcc-7-branch/gcc/ChangeLog branches/gcc-7-branch/gcc/config/rs6000/sysv4.h
[Bug target/81170] powerpc*-linux --enable-default-pie chooses incorrect startup files
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81170 --- Comment #2 from Alan Modra --- Author: amodra Date: Tue Aug 29 08:22:44 2017 New Revision: 251402 URL: https://gcc.gnu.org/viewcvs?rev=251402=gcc=rev Log: PR driver/81523: Make -static override -pie -static and -pie together behave differently depending on whether GCC is configured with --enable-default-pie. On x86, "-static -pie" fails to create executable when --enable-default-pie isn't used, but creates a static executable when --enable-default-pie is used. This patch makes -static completely override -pie to create a static executable, regardless if --enable-default-pie is used to configure GCC. PR target/81170 PR target/81295 PR driver/81523 * gcc.c (NO_PIE_SPEC): Delete. (PIE_SPEC): Define as !no-pie/pie. Move static|shared|r exclusion.. (LINK_PIE_SPEC): ..to here. (LINK_COMMAND_SPEC): Support -no-pie. * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Correct chain of crtbegin*.o selection, update for PIE_SPEC changes and format. (GNU_USER_TARGET_ENDFILE_SPEC): Similarly. * config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Similarly. (ENDFILE_CRTEND_SPEC): Similarly. Modified: branches/gcc-7-branch/gcc/ChangeLog branches/gcc-7-branch/gcc/config/gnu-user.h branches/gcc-7-branch/gcc/config/sol2.h branches/gcc-7-branch/gcc/gcc.c
[Bug driver/81523] -static -pie behaves differently depending on if --enable-default-pie is used
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81523 --- Comment #5 from Alan Modra --- Author: amodra Date: Tue Aug 29 08:22:44 2017 New Revision: 251402 URL: https://gcc.gnu.org/viewcvs?rev=251402=gcc=rev Log: PR driver/81523: Make -static override -pie -static and -pie together behave differently depending on whether GCC is configured with --enable-default-pie. On x86, "-static -pie" fails to create executable when --enable-default-pie isn't used, but creates a static executable when --enable-default-pie is used. This patch makes -static completely override -pie to create a static executable, regardless if --enable-default-pie is used to configure GCC. PR target/81170 PR target/81295 PR driver/81523 * gcc.c (NO_PIE_SPEC): Delete. (PIE_SPEC): Define as !no-pie/pie. Move static|shared|r exclusion.. (LINK_PIE_SPEC): ..to here. (LINK_COMMAND_SPEC): Support -no-pie. * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Correct chain of crtbegin*.o selection, update for PIE_SPEC changes and format. (GNU_USER_TARGET_ENDFILE_SPEC): Similarly. * config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Similarly. (ENDFILE_CRTEND_SPEC): Similarly. Modified: branches/gcc-7-branch/gcc/ChangeLog branches/gcc-7-branch/gcc/config/gnu-user.h branches/gcc-7-branch/gcc/config/sol2.h branches/gcc-7-branch/gcc/gcc.c
[Bug target/81295] bootstrap broken on powerpc-linux-gnu with --enable-default-pie
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81295 --- Comment #12 from Alan Modra --- Author: amodra Date: Tue Aug 29 08:22:44 2017 New Revision: 251402 URL: https://gcc.gnu.org/viewcvs?rev=251402=gcc=rev Log: PR driver/81523: Make -static override -pie -static and -pie together behave differently depending on whether GCC is configured with --enable-default-pie. On x86, "-static -pie" fails to create executable when --enable-default-pie isn't used, but creates a static executable when --enable-default-pie is used. This patch makes -static completely override -pie to create a static executable, regardless if --enable-default-pie is used to configure GCC. PR target/81170 PR target/81295 PR driver/81523 * gcc.c (NO_PIE_SPEC): Delete. (PIE_SPEC): Define as !no-pie/pie. Move static|shared|r exclusion.. (LINK_PIE_SPEC): ..to here. (LINK_COMMAND_SPEC): Support -no-pie. * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Correct chain of crtbegin*.o selection, update for PIE_SPEC changes and format. (GNU_USER_TARGET_ENDFILE_SPEC): Similarly. * config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Similarly. (ENDFILE_CRTEND_SPEC): Similarly. Modified: branches/gcc-7-branch/gcc/ChangeLog branches/gcc-7-branch/gcc/config/gnu-user.h branches/gcc-7-branch/gcc/config/sol2.h branches/gcc-7-branch/gcc/gcc.c
[Bug rtl-optimization/81747] [8 Regression] ICE in operator[], at vec.h:749
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81747 --- Comment #8 from Alan Modra --- Author: amodra Date: Fri Aug 25 12:21:00 2017 New Revision: 251349 URL: https://gcc.gnu.org/viewcvs?rev=251349=gcc=rev Log: PR81747, ICE in operator[] PR rtl-optimization/81747 * cse.c (cse_extended_basic_block): Don't attempt to record equivalences for degenerate conditional branches that branch to their fall-through. Modified: trunk/gcc/ChangeLog trunk/gcc/cse.c
[Bug target/80938] [7/8 Regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2330
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80938 --- Comment #6 from Alan Modra --- Author: amodra Date: Thu Aug 17 02:03:03 2017 New Revision: 251140 URL: https://gcc.gnu.org/viewcvs?rev=251140=gcc=rev Log: [RS6000] PR 80938, Don't emit frame info for regs that don't need saving It is possible when using out-of-line register saves or store multiple to save some registers unnecessarily, for example one reg in the block saved might be unused. We don't need to emit frame info for those registers as that just bloats the info, and also can result in an ICE when shrink-wrap gives multiple paths through the function saving different sets of registers. Join points need to have identical frame register save state regardless of the path taken. This patch reverts the previous fix for PR80939 "Use SAVE_MULTIPLE only if we restore what it saves (PR80938)" and instead fixes the PR by correcting the frame info. The change to rs6000_savres_strategy is an optimization, but note that it hides the underlying problem in the PR testcase. PR target/80938 * config/rs6000/rs6000.c (rs6000_savres_strategy): Revert 2017-08-09. Don't use store multiple if only one reg needs saving. (interesting_frame_related_regno): New function. (rs6000_frame_related): Don't emit frame info for regs that don't need saving. (rs6000_emit_epilogue): Likewise. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.c
[Bug target/81295] bootstrap broken on powerpc-linux-gnu with --enable-default-pie
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81295 --- Comment #11 from Alan Modra --- Author: amodra Date: Sat Aug 12 00:28:04 2017 New Revision: 251065 URL: https://gcc.gnu.org/viewcvs?rev=251065=gcc=rev Log: [RS6000] linux startfile/endfile These need to match the gnu-user.h definitions to support --enable-default-pie. Otherwise we end up linking the wrong startup files when defaulting to PIE. PR target/81170 PR target/81295 * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to match gnu-user.h startfile. (ENDFILE_LINUX_SPEC): Similarly. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/sysv4.h
[Bug target/81170] powerpc*-linux --enable-default-pie chooses incorrect startup files
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81170 --- Comment #1 from Alan Modra --- Author: amodra Date: Sat Aug 12 00:28:04 2017 New Revision: 251065 URL: https://gcc.gnu.org/viewcvs?rev=251065=gcc=rev Log: [RS6000] linux startfile/endfile These need to match the gnu-user.h definitions to support --enable-default-pie. Otherwise we end up linking the wrong startup files when defaulting to PIE. PR target/81170 PR target/81295 * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to match gnu-user.h startfile. (ENDFILE_LINUX_SPEC): Similarly. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/sysv4.h
[Bug target/45053] libgcc_s link command misses crtsavgpr_s and crtresgpr_s for powerpc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45053 --- Comment #21 from Alan Modra --- Author: amodra Date: Fri Apr 7 02:19:19 2017 New Revision: 246751 URL: https://gcc.gnu.org/viewcvs?rev=246751=gcc=rev Log: [RS6000] Out-of-line register save functions can't be used from crtend.o PR target/45053 * config/rs6000/t-crtstuff (CRTSTUFF_T_CFLAGS): Add -O2. Modified: branches/gcc-5-branch/libgcc/ChangeLog branches/gcc-5-branch/libgcc/config/rs6000/t-crtstuff
[Bug target/45053] libgcc_s link command misses crtsavgpr_s and crtresgpr_s for powerpc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45053 --- Comment #20 from Alan Modra --- Author: amodra Date: Fri Apr 7 02:18:34 2017 New Revision: 246750 URL: https://gcc.gnu.org/viewcvs?rev=246750=gcc=rev Log: [RS6000] Out-of-line register save functions can't be used from crtend.o PR target/45053 * config/rs6000/t-crtstuff (CRTSTUFF_T_CFLAGS): Add -O2. Modified: branches/gcc-6-branch/libgcc/ChangeLog branches/gcc-6-branch/libgcc/config/rs6000/t-crtstuff
[Bug target/45053] libgcc_s link command misses crtsavgpr_s and crtresgpr_s for powerpc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45053 --- Comment #17 from Alan Modra --- Author: amodra Date: Fri Apr 7 01:30:43 2017 New Revision: 246749 URL: https://gcc.gnu.org/viewcvs?rev=246749=gcc=rev Log: [RS6000] Out-of-line register save functions can't be used from crtend.o PR target/45053 * config/rs6000/t-crtstuff (CRTSTUFF_T_CFLAGS): Add -O2. Modified: trunk/libgcc/ChangeLog trunk/libgcc/config/rs6000/t-crtstuff
[Bug rtl-optimization/79584] ICE in base_to_reg, at lra-constraints.c:2918
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79584 --- Comment #7 from Alan Modra --- Author: amodra Date: Sat Feb 25 22:44:41 2017 New Revision: 245741 URL: https://gcc.gnu.org/viewcvs?rev=245741=gcc=rev Log: PR79584, ICE in base_to_reg PR rtl-optimization/79584 * lra-constraints.c (base_to_reg): Reload ad->base, the entire base, not ad->base_term, the reg within base. Remove assertion that ad->base == ad->base_term. Replace gen_int_mode using bogus mode with const0_rtx. Modified: trunk/gcc/ChangeLog trunk/gcc/lra-constraints.c
[Bug target/79144] cmpstrnsi optimization breaks glibc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79144 --- Comment #3 from Alan Modra --- Author: amodra Date: Thu Jan 19 23:19:19 2017 New Revision: 244659 URL: https://gcc.gnu.org/viewcvs?rev=244659=gcc=rev Log: [RS6000] PR79144, cmpstrnsi optimization breaks glibc glibc compiled with current gcc-7 fails one test due to strcmp and strncmp appearing in the PLT. This is because the inline expansion of those functions falls back to a function call, but doesn't use the asm name for the call. PR target/79144 * config/rs6000/rs6000.c (expand_strn_compare): Get the asm name for strcmp and strncmp from corresponding builtin decl. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.c
[Bug target/79066] [7 Regression] non-PIC code generated for powerpc glibc with -fpic
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79066 --- Comment #7 from Alan Modra --- Author: amodra Date: Tue Jan 17 02:54:11 2017 New Revision: 244515 URL: https://gcc.gnu.org/viewcvs?rev=244515=gcc=rev Log: PR79066, non-PIC code generated for powerpc glibc with -fpic PR target/79066 * config/rs6000/rs6000.md (elf_high, elf_low): Disable when pic. * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Don't allow symbolic stack limit when pic. testsuite/ * gcc.target/powerpc/pr79066.c: New. Added: trunk/gcc/testsuite/gcc.target/powerpc/pr79066.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.c trunk/gcc/config/rs6000/rs6000.md trunk/gcc/testsuite/ChangeLog
[Bug bootstrap/79098] [7 Regression] Failure to bootstrap gcc for powerpc-e500v2-linux-gnuspe target
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79098 --- Comment #2 from Alan Modra --- Author: amodra Date: Mon Jan 16 11:12:57 2017 New Revision: 244489 URL: https://gcc.gnu.org/viewcvs?rev=244489=gcc=rev Log: Powerpc bootstrap failure due to duplicate case value PR target/79098 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Don't use a switch. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.c
[Bug target/72749] [7 Regression] ICE: verify_flow_info failed (error: wrong amount of branch edges after conditional jump in bb 5) w/ -O2 -fsched2-use-superblocks
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72749 --- Comment #11 from Alan Modra --- Author: amodra Date: Sat Jan 14 13:29:29 2017 New Revision: 244466 URL: https://gcc.gnu.org/viewcvs?rev=244466=gcc=rev Log: Testcase from pr72749 PR target/72749 * gcc.c-torture/compile/pr72749.c: New test. Added: trunk/gcc/testsuite/gcc.c-torture/compile/pr72749.c Modified: trunk/gcc/testsuite/ChangeLog
[Bug target/72749] [7 Regression] ICE: verify_flow_info failed (error: wrong amount of branch edges after conditional jump in bb 5) w/ -O2 -fsched2-use-superblocks
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72749 --- Comment #10 from Alan Modra --- Author: amodra Date: Sat Jan 14 13:24:46 2017 New Revision: 244465 URL: https://gcc.gnu.org/viewcvs?rev=244465=gcc=rev Log: Avoid PR72749 by not using unspecs Rather than using unspecs in doloop insns to stop combine creating these insns, use legitimate_combined_insn. PR target/72749 * combine.c (recog_for_combine_1): Set INSN_CODE before calling target legitimate_combined_insn. * config/rs6000/rs6000.c (TARGET_LEGITIMATE_COMBINED_INSN): Define. (rs6000_legitimate_combined_insn): New function. * config/rs6000/rs6000.md (UNSPEC_DOLOOP): Delete, and remove all uses. (ctr_internal3): Rename from *ctr_internal5. (ctr_internal4): Rename from *ctr_internal6. (ctr_internal1, ctr_internal2): Remove '*' from name. Modified: trunk/gcc/ChangeLog trunk/gcc/combine.c trunk/gcc/config/rs6000/rs6000.c trunk/gcc/config/rs6000/rs6000.md
[Bug libfortran/19481] libgfortran doesn't build -- configure doesn't handle cabs() well
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19481 --- Comment #7 from Alan Modra --- Author: amodra Date: Wed Dec 7 23:16:03 2016 New Revision: 243417 URL: https://gcc.gnu.org/viewcvs?rev=243417=gcc=rev Log: sync config/* from binutils * elf.m4: Revert 2016-06-21 change. * picflag.m4: Likewise. Revert 2016-04-30 change too. * override.m4 (AC_PROG_LEX): Import 2016-01-18 binutils fix for PR binutils/19481. Modified: trunk/config/ChangeLog trunk/config/elf.m4 trunk/config/override.m4 trunk/config/picflag.m4
[Bug rtl-optimization/70890] [7 regression] r235660 miscompiles stage2 compiler on ia64
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70890 --- Comment #10 from Alan Modra --- Author: amodra Date: Wed Nov 16 23:10:55 2016 New Revision: 242525 URL: https://gcc.gnu.org/viewcvs?rev=242525=gcc=rev Log: R_MIPS_JALR failures This is a fix for my PR70890 patch, which incorrectly removed all REG_EQUIV notes rather than just one regarding a reg that dies. PR rtl-optimization/78325 PR rtl-optimization/70890 * ira.c (combine_and_move_insns): Only remove REG_EQUIV notes for dead regno. Modified: trunk/gcc/ChangeLog trunk/gcc/ira.c
[Bug rtl-optimization/78325] [7 regression] r235825 causes gcc.target/mips/call-5.c, gcc.target/mips/call-6.c R_MIPS_JALR failures
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78325 --- Comment #4 from Alan Modra --- Author: amodra Date: Wed Nov 16 23:10:55 2016 New Revision: 242525 URL: https://gcc.gnu.org/viewcvs?rev=242525=gcc=rev Log: R_MIPS_JALR failures This is a fix for my PR70890 patch, which incorrectly removed all REG_EQUIV notes rather than just one regarding a reg that dies. PR rtl-optimization/78325 PR rtl-optimization/70890 * ira.c (combine_and_move_insns): Only remove REG_EQUIV notes for dead regno. Modified: trunk/gcc/ChangeLog trunk/gcc/ira.c
[Bug rtl-optimization/72771] [6/7 Regression] powerpc64le ICE with -mcpu=power9
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72771 --- Comment #8 from Alan Modra --- Author: amodra Date: Wed Aug 17 22:41:22 2016 New Revision: 239549 URL: https://gcc.gnu.org/viewcvs?rev=239549=gcc=rev Log: [RELOAD] Don't assume subreg mem address is ok This patch fixes a case where reload blindly assumes a subreg mem is OK if its address has been partially reloaded by legitimize_reload_address. PR rtl-optimization/72771 * reload.c (find_reloads): Don't assume that a subreg mem is OK when find_reloads_toplev returns address_reloaded==-1. (alternative_allows_const_pool_ref): Update comment. testsuite/ * gcc.c-torture/compile/pr72771.c: New. Added: trunk/gcc/testsuite/gcc.c-torture/compile/pr72771.c Modified: trunk/gcc/ChangeLog trunk/gcc/reload.c trunk/gcc/testsuite/ChangeLog
[Bug target/71680] [7 Regression] ICE: Max. number of generated reload insns per insn is achieved (90) w/ -Os -mlra
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71680 --- Comment #17 from Alan Modra --- Author: amodra Date: Wed Aug 10 23:12:11 2016 New Revision: 239342 URL: https://gcc.gnu.org/viewcvs?rev=239342=gcc=rev Log: [LRA] Reload of slow mems pr71680.c -m64 -O1 -mlra, ira output showing two problem insns. (insn 7 5 26 3 (set (reg:SI 159 [ a ]) (mem/c:SI (reg/f:DI 158) [1 a+0 S4 A8])) pr71680.c:13 464 {*movsi_internal1} (expr_list:REG_EQUIV (mem/c:SI (reg/f:DI 158) [1 a+0 S4 A8]) (nil))) (insn 26 7 27 3 (set (reg:DI 162) (unspec:DI [ (fix:SI (subreg:SF (reg:SI 159 [ a ]) 0)) ] UNSPEC_FCTIWZ)) pr71680.c:13 372 {fctiwz_sf} (expr_list:REG_DEAD (reg:SI 159 [ a ]) (nil))) Insn 26 requires that reg 159 be of class FLOAT_REGS. first lra action: deleting insn with uid = 7. Changing pseudo 159 in operand 1 of insn 26 on equiv [r158:DI] Creating newreg=164, assigning class ALL_REGS to subreg reg r164 26: r162:DI=unspec[fix(r164:SI#0)] 7 REG_DEAD r159:SI Inserting subreg reload before: 30: r164:SI=[r158:DI] [snip] Change to class FLOAT_REGS for r164 Well, that didn't do much. lra tried the equiv mem, found that didn't work, and had to reload. Effectively getting back to the two original insns but r159 replaced with r164. simplify_operand_subreg did not do anything in this case because SLOW_UNALIGNED_ACCESS was true (wrongly for power8, but that's beside the point). So now we have, using abbreviated rtl notation: r164:SI=[r158:DI] r162:DI=unspec[fix(r164:SI)] The problem here is that the first insn isn't valid, due to the rs6000 backend not supporting SImode in fprs, and r164 must be an fpr to make the second insn valid. next lra action: Creating newreg=165 from oldreg=164, assigning class GENERAL_REGS to r165 30: r165:SI=[r158:DI] Inserting insn reload after: 31: r164:SI=r165:SI so now we have r165:SI=[r158:DI] r164:SI=r165:SI r162:DI=unspec[fix(r164:SI)] This ought to be good on power8, except for one little thing. r165 is GENERAL_REGS so the first insn is good, a gpr load from mem. r164 is FLOAT_REGS, making the last insn good, a fctiwz. The second insn ought to be a sldi, mtvsrd, xscvspdpn combination, but that is only supported for SFmode. So lra continue on reloading the second insn, but in vain because it never tries anything other than SImode and as noted above, SImode is not valid in fprs. What this patch does is arrange to emit the two reloads needed for the SLOW_UNALIGNED_ACCESS case at once, moving the subreg to the second insn in order to switch modes, producing: r164:SI=[r158:DI] r165:SF=r164:SI#0 r162:DI=unspec[fix(r165:SF)] I've also tidied a couple of other things: 1) "old" is unnecessary as it duplicated "operand". 2) Rejecting mem subregs due to SLOW_UNALIGNED_ACCESS only makes sense if the original mode was not slow. PR target/71680 * lra-constraints.c (simplify_operand_subreg): Allow subreg mode for mem when SLOW_UNALIGNED_ACCESS if inner mode is also slow. Emit two reloads for slow mem case, first loading in fast innermode, then converting to required mode. testsuite/ * gcc.target/powerpc/pr71680.c: New. Modified: trunk/gcc/ChangeLog trunk/gcc/lra-constraints.c trunk/gcc/testsuite/ChangeLog
[Bug target/71680] [7 Regression] ICE: Max. number of generated reload insns per insn is achieved (90) w/ -Os -mlra
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71680 --- Comment #16 from Alan Modra --- Author: amodra Date: Wed Aug 10 05:43:36 2016 New Revision: 239317 URL: https://gcc.gnu.org/viewcvs?rev=239317=gcc=rev Log: [RS6000] e500 part of pr71680 The fallback part of HARD_REGNO_CALLER_SAVE_MODE, choose_hard_reg_mode, returns DFmode for SImode when TARGET_E500_DOUBLE. This confuses lra when attempting to save ctr around a call. PR target/71680 * config/rs6000/rs6000.h (HARD_REGNO_CALLER_SAVE_MODE): Return SImode for TARGET_E500_DOUBLE when given SImode. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.h
[Bug target/72802] powerpc64le: -mcpu=power9 emits lxssp instruction with offset that isn't a multiple of 4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72802 --- Comment #9 from Alan Modra --- Author: amodra Date: Tue Aug 9 05:44:39 2016 New Revision: 239270 URL: https://gcc.gnu.org/viewcvs?rev=239270=gcc=rev Log: [RS6000] PR72802 part 2, reload ICE PR target/72802 * config/rs6000/rs6000.md (mov_hardfloat): Sort alternatives. Put loads first, then stores, and reg/reg moves within same class later. Delete attr length. testsuite/ * gcc.c-torture/compile/pr72802.c: New. Added: branches/gcc-6-branch/gcc/testsuite/gcc.c-torture/compile/pr72802.c Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/config/rs6000/rs6000.md branches/gcc-6-branch/gcc/testsuite/ChangeLog
[Bug target/72802] powerpc64le: -mcpu=power9 emits lxssp instruction with offset that isn't a multiple of 4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72802 --- Comment #8 from Alan Modra --- Author: amodra Date: Tue Aug 9 05:43:29 2016 New Revision: 239269 URL: https://gcc.gnu.org/viewcvs?rev=239269=gcc=rev Log: [RS6000] PR72802 part 1, fix constraints for lxssp/stxssp PR target/72802 * config/rs6000/rs6000.c (mem_operand_gpr): Remove vsx dform test. (mem_operand_ds_form): New predicate. * config/rs6000/rs6000-protos.h (mem_operand_ds_form): Declare. * config/rs6000/constraints.md (wY): New constraint. * config/rs6000/rs6000.md (f32_lm2, f32_sm2): Use wY for SF. (extendsfdf2_fpr): Replace o constraint with wY. Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/config/rs6000/constraints.md branches/gcc-6-branch/gcc/config/rs6000/rs6000-protos.h branches/gcc-6-branch/gcc/config/rs6000/rs6000.c branches/gcc-6-branch/gcc/config/rs6000/rs6000.md
[Bug rtl-optimization/72771] [6/7 Regression] powerpc64le ICE with -mcpu=power9
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72771 --- Comment #7 from Alan Modra --- Author: amodra Date: Mon Aug 8 12:05:11 2016 New Revision: 239240 URL: https://gcc.gnu.org/viewcvs?rev=239240=gcc=rev Log: [RS6000] TOC refs generated during reload The generic reload fix for pr72771 exposed a problem with recognizing -mcmodel=medium/large TOC references generated during reload. PR target/72771 * config/rs6000/rs6000.c (toc_relative_expr_p): Allow (lo_sum (high)) toc refs created during reload. Update function comment. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.c
[Bug target/72802] powerpc64le: -mcpu=power9 emits lxssp instruction with offset that isn't a multiple of 4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72802 --- Comment #6 from Alan Modra --- Author: amodra Date: Mon Aug 8 09:06:49 2016 New Revision: 239234 URL: https://gcc.gnu.org/viewcvs?rev=239234=gcc=rev Log: [RS6000] PR72802 part 2, reload ICE After fixing the constraint problem, we hit an "insn does not satisfy its constraints" with -mno-lra on the following insn, a vector load from mem which has an invalid offset: (insn 631 630 1122 12 (set (reg:SF 108 31 [orig:260 pretmp_44 ] [260]) (mem:SF (plus:DI (reg:DI 30 30 [orig:338 ivtmp.141 ] [338]) (const_int 2 [0x2])) [5 MEM[base: _1, offset: 2B]+0 S4 A32])) 470 {movsf_hardfloat} (nil)) Here are the reload costs for the various alternatives of movsf_hardfloat: "=!r, !r, m, f, ww, ww, !r, f, wb, m, wY, wu, Z,?wn, ?r,*c*l, !r, *h" "r, m, r, f, ww, j, j, m, wY, f, wb, Z, wu, r, wn, r, *h, 0" 617 609 17 17 8 8 617 9 8 17 17 8 17 23 23 17 617 17 Notice that the cost for a vector<-vector move (ww,ww) is the same as the cost for a vector<-mem move (wb,wY or wu,Z). Since the vector<-vector move comes first, it is chosen and the mem part of the insn reloaded. That just gives another copy of insn 631. PR target/72802 * config/rs6000/rs6000.md (mov_hardfloat): Sort alternatives. Put loads first, then stores, and reg/reg moves within same class later. Delete attr length. testsuite/ * gcc.c-torture/compile/pr72802.c: New. Added: trunk/gcc/testsuite/gcc.c-torture/compile/pr72802.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.md trunk/gcc/testsuite/ChangeLog
[Bug target/72802] powerpc64le: -mcpu=power9 emits lxssp instruction with offset that isn't a multiple of 4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72802 --- Comment #5 from Alan Modra --- Author: amodra Date: Mon Aug 8 09:05:16 2016 New Revision: 239233 URL: https://gcc.gnu.org/viewcvs?rev=239233=gcc=rev Log: [RS6000] PR72802 part 1, fix constraints for lxssp/stxssp We can't use "o" constraint for lsxxp/stxssp since those insns have a DS-form offset field, ie. the bottom two bits of the offset must be 0. So use "wY" instead, but that leads to finding another problem. mem_operand_gpr is only suitable for gpr loads/stores since it does not enforce multiple-of-4 offsets when -m32. So "wY" can't use mem_operand_gpr, and the vsx tests in mem_operand_gpr are bogus. I've deleted offsettable_mem_14bit_operand because it wasn't used anywhere but in the wY constraint. Note also that the new wY constraint doesn't use memory_operand because that is redundant in a constraint, having already been tested in the predicate. PR target/72802 * config/rs6000/rs6000.c (mem_operand_gpr): Remove vsx dform test. (mem_operand_ds_form): New predicate. * config/rs6000/rs6000-protos.h (mem_operand_ds_form): Declare. * config/rs6000/constraints.md (wY): Use mem_operand_df_form. * config/rs6000/predicates.md (offsettable_mem_14bit_operand): Delete. * config/rs6000/rs6000.md (f32_lm2, f32_sm2): Use wY for SF. (extendsfdf2_fpr): Replace o constraint with wY. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/constraints.md trunk/gcc/config/rs6000/predicates.md trunk/gcc/config/rs6000/rs6000-protos.h trunk/gcc/config/rs6000/rs6000.c trunk/gcc/config/rs6000/rs6000.md
[Bug target/72103] ICE with gcc 7 for povray benchmark
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72103 --- Comment #6 from Alan Modra --- Author: amodra Date: Tue Jul 26 10:29:32 2016 New Revision: 238746 URL: https://gcc.gnu.org/viewcvs?rev=238746=gcc=rev Log: [RS6000] push_secondary_reload ICE PR target/72103 * config/rs6000/rs6000.c (rs6000_secondary_reload): Initialize sri->t_icode. Modified: branches/gcc-5-branch/gcc/ChangeLog branches/gcc-5-branch/gcc/config/rs6000/rs6000.c
[Bug target/72103] ICE with gcc 7 for povray benchmark
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72103 --- Comment #5 from Alan Modra --- Author: amodra Date: Tue Jul 26 10:28:59 2016 New Revision: 238745 URL: https://gcc.gnu.org/viewcvs?rev=238745=gcc=rev Log: [RS6000] push_secondary_reload ICE PR target/72103 * config/rs6000/rs6000.c (rs6000_secondary_reload): Initialize sri->t_icode. Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/config/rs6000/rs6000.c
[Bug target/72103] ICE with gcc 7 for povray benchmark
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72103 --- Comment #4 from Alan Modra --- Author: amodra Date: Tue Jul 26 10:27:34 2016 New Revision: 238744 URL: https://gcc.gnu.org/viewcvs?rev=238744=gcc=rev Log: [RS6000] push_secondary_reload ICE PR target/72103 * config/rs6000/rs6000.c (rs6000_secondary_reload): Initialize sri->t_icode. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.c
[Bug target/71733] ICE in vmx test cases with -mcpu=power9
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71733 --- Comment #7 from Alan Modra --- Author: amodra Date: Thu Jul 14 04:28:25 2016 New Revision: 238327 URL: https://gcc.gnu.org/viewcvs?rev=238327=gcc=rev Log: [RS6000] -mno-vsx should force -mno-power9-dform PR target/71733 gcc/ * config/rs6000/rs6000.c (rs6000_option_override_internal): Deal with p9_vector override before power9-dform override. gcc/testsuite/ * gcc.target/powerpc/p9-novsx.c: New. Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/config/rs6000/rs6000.c branches/gcc-6-branch/gcc/testsuite/ChangeLog
[Bug target/71733] ICE in vmx test cases with -mcpu=power9
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71733 --- Comment #6 from Alan Modra --- Author: amodra Date: Thu Jul 14 04:26:36 2016 New Revision: 238326 URL: https://gcc.gnu.org/viewcvs?rev=238326=gcc=rev Log: [RS6000] -mno-vsx should force -mno-power9-dform PR target/71733 gcc/ * config/rs6000/rs6000.c (rs6000_option_override_internal): Deal with p9_vector override before power9-dform override. gcc/testsuite/ * gcc.target/powerpc/p9-novsx.c: New. Added: trunk/gcc/testsuite/gcc.target/powerpc/p9-novsx.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.c trunk/gcc/testsuite/ChangeLog
[Bug rtl-optimization/71709] powerpc64le: argument to strcpy() optimised out
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71709 --- Comment #8 from Alan Modra --- Author: amodra Date: Fri Jul 1 11:15:17 2016 New Revision: 237909 URL: https://gcc.gnu.org/viewcvs?rev=237909=gcc=rev Log: strcpy arg optimised out For functions that return an argument unchanged, like strcat, find_call_crossed_cheap_reg attempts to find an assignment between a pseudo reg and the arg reg before the call, so that uses of the pseudo after the call can instead use the return value. The exit condition on the loop looking at previous insns was wrong. Uses of the arg reg don't matter. What matters is the insn setting the arg reg as any assignment involving the arg reg prior to that insn is likely a completely unrelated use of the hard reg. PR rtl-optimization/71709 * ira-lives.c (find_call_crossed_cheap_reg): Exit loop on arg reg being set, not referenced. Modified: trunk/gcc/ChangeLog trunk/gcc/ira-lives.c
[Bug rtl-optimization/71275] [7 regression] Performance drop after r235660 on x86-64 in 32-bit mode.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71275 --- Comment #6 from Alan Modra --- Author: amodra Date: Sat May 28 00:22:56 2016 New Revision: 236843 URL: https://gcc.gnu.org/viewcvs?rev=236843=gcc=rev Log: ira.c bb_loop_depth again Follow the same practice as other places in ira.c, where free_dominance_info is called along with loop_optimizer_finalize. Not doing so causes an ICE on gcc-5-branch, so avoid that possibility on trunk. PR rtl-optimization/71275 * ira.c (ira): Free dominance info. Modified: trunk/gcc/ChangeLog trunk/gcc/ira.c
[Bug rtl-optimization/71275] [7 regression] Performance drop after r235660 on x86-64 in 32-bit mode.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71275 --- Comment #4 from Alan Modra --- Author: amodra Date: Thu May 26 17:38:36 2016 New Revision: 236789 URL: https://gcc.gnu.org/viewcvs?rev=236789=gcc=rev Log: ira.c bb_loop_depth PR rtl-optimization/71275 * ira.c (ira): Call loop_optimizer_init to set up bb_loop_depth for update_equiv_regs and combine_and_move_insns. Modified: trunk/gcc/ChangeLog trunk/gcc/ira.c
[Bug target/70947] regrename Go breakage on powerpc64
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70947 --- Comment #2 from Alan Modra --- Author: amodra Date: Mon May 16 04:51:21 2016 New Revision: 236264 URL: https://gcc.gnu.org/viewcvs?rev=236264=gcc=rev Log: [RS6000] Stop regrename twiddling with split-stack prologue PR target/70947 * config/rs6000/rs6000.c (rs6000_expand_split_stack_prologue): Stop regrename modifying insns saving lr before __morestack call. * config/rs6000/rs6000.md (split_stack_return): Similarly for insns restoring lr after __morestack call. Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/config/rs6000/rs6000.c branches/gcc-6-branch/gcc/config/rs6000/rs6000.md
[Bug target/70947] regrename Go breakage on powerpc64
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70947 --- Comment #1 from Alan Modra --- Author: amodra Date: Mon May 9 23:12:20 2016 New Revision: 236052 URL: https://gcc.gnu.org/viewcvs?rev=236052=gcc=rev Log: [RS6000] Stop regrename twiddling with split-stack prologue PR target/70947 * config/rs6000/rs6000.c (rs6000_expand_split_stack_prologue): Stop regrename modifying insns saving lr before __morestack call. * config/rs6000/rs6000.md (split_stack_return): Similarly for insns restoring lr after __morestack call. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.c trunk/gcc/config/rs6000/rs6000.md
[Bug testsuite/70826] [7 regression] many test cases fail starting with r235442
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70826 --- Comment #10 from Alan Modra --- Author: amodra Date: Mon May 9 12:35:25 2016 New Revision: 236033 URL: https://gcc.gnu.org/viewcvs?rev=236033=gcc=rev Log: [RS6000] Fragile testcase breaks with -frename-registers PR testsuite/70826 * gcc.target/powerpc/savres.c: Compile with -fno-rename-registers. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.target/powerpc/savres.c
[Bug target/68662] [6 regression] FAIL: gcc.dg/lto/20090210 c_lto_20090210_0.o-c_lto_20090210_1.o link, -O2 -flto -flto-partition=none -fuse-linker-plugin -fno-fat-lto-objects
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68662 --- Comment #15 from Alan Modra --- Author: amodra Date: Thu May 5 00:07:27 2016 New Revision: 235914 URL: https://gcc.gnu.org/viewcvs?rev=235914=gcc=rev Log: [RS6000] TARGET_RELOCATABLE For ABI_V4, -mrelocatable and -fPIC both generate position independent code, with some extra "fixup" output for -mrelocatable. The similarity of these two options has led to the situation where the sysv4.h SUBTARGET_OVERRIDE_OPTIONS sets flag_pic on seeing -mrelocatable, and sets TARGET_RELOCATABLE on seeing -fPIC. That prevents LTO from properly optimizing position dependent executables, because the mutual dependence of the flags and the fact that LTO streaming records the state of rs6000_isa_flags, result in flag_pic being set when it shouldn't be. So, don't set TARGET_RELOCATABLE when -fPIC. Places that currently test TARGET_RELOCATABLE can instead test TARGET_RELOCATABLE || (DEFAULT_ABI == ABI_V4 && flag_pic > 1) or since TARGET_RELOCATABLE can only be enabled when ABI_V4, DEFAULT_ABI == ABI_V4 && (TARGET_RELOCATABLE || flag_pic > 1). Also, since flag_pic is set by -mrelocatable, a number of places that currently test TARGET_RELOCATABLE can be simplified. I also made -mrelocatable set TARGET_NO_FP_IN_TOC, allowing TARGET_RELOCATABLE to be removed from ASM_OUTPUT_SPECIAL_POOL_ENTRY_P. Reducing occurrences of TARGET_RELOCATABLE is a good thing. PR target/68662 * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Don't set OPTION_MASK_RELOCATABLE when flag_pic == 2. Set TARGET_NO_FP_IN_TOC for -mrelocatable. (MINIMAL_TOC_SECTION_ASM_OP): Remove redundant TARGET_RELOCATABLE test. (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise. (ASM_PREFERRED_EH_DATA_FORMAT): Likewise. * config/rs6000/linux64.h (MINIMAL_TOC_SECTION_ASM_OP): Likewise. (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise. (ASM_PREFERRED_EH_DATA_FORMAT): Likewise. * config/rs6000/freebsd64.h (MINIMAL_TOC_SECTION_ASM_OP): Likewise. (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise. (ASM_PREFERRED_EH_DATA_FORMAT): Likewise. * config/rs6000/predicates.md (easy_fp_constant): Likewise. * config/rs6000/rs6000.c (rs6000_elf_output_toc_section_asm_op): Likewise. (rs6000_assemble_integer): Update TARGET_RELOCATABLE test. (rs6000_stack_info): Likewise. (rs6000_elf_asm_out_constructor): Likewise. (rs6000_elf_asm_out_destructor): Likewise. (rs6000_elf_declare_function_name): Likewise. * config/rs6000/rs6000.md (load_toc_aix_di): Likewise. * config/rs6000/rs6000.h (MASK_RELOCATABLE, MASK_MINIMAL_TOC): Don't define. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/freebsd64.h trunk/gcc/config/rs6000/linux64.h trunk/gcc/config/rs6000/predicates.md trunk/gcc/config/rs6000/rs6000.c trunk/gcc/config/rs6000/rs6000.h trunk/gcc/config/rs6000/rs6000.md trunk/gcc/config/rs6000/sysv4.h
[Bug target/70866] powerpc64le -ffixed-cr2 -ffixed-cr3 -ffixed-cr4 ICE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70866 --- Comment #1 from Alan Modra --- Author: amodra Date: Tue May 3 23:51:34 2016 New Revision: 235851 URL: https://gcc.gnu.org/viewcvs?rev=235851=gcc=rev Log: [RS6000] powerpc64le -ffixed-cr2 -ffixed-cr3 -ffixed-cr4 ICE gcc/ PR target/70866 * config/rs6000/rs6000.c (rs6000_stack_info): Don't set cr_save_p when cr2,3,4 are all fixed regs. gcc/testsuite/ * gcc.target/powerpc/pr70866.c: New. Added: trunk/gcc/testsuite/gcc.target/powerpc/pr70866.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.c trunk/gcc/testsuite/ChangeLog
[Bug rtl-optimization/70890] [7 regression] r235660 miscompiles stage2 compiler on ia64
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70890 --- Comment #7 from Alan Modra --- Author: amodra Date: Tue May 3 14:43:35 2016 New Revision: 235825 URL: https://gcc.gnu.org/viewcvs?rev=235825=gcc=rev Log: PR70890, stage2 miscompilation PR rtl-optimization/70890 * ira.c (combine_and_move_insns): When moving def_insn, remove equivs on use_insn. Modified: trunk/gcc/ChangeLog trunk/gcc/ira.c
[Bug target/69645] powerpc -ffixed- ignored when saving and restoring regs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69645 --- Comment #2 from Alan Modra --- Author: amodra Date: Sat Apr 30 00:34:16 2016 New Revision: 235670 URL: https://gcc.gnu.org/viewcvs?rev=235670=gcc=rev Log: [RS6000] PR69645, -ffixed-reg ignored Treat -ffixed-reg as we do for global asm regs. PR target/69645 * config/rs6000/rs6000.c (fixed_reg_p): New function. (fixed_regs_p): Rename from global_regs_p. Call fixed_reg_p. Update all uses. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.c
[Bug target/70107] ICE: in emit_move_insn, at expr.c:3546 with -mcpu=power8
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70107 --- Comment #8 from Alan Modra --- Author: amodra Date: Tue Apr 12 22:59:05 2016 New Revision: 234925 URL: https://gcc.gnu.org/viewcvs?rev=234925=gcc=rev Log: Fix target/70107, another case of PR c++/70096 gcc/cp/ PR target/70107 PR c++/70096 * pt.c (tsubst_decl): Clear the DECL_MODE of the new decl. gcc/testsuite/ * g++.dg/template/ptrmem30.C (read): Rename to data_read. (Holder::foo): Reflect this. PR c++/70096 * g++.dg/template/ptrmem30.C: New test. Added: branches/gcc-4_9-branch/gcc/testsuite/g++.dg/template/ptrmem30.C Modified: branches/gcc-4_9-branch/gcc/cp/ChangeLog branches/gcc-4_9-branch/gcc/cp/pt.c branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
[Bug c++/70096] [6 Regression] [Invalid codegen] Read of uninitialized value in ref-qualified pointer to member function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70096 --- Comment #9 from Alan Modra --- Author: amodra Date: Tue Apr 12 22:59:05 2016 New Revision: 234925 URL: https://gcc.gnu.org/viewcvs?rev=234925=gcc=rev Log: Fix target/70107, another case of PR c++/70096 gcc/cp/ PR target/70107 PR c++/70096 * pt.c (tsubst_decl): Clear the DECL_MODE of the new decl. gcc/testsuite/ * g++.dg/template/ptrmem30.C (read): Rename to data_read. (Holder::foo): Reflect this. PR c++/70096 * g++.dg/template/ptrmem30.C: New test. Added: branches/gcc-4_9-branch/gcc/testsuite/g++.dg/template/ptrmem30.C Modified: branches/gcc-4_9-branch/gcc/cp/ChangeLog branches/gcc-4_9-branch/gcc/cp/pt.c branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
[Bug target/70107] ICE: in emit_move_insn, at expr.c:3546 with -mcpu=power8
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70107 --- Comment #7 from Alan Modra --- Author: amodra Date: Tue Apr 12 22:58:36 2016 New Revision: 234924 URL: https://gcc.gnu.org/viewcvs?rev=234924=gcc=rev Log: Fix target/70107, another case of PR c++/70096 gcc/cp/ PR target/70107 PR c++/70096 * pt.c (tsubst_decl): Clear the DECL_MODE of the new decl. gcc/testsuite/ * g++.dg/template/ptrmem30.C (read): Rename to data_read. (Holder::foo): Reflect this. PR c++/70096 * g++.dg/template/ptrmem30.C: New test. Added: branches/gcc-5-branch/gcc/testsuite/g++.dg/template/ptrmem30.C Modified: branches/gcc-5-branch/gcc/cp/ChangeLog branches/gcc-5-branch/gcc/cp/pt.c branches/gcc-5-branch/gcc/testsuite/ChangeLog
[Bug c++/70096] [6 Regression] [Invalid codegen] Read of uninitialized value in ref-qualified pointer to member function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70096 --- Comment #8 from Alan Modra --- Author: amodra Date: Tue Apr 12 22:58:36 2016 New Revision: 234924 URL: https://gcc.gnu.org/viewcvs?rev=234924=gcc=rev Log: Fix target/70107, another case of PR c++/70096 gcc/cp/ PR target/70107 PR c++/70096 * pt.c (tsubst_decl): Clear the DECL_MODE of the new decl. gcc/testsuite/ * g++.dg/template/ptrmem30.C (read): Rename to data_read. (Holder::foo): Reflect this. PR c++/70096 * g++.dg/template/ptrmem30.C: New test. Added: branches/gcc-5-branch/gcc/testsuite/g++.dg/template/ptrmem30.C Modified: branches/gcc-5-branch/gcc/cp/ChangeLog branches/gcc-5-branch/gcc/cp/pt.c branches/gcc-5-branch/gcc/testsuite/ChangeLog
[Bug target/70117] ppc long double isinf() is wrong?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70117 --- Comment #19 from Alan Modra --- Author: amodra Date: Mon Apr 11 13:47:40 2016 New Revision: 234881 URL: https://gcc.gnu.org/viewcvs?rev=234881=gcc=rev Log: PR70117, ppc long double isinf gcc/ PR target/70117 * builtins.c (fold_builtin_classify): For IBM extended precision, look at just the high-order double to test for NaN. (fold_builtin_interclass_mathfn): Similarly for Inf. For isnormal test just the high double for Inf but both doubles for subnormal limit. gcc/testsuite/ * gcc.target/powerpc/pr70117.c: New. Added: branches/gcc-4_9-branch/gcc/testsuite/gcc.target/powerpc/pr70117.c Modified: branches/gcc-4_9-branch/gcc/ChangeLog branches/gcc-4_9-branch/gcc/builtins.c branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
[Bug target/70117] ppc long double isinf() is wrong?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70117 --- Comment #18 from Alan Modra --- Author: amodra Date: Mon Apr 11 13:46:51 2016 New Revision: 234880 URL: https://gcc.gnu.org/viewcvs?rev=234880=gcc=rev Log: PR70117, ppc long double isinf gcc/ PR target/70117 * builtins.c (fold_builtin_classify): For IBM extended precision, look at just the high-order double to test for NaN. (fold_builtin_interclass_mathfn): Similarly for Inf. For isnormal test just the high double for Inf but both doubles for subnormal limit. gcc/testsuite/ * gcc.target/powerpc/pr70117.c: New. Added: branches/gcc-5-branch/gcc/testsuite/gcc.target/powerpc/pr70117.c Modified: branches/gcc-5-branch/gcc/ChangeLog branches/gcc-5-branch/gcc/builtins.c branches/gcc-5-branch/gcc/testsuite/ChangeLog
[Bug target/70117] ppc long double isinf() is wrong?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70117 --- Comment #17 from Alan Modra --- Author: amodra Date: Fri Apr 8 02:11:52 2016 New Revision: 234821 URL: https://gcc.gnu.org/viewcvs?rev=234821=gcc=rev Log: PR70117, ppc long double isinf gcc/ PR target/70117 * builtins.c (fold_builtin_classify): For IBM extended precision, look at just the high-order double to test for NaN. (fold_builtin_interclass_mathfn): Similarly for Inf. For isnormal test just the high double for Inf but both doubles for subnormal limit. gcc/testsuite/ * gcc.target/powerpc/pr70117.c: New. Added: trunk/gcc/testsuite/gcc.target/powerpc/pr70117.c Modified: trunk/gcc/ChangeLog trunk/gcc/builtins.c trunk/gcc/testsuite/ChangeLog
[Bug target/68973] [6 regression] Internal compiler error on power for gcc/testsuite/g++.dg/pr67211.C
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68973 --- Comment #22 from Alan Modra --- Author: amodra Date: Thu Mar 31 06:26:02 2016 New Revision: 234609 URL: https://gcc.gnu.org/viewcvs?rev=234609=gcc=rev Log: [RS6000] reload_vsx_from_gprsf splitter This is PR68973 part 2, caused by the reload_vsx_from_gprsf splitter emitting an invalid move. Part 1 deferred for branch until it is proven that the reload change is necessary. Backport from mainline 2016-02-16 Alan ModraPR target/68973 * config/rs6000/rs6000.md (reload_vsx_from_gprsf): Rewrite splitter. (p8_mtvsrd_df, p8_mtvsrd_sf): New. (p8_mtvsrd_1, p8_mtvsrd_2): Delete. (p8_mtvsrwz): New. (p8_mtvsrwz_1, p8_mtvsrwz_2): Delete. (p8_xxpermdi_): Take two DF inputs rather than one TF. (p8_fmrgow_): Likewise. (reload_vsx_from_gpr): Adjust for above. Use "wa" for clobber constraint. (reload_fpr_from_gpr): Adjust for above. Use "d" for op0 constraint. (reload_vsx_from_gprsf): Use p8_mtvsrd_sf rather than attempting to use movdi_internal64. Remove op0_di. * config/rs6000/vsx.md (vsx_xscvspdpn_directmove): Make op1 SFmode. Modified: branches/gcc-4_9-branch/gcc/ChangeLog branches/gcc-4_9-branch/gcc/config/rs6000/rs6000.md branches/gcc-4_9-branch/gcc/config/rs6000/vsx.md
[Bug target/68973] [6 regression] Internal compiler error on power for gcc/testsuite/g++.dg/pr67211.C
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68973 --- Comment #21 from Alan Modra --- Author: amodra Date: Thu Mar 31 06:24:40 2016 New Revision: 234608 URL: https://gcc.gnu.org/viewcvs?rev=234608=gcc=rev Log: [RS6000] reload_vsx_from_gprsf splitter This is PR68973 part 2, caused by the reload_vsx_from_gprsf splitter emitting an invalid move. Part 1 deferred for branch until it is proven that the reload change is necessary. Backport from mainline 2016-02-16 Alan ModraPR target/68973 * config/rs6000/rs6000.md (reload_vsx_from_gprsf): Rewrite splitter. (p8_mtvsrd_df, p8_mtvsrd_sf): New. (p8_mtvsrd_1, p8_mtvsrd_2): Delete. (p8_mtvsrwz): New. (p8_mtvsrwz_1, p8_mtvsrwz_2): Delete. (p8_xxpermdi_): Take two DF inputs rather than one TF. (p8_fmrgow_): Likewise. (reload_vsx_from_gpr): Adjust for above. Use "wa" for clobber constraint. (reload_fpr_from_gpr): Adjust for above. Use "d" for op0 constraint. (reload_vsx_from_gprsf): Use p8_mtvsrd_sf rather than attempting to use movdi_internal64. Remove op0_di. * config/rs6000/vsx.md (vsx_xscvspdpn_directmove): Make op1 SFmode. Modified: branches/gcc-5-branch/gcc/ChangeLog branches/gcc-5-branch/gcc/config/rs6000/rs6000.md branches/gcc-5-branch/gcc/config/rs6000/vsx.md
[Bug target/70052] [5/6 Regression] ICE compiling _Decimal128 test case
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70052 --- Comment #8 from Alan Modra --- Author: amodra Date: Wed Mar 30 00:36:36 2016 New Revision: 234543 URL: https://gcc.gnu.org/viewcvs?rev=234543=gcc=rev Log: [RS6000] PR70052, ICE compiling _Decimal128 test case gcc/ PR target/70052 * config/rs6000/constraints.md (j): Simplify. * config/rs6000/predicates.md (easy_fp_constant): Exclude decimal float 0.D. * config/rs6000/rs6000.md (zero_fp): New mode_attr. (mov_hardfloat, mov_hardfloat32, mov_hardfloat64, mov_64bit_dm, mov_32bit): Use zero_fp in place of j in all constraint alternatives. (movtd_64bit_nodm): Delete "j" constraint alternative. gcc/testsuite/ * gcc.dg/dfp/pr70052.c: New test. Added: branches/gcc-5-branch/gcc/testsuite/gcc.dg/dfp/pr70052.c Modified: branches/gcc-5-branch/gcc/ChangeLog branches/gcc-5-branch/gcc/config/rs6000/constraints.md branches/gcc-5-branch/gcc/config/rs6000/predicates.md branches/gcc-5-branch/gcc/config/rs6000/rs6000.md branches/gcc-5-branch/gcc/testsuite/ChangeLog
[Bug target/70052] ICE compiling _Decimal128 test case
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70052 --- Comment #6 from Alan Modra --- Author: amodra Date: Fri Mar 25 09:10:03 2016 New Revision: 234479 URL: https://gcc.gnu.org/viewcvs?rev=234479=gcc=rev Log: [RS6000] PR70052, ICE compiling _Decimal128 test case gcc/ PR target/70052 * config/rs6000/constraints.md (j): Simplify. * config/rs6000/predicates.md (easy_fp_constant): Exclude decimal float 0.D. * config/rs6000/rs6000.md (zero_fp): New mode_attr. (mov_hardfloat, mov_hardfloat32, mov_hardfloat64, mov_64bit_dm, mov_32bit): Use zero_fp in place of j in all constraint alternatives. (movtd_64bit_nodm): Delete "j" constraint alternative. gcc/testsuite/ * gcc.dg/dfp/pr70052.c: New test. Added: trunk/gcc/testsuite/gcc.dg/dfp/pr70052.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/constraints.md trunk/gcc/config/rs6000/predicates.md trunk/gcc/config/rs6000/rs6000.md trunk/gcc/testsuite/ChangeLog
[Bug rtl-optimization/47992] ICE: SIGSEGV in ira_reuse_stack_slot (ira-color.c:2887) with -fweb
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47992 --- Comment #10 from Alan Modra --- Author: amodra Date: Tue Mar 15 22:05:22 2016 New Revision: 234237 URL: https://gcc.gnu.org/viewcvs?rev=234237=gcc=rev Log: Fix thinko in indirect_jump_optimize PR rtl-optimization/69195 PR rtl-optimization/47992 * ira.c (indirect_jump_optimize): Ignore artificial defs. Add comments. Modified: branches/gcc-4_9-branch/gcc/ChangeLog branches/gcc-4_9-branch/gcc/ira.c
[Bug rtl-optimization/47992] ICE: SIGSEGV in ira_reuse_stack_slot (ira-color.c:2887) with -fweb
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47992 --- Comment #9 from Alan Modra --- Author: amodra Date: Tue Mar 15 22:04:54 2016 New Revision: 234236 URL: https://gcc.gnu.org/viewcvs?rev=234236=gcc=rev Log: Fix thinko in indirect_jump_optimize PR rtl-optimization/69195 PR rtl-optimization/47992 * ira.c (indirect_jump_optimize): Ignore artificial defs. Add comments. Modified: branches/gcc-5-branch/gcc/ChangeLog branches/gcc-5-branch/gcc/ira.c
[Bug rtl-optimization/69195] [4.9/5/6 Regression] gcc.dg/torture/pr44913.c FAILs with -O3 -fno-dce -fno-forward-propagate
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69195 --- Comment #25 from Alan Modra --- Author: amodra Date: Tue Mar 15 22:05:22 2016 New Revision: 234237 URL: https://gcc.gnu.org/viewcvs?rev=234237=gcc=rev Log: Fix thinko in indirect_jump_optimize PR rtl-optimization/69195 PR rtl-optimization/47992 * ira.c (indirect_jump_optimize): Ignore artificial defs. Add comments. Modified: branches/gcc-4_9-branch/gcc/ChangeLog branches/gcc-4_9-branch/gcc/ira.c
[Bug rtl-optimization/69195] [4.9/5/6 Regression] gcc.dg/torture/pr44913.c FAILs with -O3 -fno-dce -fno-forward-propagate
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69195 --- Comment #24 from Alan Modra --- Author: amodra Date: Tue Mar 15 22:04:54 2016 New Revision: 234236 URL: https://gcc.gnu.org/viewcvs?rev=234236=gcc=rev Log: Fix thinko in indirect_jump_optimize PR rtl-optimization/69195 PR rtl-optimization/47992 * ira.c (indirect_jump_optimize): Ignore artificial defs. Add comments. Modified: branches/gcc-5-branch/gcc/ChangeLog branches/gcc-5-branch/gcc/ira.c
[Bug rtl-optimization/69195] [4.9/5/6 Regression] gcc.dg/torture/pr44913.c FAILs with -O3 -fno-dce -fno-forward-propagate
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69195 --- Comment #23 from Alan Modra --- Author: amodra Date: Tue Mar 15 22:04:42 2016 New Revision: 234235 URL: https://gcc.gnu.org/viewcvs?rev=234235=gcc=rev Log: Fix thinko in indirect_jump_optimize PR rtl-optimization/69195 PR rtl-optimization/47992 * ira.c (indirect_jump_optimize): Ignore artificial defs. Add comments. Modified: trunk/gcc/ChangeLog trunk/gcc/ira.c
[Bug rtl-optimization/47992] ICE: SIGSEGV in ira_reuse_stack_slot (ira-color.c:2887) with -fweb
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47992 --- Comment #8 from Alan Modra --- Author: amodra Date: Tue Mar 15 22:04:42 2016 New Revision: 234235 URL: https://gcc.gnu.org/viewcvs?rev=234235=gcc=rev Log: Fix thinko in indirect_jump_optimize PR rtl-optimization/69195 PR rtl-optimization/47992 * ira.c (indirect_jump_optimize): Ignore artificial defs. Add comments. Modified: trunk/gcc/ChangeLog trunk/gcc/ira.c
[Bug rtl-optimization/47992] ICE: SIGSEGV in ira_reuse_stack_slot (ira-color.c:2887) with -fweb
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47992 --- Comment #7 from Alan Modra --- Author: amodra Date: Thu Mar 10 10:48:58 2016 New Revision: 234103 URL: https://gcc.gnu.org/viewcvs?rev=234103=gcc=rev Log: PR69195, Reload confused by invalid reg_equiv Optimizing indirect jumps to direct jumps, and deleting dead insns can lead to changes in register lifetimes, which in turn can result in bad reg_equiv info being passed to reload. So do these tasks before calculating reg_equiv info. gcc/ PR rtl-optimization/69195 PR rtl-optimization/47992 * ira.c (recorded_label_ref): Delete. (update_equiv_regs): Return void. (indirect_jump_optimize): New function. (ira): Call indirect_jump_optimize and delete_trivially_dead_insns before regstat_compute_ri. Don't rebuild_jump_labels here. gcc/testsuite/ * gcc.dg/pr69195.c: New. * gcc.dg/pr69238.c: New. Added: branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/pr69195.c branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/pr69238.c Modified: branches/gcc-4_9-branch/gcc/ChangeLog branches/gcc-4_9-branch/gcc/ira.c branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
[Bug rtl-optimization/69195] [4.9/5/6 Regression] gcc.dg/torture/pr44913.c FAILs with -O3 -fno-dce -fno-forward-propagate
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69195 --- Comment #21 from Alan Modra --- Author: amodra Date: Thu Mar 10 10:48:58 2016 New Revision: 234103 URL: https://gcc.gnu.org/viewcvs?rev=234103=gcc=rev Log: PR69195, Reload confused by invalid reg_equiv Optimizing indirect jumps to direct jumps, and deleting dead insns can lead to changes in register lifetimes, which in turn can result in bad reg_equiv info being passed to reload. So do these tasks before calculating reg_equiv info. gcc/ PR rtl-optimization/69195 PR rtl-optimization/47992 * ira.c (recorded_label_ref): Delete. (update_equiv_regs): Return void. (indirect_jump_optimize): New function. (ira): Call indirect_jump_optimize and delete_trivially_dead_insns before regstat_compute_ri. Don't rebuild_jump_labels here. gcc/testsuite/ * gcc.dg/pr69195.c: New. * gcc.dg/pr69238.c: New. Added: branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/pr69195.c branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/pr69238.c Modified: branches/gcc-4_9-branch/gcc/ChangeLog branches/gcc-4_9-branch/gcc/ira.c branches/gcc-4_9-branch/gcc/testsuite/ChangeLog