- 17 Feb, 2019 4 commits
-
-
From-SVN: r268970
Marek Polacek committed -
* constexpr.c (unshare_constructor): No longer static. * cp-tree.h (unshare_constructor): Declare. * semantics.c (finish_compound_literal): When dealing with a non-dependent expression in a template, return the original expression. Pass LOOKUP_NO_NARROWING to digest_init_flags. * g++.dg/cpp0x/range-for37.C: New test. From-SVN: r268969
Marek Polacek committed -
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 <bd>tf_<mode> 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 (<bd>_<mode> split): Check for an int output reg on add insn. (<bd>tf_<mode> split): Likewise. Match predicates with insn. From-SVN: r268968
Alan Modra committed -
From-SVN: r268967
GCC Administrator committed
-
- 16 Feb, 2019 9 commits
-
-
There is no V4HI pmulhrsw in AVX512BW and V4HI/V8HI pmulhrsw don't require AVX2. PR target/89372 * config/i386/sse.md (ssedoublemode): Remove V4HI. (PMULHRSW): Likewise. (<ssse3_avx2>_pmulhrsw<mode>3): Require TARGET_SSSE3, not TARGET_AVX2. (ssse3_pmulhrswv4hi3): New expander. From-SVN: r268964
H.J. Lu committed -
The second and third alternatives in *vec_extractv2si_zext_mem don't require MMX. But the second one requires SSE2. * config/i386/mmx.md (*vec_extractv2si_zext_mem): Doesn't require MMX. Add isa attribute. From-SVN: r268963
H.J. Lu committed -
PR middle-end/88074 * simplify.c (simplify_transformation_to_array): Run post_op immediately after processing corresponding row, rather than at the end. (norm2_scale): New variable. (add_squared): Rename to ... (norm2_add_squared): ... this. Scale down operand and/or result if needed. (do_sqrt): Rename to ... (norm2_do_sqrt): ... this. Handle the result == e case. Scale up result and clear norm2_scale. (gfc_simplify_norm2): Clear norm2_scale. Change add_squared to norm2_add_squared and &do_sqrt to norm2_do_sqrt. Scale up result and clear norm2_scale again. From-SVN: r268962
Jakub Jelinek committed -
PR c++/88680 reports excess warnings from -Wtype-limits after the C++ FE's use of location wrappers was extended in r267272 for cases such as: const unsigned n = 8; static_assert (n >= 0 && n % 2 == 0, ""); t.C:3:18: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] 3 | static_assert (n >= 0 && n % 2 == 0, ""); | ~~^~~~ The root cause is that the location wrapper around "n" breaks the suppression of the warning for the "if OP0 is a constant that is >= 0" case. This patch fixes it by calling fold_for_warn on OP0, extracting the constant. gcc/c-family/ChangeLog: PR c++/88680 * c-common.c (shorten_compare): Call fold_for_warn on op0 when implementing -Wtype-limits. gcc/testsuite/ChangeLog: PR c++/88680 * g++.dg/wrappers/pr88680.C: New test. From-SVN: r268961
David Malcolm committed -
2019-02-17 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/71066 * trans-decl.c (generate_coarray_sym_init): For an array constructor in a DATA statement of a coarray variable, set the rank to 1 to avoid confusion later on. If the constructor contains only one value, use that for initiailizig. 2019-02-17 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/71066 * gfortran.dg/coarray_data_1.f90: New test. From-SVN: r268960
Thomas Koenig committed -
* c-c++-common/patchable_function_entry-decl.c: Add -fno-pie on SPARC. * c-c++-common/patchable_function_entry-default.c: Likewise. * c-c++-common/patchable_function_entry-definition.c: Likewise. From-SVN: r268958
Eric Botcazou committed -
PR rtl-optimization/66152 * builtins.h (c_readstr): Declare. * builtins.c (c_readstr): Remove forward declaration. Add null_terminated_p argument, if false, read all bytes from the string instead of stopping after '\0'. * expr.c (string_cst_read_str): New function. (store_expr): Use string_cst_read_str instead of builtin_strncpy_read_str. Try to store by pieces the whole exp_len first, and only if that fails, split it up into store by pieces followed by clear_storage. Formatting fix. * gcc.target/i386/pr66152.c: New test. From-SVN: r268957
Jakub Jelinek committed -
* config/i386/i386.md (*movqi_internal): Remove static from buf variable. Use output_asm_insn (buf, operands); return ""; instead of return buf;. * config/i386/sse.md (<sse>_andnot<mode>3<mask_name>, *<code><mode>3<mask_name>, *andnot<mode>3, *andnottf3, *<code><mode>3, *<code>tf3, <mask_codefor><code><mode>3<mask_name>): Likewise. From-SVN: r268956
Jakub Jelinek committed -
From-SVN: r268955
GCC Administrator committed
-
- 15 Feb, 2019 24 commits
-
-
Currently, the compiler lowers runtime.getcallersp to __builtin_frame_address(1). In the C side of the runtime, getcallersp is defined as __builtin_frame_address(0). They don't match. Further, neither of them actually returns the caller's SP. On AMD64, __builtin_frame_address(0) just returns the frame pointer. __builtin_frame_address(1) returns the memory content where the frame pointer points to, which is typically the caller's frame pointer but can also be garbage if the frame pointer is not enabled. This CL changes it to use __builtin_dwarf_cfa(), which returns the caller's SP at the call site. This matches the SP we get from unwinding the stack. Currently getcallersp is not used for anything real. It will be used for precise stack scan (a new version of CL 159098). Reviewed-on: https://go-review.googlesource.com/c/162905 * go-gcc.cc (Gcc_backend::Gcc_backend): Define __builtin_dwarf_cfa instead of __builtin_frame_address. From-SVN: r268952
Cherry Zhang committed -
* g++.dg/asan/asan_oob_test.cc: Skip OOB_int on SPARC. * g++.dg/asan/function-argument-3.C: Tweak for 32-bit SPARC. From-SVN: r268951
Eric Botcazou committed -
* config/sparc/linux.h (ASAN_CC1_SPEC): Define. (CC1_SPEC): Use GNU_USER_TARGET_CC1_SPEC and ASAN_CC1_SPEC. * config/sparc/linux64.h (ASAN_CC1_SPEC): Likewise. (CC1_SPEC): Likewise. * config/sparc/sparc.c (sparc_asan_shadow_offset): Adjust for 64-bit. From-SVN: r268950
Eric Botcazou committed -
asan.c (asan_emit_stack_protection): Use full-sized mask to align the base address on 64-bit strict-alignment platforms. * asan.c (asan_emit_stack_protection): Use full-sized mask to align the base address on 64-bit strict-alignment platforms. From-SVN: r268949
Eric Botcazou committed -
PR go/89368 compiler: write barrier check nil-check policy tweak Tweak the recipe for generating writeBarrier loads to insure that the dereference expr is marked as not requiring a nil check (not needed for gccgo, but needed for gollvm). Fixes https://gcc.gnu.org/PR89368 Reviewed-on: https://go-review.googlesource.com/c/162904 From-SVN: r268948
Ian Lance Taylor committed -
Replace "(MODE == V1DImode)" with "(MODE) == V1DImode". * config/i386/i386.h (VALID_MMX_REG_MODE): Correct the misplaced ')'. From-SVN: r268947
H.J. Lu committed -
* config/i386/darwin.h (TARGET_FPMATH_DEFAULT_P): New define. From-SVN: r268944
Uros Bizjak committed -
There's a bit of a disconnect between the feature flags that don't test the fpu and ones that do when the test itself also forces an architecture. The forcing of the architecture would change the defaults and without explicitly giving the correct fpu again the test would fail. I don't see a good way to solve this problem, really the feature tests should ideally contain the extra options the test adds too, but for this specific case it can be solved by always testing the fpu explicitly. Committed under the GCC obvious gcc/testsuite/ChangeLog: * lib/target-supports.exp (check_effective_target_arm_neon_softfp_fp16_ok_nocache): Drop non-fpu checking alternative. From-SVN: r268943
Tamar Christina committed -
2019-02-15 Aaron Sawdey <acsawdey@linux.ibm.com> PR rtl-optimization/88308 * shrink-wrap.c (move_insn_for_shrink_wrap): Fix LABEL_NUSES counts on copied instruction. From-SVN: r268942
Aaron Sawdey committed -
PR go/89123 internal/cpu, runtime: add S/390 CPU capability support Patch by Robin Dapp. Updates https://gcc.gnu.org/PR89123 Reviewed-on: https://go-review.googlesource.com/c/162887 From-SVN: r268941
Ian Lance Taylor committed -
Fixes Solaris build. Reviewed-on: https://go-review.googlesource.com/c/162885 From-SVN: r268940
Ian Lance Taylor committed -
Reviewed-on: https://go-review.googlesource.com/c/162884 From-SVN: r268939
Ian Lance Taylor committed -
From-SVN: r268934
Eric Botcazou committed -
* c-c++-common/patchable_function_entry-decl.c: Do not run on Visium. * c-c++-common/patchable_function_entry-default.c: Likewise. * c-c++-common/patchable_function_entry-definition.c: Likewise. * gcc.dg/tree-ssa/pr84859.c: Add -ftree-cselim switch. From-SVN: r268932
Eric Botcazou committed -
libgcc/ * config/visium/lib2funcs.c (__set_trampoline_parity): Replace TRAMPOLINE_SIZE with __LIBGCC_TRAMPOLINE_SIZE__. gcc/ * final.c (insn_current_reference_address): Replace test on JUMP_P with test on jump_to_label_p. * config/visium/visium-passes.def: New file. * config/visium/t-visium (PASSES_EXTRA): Define. * config/visium/visium-protos.h (make_pass_visium_reorg): Declare. * config/visium/visium.h (TRAMPOLINE_SIZE): Adjust. (TRAMPOLINE_ALIGNMENT): Define. * config/visium/visium.c (visium_option_override): Do not register the machine-specific reorg pass here. (visium_trampoline_init): Align the BRA insn on a 64-bit boundary for the GR6. (output_branch): Adjust threshold for long branch instruction. * config/visium/visium.md (cpu): Move around. (length): Adjust for the GR6. From-SVN: r268931
Eric Botcazou committed -
PR other/69006 PR testsuite/88920 * lib/gcc-dg.exp: If llvm_binutils effective target, set allow_blank_lines to 2 during initialization. (dg-allow-blank-lines-in-output): Set allow_blank_lines to 1 only if it was previously zero. (gcc-dg-prune): Don't check for llvm_binutils effective target here. Clear allow_blank_lines afterwards whenever it was 1. * gdc.test/gdc-test.exp (dmd2dg): Don't call dg-allow-blank-lines-in-output here. (gdc-do-test): Set allow_blank_lines to 3 if it is 0 before running the tests and restore it back at the end. From-SVN: r268930
Jakub Jelinek committed -
* c-c++-common/ubsan/opts-1.c: New test. * c-c++-common/ubsan/opts-2.c: New test. * c-c++-common/ubsan/opts-3.c: New test. * c-c++-common/ubsan/opts-4.c: New test. From-SVN: r268929
Jakub Jelinek committed -
PR tree-optimization/89278 * tree-loop-distribution.c: Include tree-eh.h. (generate_memset_builtin, generate_memcpy_builtin): Call rewrite_to_non_trapping_overflow on builtin->size before passing it to force_gimple_operand_gsi. * gcc.dg/pr89278.c: New test. Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r268927
Richard Biener committed -
PR c/89340 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions before c_decl_attributes rather than after it. * gcc.dg/pr89340.c: New test. * gcc.dg/torture/pr57036-2.c (jpgDecode_convert): Expect a warning that leaf attribute on nested function is useless. From-SVN: r268926
Jakub Jelinek committed -
PR other/89342 * optc-save-gen.awk: Handle optimize_fast like optimize_size or optimize_debug. * opth-gen.awk: Likewise. * gcc.dg/pr89342.c: New test. From-SVN: r268924
Jakub Jelinek committed -
Compiling with LTO revealed a number of cases in the runtime and standard library where C and Go disagreed about the type of an object or function (or where Go and code generated by the compiler disagreed). In all cases the underlying representation was the same (e.g., uintptr vs. void*), so this wasn't causing actual problems, but it did result in a number of annoying warnings when compiling with LTO. Reviewed-on: https://go-review.googlesource.com/c/160700 From-SVN: r268923
Ian Lance Taylor committed -
PR go/89168 libgo: change gotest to run examples with output Change the gotest script to act like "go test" and run examples that have "output" comments. This is not done with full generality, but just enough to run the libgo tests. Other packages should be tested with "go test" as usual. While we're here clean up some old bits of gotest, and only run TestXXX functions that are actually in *_test.go files. The latter change should fix https://gcc.gnu.org/PR89168. Reviewed-on: https://go-review.googlesource.com/c/162139 From-SVN: r268922
Ian Lance Taylor committed -
* go-backend.c (go_imported_unsafe): Update optimization_default_node. From-SVN: r268921
Ian Lance Taylor committed -
From-SVN: r268920
GCC Administrator committed
-
- 14 Feb, 2019 3 commits
-
-
* config/i386/i386.h (TARGET_SUBTARGET64_ISA_DEFAULT): Enable MMX, SSE and SSE2 by default. * config/i386/i386.c (ix86_option_override_internal): Do not explicitly set MMX, SSE and SSE2 flags for TARGET_64BIT here. From-SVN: r268917
Uros Bizjak committed -
PR rtl-optimization/89354 * combine.c (make_extraction): Punt if extraction_mode is narrower than len bits. * gcc.dg/pr89354.c: New test. From-SVN: r268913
Jakub Jelinek committed -
* gcc.target/i386/ssse3-pabsb.c: Re-enable 64-bit form on AVX targets. * gcc.target/i386/ssse3-pabsd.c: Ditto. * gcc.target/i386/ssse3-pabsw.c: Ditto. * gcc.target/i386/ssse3-palignr.c: Ditto. * gcc.target/i386/ssse3-phaddd.c: Ditto. * gcc.target/i386/ssse3-phaddsw.c: Ditto. * gcc.target/i386/ssse3-phaddw.c: Ditto. * gcc.target/i386/ssse3-phsubd.c: Ditto. * gcc.target/i386/ssse3-phsubsw.c: Ditto. * gcc.target/i386/ssse3-phsubw.c: Ditto. * gcc.target/i386/ssse3-pmaddubsw.c: Ditto. * gcc.target/i386/ssse3-pmulhrsw.c: Ditto. * gcc.target/i386/ssse3-pshufb.c: Ditto. * gcc.target/i386/ssse3-psignb.c: Ditto. * gcc.target/i386/ssse3-psignd.c: Ditto. * gcc.target/i386/ssse3-psignw.c: Ditto. From-SVN: r268907
Uros Bizjak committed
-