1. 16 Jul, 2018 9 commits
  2. 15 Jul, 2018 5 commits
    • re PR target/85993 (config/sh/sh.c:10878: suspicious if .. else chain) · 2cd66592
      	PR target/85993
      	* config/sh/sh.c (output_mi_thunk): Remove dead conditional
      	block.
      
      From-SVN: r262671
      Jeff Law committed
    • [testsuite/guality] Run guality tests with Og · 5155feb3
      We advertise Og as the optimization level of choice for the standard
      edit-compile-debug cycle, but do not run the guality tests for Og with the
      default torture options.
      
      This patch ensures that we test -Og in the guality tests.
      
      F.i., for gcc.dg/guality there are 45 fails for Og (while there are none for
      O1), in these test-cases:
      ...
      gcc.dg/guality/pr54200.c
      gcc.dg/guality/pr54970.c
      gcc.dg/guality/pr56154-1.c
      gcc.dg/guality/pr59776.c
      gcc.dg/guality/sra-1.c
      ...
      
      2018-07-15  Tom de Vries  <tdevries@suse.de>
      
      	* lib/gcc-gdb-test.exp (guality_minimal_options): New proc.
      	* lib/gfortran-dg.exp (gfortran-dg-runtest): Don't call torture-init if
      	already called.
      	* g++.dg/guality/guality.exp: Ensure Og is part of torture options.
      	* gcc.dg/guality/guality.exp: Same.
      	* gfortran.dg/guality/guality.exp: Same.
      
      From-SVN: r262668
      Tom de Vries committed
    • Revert "[testsuite/guality] Run guality tests with Og" · 14fa87d6
      This reverts commit 6b84828445f7875d1dddbd90a8d86b10c4e8e776.
      
      From-SVN: r262667
      Tom de Vries committed
    • [testsuite/guality] Run guality tests with Og · 873b4532
      We advertise Og as the optimization level of choice for the standard
      edit-compile-debug cycle, but do not run the guality tests for Og with the
      default torture options.
      
      This patch ensures that we test -Og in the guality tests.
      
      F.i., for gcc.dg/guality there are 45 fails for Og (while there are none for
      O1), in these test-cases:
      ...
      gcc.dg/guality/pr54200.c
      gcc.dg/guality/pr54970.c
      gcc.dg/guality/pr56154-1.c
      gcc.dg/guality/pr59776.c
      gcc.dg/guality/sra-1.c
      ...
      
      2018-07-15  Tom de Vries  <tdevries@suse.de>
      
      	* lib/gcc-gdb-test.exp (guality_minimal_options): New proc.
      	* g++.dg/guality/guality.exp: Ensure Og is part of torture options.
      	* gcc.dg/guality/guality.exp: Same.
      	* gfortran.dg/guality/guality.exp: Same.
      
      From-SVN: r262666
      Tom de Vries committed
    • Daily bump. · 8d93e01d
      From-SVN: r262665
      GCC Administrator committed
  3. 14 Jul, 2018 3 commits
  4. 13 Jul, 2018 19 commits
    • runtime: skip zero-sized fields in structs when converting to FFI · 867b003f
          
          The libffi library doesn't understand zero-sized objects.
          When we see a zero-sized field in a struct, just skip it when
          converting to the FFI data structures. There is no value to pass in
          any case, so not telling libffi about the field doesn't affect
          anything.
          
          The test case for this is https://golang.org/cl/123316.
          
          Fixes golang/go#26335
          
          Reviewed-on: https://go-review.googlesource.com/123335
      
      From-SVN: r262651
      Ian Lance Taylor committed
    • x86: Tune Skylake, Cannonlake and Icelake as Haswell · 7264261f
      r259399, which added PROCESSOR_SKYLAKE, disabled many x86 optimizations
      which are enabled by PROCESSOR_HASWELL.  As the result, -mtune=skylake
      generates slower codes on Skylake than before.  The same also applies
      to Cannonlake and Icelak tuning.
      
      This patch changes -mtune={skylake|cannonlake|icelake} to tune like
      -mtune=haswell for until their tuning is properly adjusted. It also
      enables -mprefer-vector-width=256 for -mtune=haswell, which has no
      impact on codegen when AVX512 isn't enabled.
      
      Performance impacts on SPEC CPU 2017 rate with 1 copy using
      
      -march=native -mfpmath=sse -O2 -m64
      
      are
      
      1. On Broadwell server:
      
      500.perlbench_r		-0.56%
      502.gcc_r		-0.18%
      505.mcf_r		0.24%
      520.omnetpp_r		0.00%
      523.xalancbmk_r		-0.32%
      525.x264_r		-0.17%
      531.deepsjeng_r		0.00%
      541.leela_r		0.00%
      548.exchange2_r		0.12%
      557.xz_r		0.00%
      Geomean			0.00%
      
      503.bwaves_r		0.00%
      507.cactuBSSN_r		0.21%
      508.namd_r		0.00%
      510.parest_r		0.19%
      511.povray_r		-0.48%
      519.lbm_r		0.00%
      521.wrf_r		0.28%
      526.blender_r		0.19%
      527.cam4_r		0.39%
      538.imagick_r		0.00%
      544.nab_r		-0.36%
      549.fotonik3d_r		0.51%
      554.roms_r		0.00%
      Geomean			0.17%
      
      On Skylake client:
      
      500.perlbench_r		0.96%
      502.gcc_r		0.13%
      505.mcf_r		-1.03%
      520.omnetpp_r		-1.11%
      523.xalancbmk_r		1.02%
      525.x264_r		0.50%
      531.deepsjeng_r		2.97%
      541.leela_r		0.50%
      548.exchange2_r		-0.95%
      557.xz_r		2.41%
      Geomean			0.56%
      
      503.bwaves_r		0.49%
      507.cactuBSSN_r		3.17%
      508.namd_r		4.05%
      510.parest_r		0.15%
      511.povray_r		0.80%
      519.lbm_r		3.15%
      521.wrf_r		10.56%
      526.blender_r		2.97%
      527.cam4_r		2.36%
      538.imagick_r		46.40%
      544.nab_r		2.04%
      549.fotonik3d_r		0.00%
      554.roms_r		1.27%
      Geomean			5.49%
      
      On Skylake server:
      
      500.perlbench_r		0.71%
      502.gcc_r		-0.51%
      505.mcf_r		-1.06%
      520.omnetpp_r		-0.33%
      523.xalancbmk_r		-0.22%
      525.x264_r		1.72%
      531.deepsjeng_r		-0.26%
      541.leela_r		0.57%
      548.exchange2_r		-0.75%
      557.xz_r		-1.28%
      Geomean			-0.21%
      
      503.bwaves_r		0.00%
      507.cactuBSSN_r		2.66%
      508.namd_r		3.67%
      510.parest_r		1.25%
      511.povray_r		2.26%
      519.lbm_r		1.69%
      521.wrf_r		11.03%
      526.blender_r		3.39%
      527.cam4_r		1.69%
      538.imagick_r		64.59%
      544.nab_r		-0.54%
      549.fotonik3d_r		2.68%
      554.roms_r		0.00%
      Geomean			6.19%
      
      This patch improves -march=native performance on Skylake up to 60% and
      leaves -march=native performance unchanged on Haswell.
      
      gcc/
      
      2018-07-13  H.J. Lu  <hongjiu.lu@intel.com>
      	    Sunil K Pandey  <sunil.k.pandey@intel.com>
      
      	PR target/84413
      	* config/i386/i386.c (m_CORE_AVX512): New.
      	(m_CORE_AVX2): Likewise.
      	(m_CORE_ALL): Add m_CORE_AVX2.
      	* config/i386/x86-tune.def: Replace m_HASWELL with m_CORE_AVX2.
      	Replace m_SKYLAKE_AVX512 with m_CORE_AVX512 on avx256_optimal
      	and remove the rest of m_SKYLAKE_AVX512.
      
      gcc/testsuite/
      
      2018-07-13  H.J. Lu  <hongjiu.lu@intel.com>
      	    Sunil K Pandey  <sunil.k.pandey@intel.com>
      
      	PR target/84413
      	* gcc.target/i386/pr84413-1.c: New test.
      	* gcc.target/i386/pr84413-2.c: Likewise.
      	* gcc.target/i386/pr84413-3.c: Likewise.
      
      Co-Authored-By: Sunil K Pandey <sunil.k.pandey@intel.com>
      
      From-SVN: r262649
      H.J. Lu committed
    • lto.c (do_stream_out): Add PART parameter; open dump file. · 814f3331
      
      	* lto.c (do_stream_out): Add PART parameter; open dump file.
      	(stream_out): Add PART parameter; pass it to do_stream_out.
      	(lto_wpa_write_files): Update call of stream_out.
      
      	* lto-streamer-out.c (copy_function_or_variable): Dump info about
      	copying section.
      
      From-SVN: r262645
      Jan Hubicka committed
    • emmintrin.h (_mm_and_si128): New function. · fb5f0c20
      [gcc]
      
      2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
      	    Steve Munroe  <munroesj52@gmail.com>
      
      	* config/rs6000/emmintrin.h (_mm_and_si128): New function.
      	(_mm_andnot_si128): Likewise.
      	(_mm_or_si128): Likewise.
      	(_mm_xor_si128): Likewise.
      
      [gcc/testsuite]
      
      2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
      	    Steve Munroe  <munroesj52@gmail.com>
      
      	* gcc.target/powerpc/sse2-pand-1.c: New file.
      	* gcc.target/powerpc/sse2-pandn-1.c: Likewise.
      	* gcc.target/powerpc/sse2-por-1.c: Likewise.
      	* gcc.target/powerpc/sse2-pxor-1.c: Likewise.
      
      
      Co-Authored-By: Steve Munroe <munroesj52@gmail.com>
      
      From-SVN: r262642
      Bill Schmidt committed
    • compiler: fix parsing of composite literals with omitted pointer types · 113950b7
          
          The frontend could parse omitted pointer typess at the end of the
          type, but not in the middle, so code like []*[][]int{{{1}}} failed.
          
          Test case is in https://golang.org/cl/123477.
          
          Fixes golang/go#26340
          
          Reviewed-on: https://go-review.googlesource.com/123479
      
      From-SVN: r262641
      Ian Lance Taylor committed
    • [PR c++/86374] Name lookup failure in enclosing template · 6b34716b
      https://gcc.gnu.org/ml/gcc-patches/2018-07/msg00701.html
      	PR c++/86374
      	* pt.c (lookup_template_class_1): Use tsubst_aggr_type for
      	contexts that are classes.
      	* parser.c (cp_parser_template_id): Combine entering_scope decl &
      	initializer.
      
      	PR c++/86374
      	* g++.dg/pr86374.C: New.
      
      From-SVN: r262637
      Nathan Sidwell committed
    • 3nd Patch for PR78009 · b2272b13
      https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78809
      Inline strcmp with small constant strings
      
      The design doc for PR78809 is at:
      https://www.mail-archive.com/gcc@gcc.gnu.org/msg83822.html
      
      this patch is for the third part of change of PR78809.
      
      C. for strcmp (s1, s2), strncmp (s1, s2, n), and memcmp (s1, s2, n)
         if the result is NOT used to do simple equality test against zero, one of
      "s1" or "s2" is a small constant string, n is a constant, and the Min value of
      the length of the constant string and "n" is smaller than a predefined
      threshold T,
         inline the call by a byte-to-byte comparision sequence to avoid calling
      overhead.
      
      adding test case strcmpopt_5.c into gcc.dg for part C of PR78809.
      adding test case strcmpopt_6.c into gcc.dg to test the following case:
         When the specified length exceeds one of the arguments of the call to memcmp,
         the call to memcmp should NOT be inlined.
      
      From-SVN: r262636
      Qing Zhao committed
    • arm - Add vendor and CPU id information to arm-cpus.in · b02160e5
      This patch moves the vendor and CPU id data from driver-arm.c to the
      main table of CPU data in arm-cpus.in.  It then adds rules to
      parsecpu.awk to build data tables that can be used by the driver for
      automatic CPU detection when running natively.  This is the last major
      bit of CPU-specific data that can be usefully moved to the CPU data
      tables (I don't think it is sensible to move the per-cpu tuning data
      from its current location).
      
      The syntax and parser can support revision ranges, but at present
      nothing is done with that data: no supported cpu currently needs that
      capability.
      
      	* config/arm/driver-arm.c: Include arm-native.h.
      	(host_detect_local_cpu): Use auto-generated data tables.
      	(vendors, arm_cpu_table): Delete.  Move part information to ...
      	* config/arm/arm-cpus.in: ... here.
      	* config/arm/parsecpu.awk (gen_native): New function.
      	(vendor, part): New CPU fields.
      	(END): Add support for building the native CPU detection tables.
      	* config/arm/t-arm (arm-native.h): Add build rule.
      	(driver-arm.o): Add dependency on arm-native.h.
      
      From-SVN: r262633
      Richard Earnshaw committed
    • re PR middle-end/85974 (Failure to optimize difference of two pointers into a… · 67fccea4
      re PR middle-end/85974 (Failure to optimize difference of two pointers into a compile time constant)
      
      2018-07-13  Richard Biener  <rguenther@suse.de>
      
      	PR middle-end/85974
      	* match.pd (addr1 - addr2): Allow either of the operand to
      	have a conversion.
      
      	* gcc.c-torture/compile/930326-1.c: Adjust to cover widening.
      
      From-SVN: r262632
      Richard Biener committed
    • [testsuite, guality] Add -fno-ipa-icf in gcc.dg/guality · 22539827
      Optimization fipa-icf breaks debug info (as is noted in PR63572 - "ICF
      breaks user debugging experience"), which make guality tests clztest.c,
      ctztest.c and sra-1.c unsupported for option combination "-O2 -flto
      -fuse-linker-plugin -fno-fat-lto-objects".  F.i., in clztest.c foo and bar are
      merged, and gdb can set a breakpoint on a line in foo, but trying to set a
      breakpoint on a line in bar results in a breakpoint in main instead.
      
      This patch works around the problem by adding -fno-ipa-icf (as is already done
      in csttest.c and pr43077-1.c) to those testcases:
      ...
      -UNSUPPORTED: gcc.dg/guality/clztest.c ... line . g == f
      +PASS:        gcc.dg/guality/clztest.c ... line . g == f
      -UNSUPPORTED: gcc.dg/guality/ctztest.c ... line . g == f
      +PASS:        gcc.dg/guality/ctztest.c ... line . g == f
      -UNSUPPORTED: gcc.dg/guality/sra-1.c ... line .+1 a[0] == 4
      +PASS:        gcc.dg/guality/sra-1.c ... line .+1 a[0] == 4
      -UNSUPPORTED: gcc.dg/guality/sra-1.c ... line . a[1] == 14
      +PASS:        gcc.dg/guality/sra-1.c ... line . a[1] == 14
      ...
      
      Tested on x86_64.
      
      2018-07-13  Tom de Vries  <tdevries@suse.de>
      
      	* gcc.dg/guality/clztest.c: Add -fno-ipa-icf in dg-options.
      	* gcc.dg/guality/ctztest.c: Same.
      	* gcc.dg/guality/sra-1.c: Same.
      
      From-SVN: r262631
      Tom de Vries committed
    • DFix typo · e52b0aab
      From-SVN: r262630
      Eric Botcazou committed
    • lang.opt (funsigned-char): New option. · 86b43436
      	* gcc-interface/lang.opt (funsigned-char): New option.
      	* gcc-interface/misc.c (gnat_handle_option): Accept it.
      	* gcc-interface/utils.c (finish_character_type): Tweak comment.
      
      From-SVN: r262629
      Eric Botcazou committed
    • [debug] Reuse debug exprs generated in remap_ssa_name · bdaa2c54
      When compiling gcc.dg/vla-1.c with -O3 -g, vla a and b in f1 are optimized
      away, and f1 is cloned to a version f1.constprop with no parameters, eliminating
      parameter i.  Debug info is generated to describe the sizes of a and b, but
      that process generates debug expressions that are not reused.
      
      Fix the duplication by saving and reusing the generated debug expressions in
      remap_ssa_name.  Concretely: reuse D#7 here instead of generating D#8:
      ...
       __attribute__((noinline))
       f1.constprop ()
       {
         intD.6 iD.1935;
      
         <bb 3>
         # DEBUG D#10 s=> iD.1897
         # DEBUG iD.1935 => D#10
      
         <bb 2>
      -  # DEBUG D#8 s=> iD.1935
         # DEBUG D#7 s=> iD.1935
         saved_stack.2_1 = __builtin_stack_save ();
         # DEBUG BEGIN_STMT
         # DEBUG D#6 => D#7 + 1
         # DEBUG D#5 => (long intD.8) D#6
         # DEBUG D#4 => D#5 + -1
         # DEBUG D.1937 => (sizetype) D#4
         # DEBUG a.0D.1942 => NULL
         # DEBUG BEGIN_STMT
      -  # DEBUG D#3 => D#8 + 2
      +  # DEBUG D#3 => D#7 + 2
         # DEBUG D#2 => (long intD.8) D#3
         # DEBUG D#1 => D#2 + -1
         # DEBUG D.1944 => (sizetype) D#1
         # DEBUG b.1D.1949 => NULL
      ...
      
      Bootstrapped and reg-tested on x86_64.
      
      2018-07-13  Tom de Vries  <tdevries@suse.de>
      
      	* tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
      	in remap_ssa_name.
      
      	* gcc.dg/vla-1.c: Update.
      
      From-SVN: r262628
      Tom de Vries committed
    • [contrib] Add contrib/maintainers-verify.sh · bddcac9d
      2018-07-13  Tom de Vries  <tdevries@suse.de>
      
      	* maintainers-verify.sh: New file.
      
      	* gcc.src/maintainers.exp: New file.
      
      From-SVN: r262627
      Tom de Vries committed
    • aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use arrays instead of numbered variables. · 34d7854d
      
      	* config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
      	arrays instead of numbered variables.
      
      From-SVN: r262626
      Jackson Woodruff committed
    • sparc-protos.h (sparc_compute_frame_size): Delete. · f77c5a3f
      	* config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
      	* config/sparc/sparc.c (sparc_compute_frame_size): Make static
      
      From-SVN: r262625
      Eric Botcazou committed
    • re PR debug/86452 (ICE in force_decl_die, at dwarf2out.c:25922 with -g1 and -flto) · 77e61ab0
      2018-07-13  Richard Biener  <rguenther@suse.de>
      
      	PR debug/86452
      	* dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
      	instead of get_context_die.
      
      From-SVN: r262624
      Richard Biener committed
    • re PR tree-optimization/86489 (ICE in gimple_phi_arg starting with r261682 when… · 061d40da
      re PR tree-optimization/86489 (ICE in gimple_phi_arg starting with r261682 when building 531.deepsjeng_r with FDO + LTO)
      
      gcc/ChangeLog:
      
      2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
      	    Richard Biener  <rguenther@suse.de>
      
      	PR middle-end/86489
      	* tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
      	that the loop latch destination where phi is defined.
      
      gcc/testsuite/ChangeLog:
      
      2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
      
      	PR middle-end/86489
      	* gcc.dg/pr86489.c: New test.
      
      
      Co-Authored-By: Richard Biener <rguenther@suse.de>
      
      From-SVN: r262622
      Kugan Vivekanandarajah committed
    • Daily bump. · b18bb376
      From-SVN: r262620
      GCC Administrator committed
  5. 12 Jul, 2018 4 commits
    • PR testsuite/86510 - test case g++.dg/warn/pr86453.C fails starting with r262596 · 68d71a31
      gcc/testsuite/ChangeLog:
      	g++.dg/warn/pr86453.C: Adjust.
      
      From-SVN: r262609
      Martin Sebor committed
    • RISC-V: Silence expected Ada testsuite warning. · ac07bbf2
      	gcc/testsuite/
      	* gnat.dg/warn5.adb: Expect warning for riscv*-*-*.
      
      From-SVN: r262608
      Jim Wilson committed
    • RISC-V: Error if function declared with different interrupt modes. · 8528f27b
      	gcc/
      	2018-07-06  Kito Cheng  <kito.cheng@gmail.com>
              * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
              (riscv_expand_epilogue): Add assertion to check interrupt mode.
              (riscv_set_current_function): Extract getting interrupt type to new
              function.
              (riscv_get_interrupt_type): New function.
              (riscv_merge_decl_attributes): New function, checking interrupt type is
              same.
              (TARGET_MERGE_DECL_ATTRIBUTES): Define.
      
      	gcc/testsuite/
      	2018-07-06  Kito Cheng  <kito.cheng@gmail.com>
              * gcc.target/riscv/interrupt-conflict-mode.c: New.
      
      From-SVN: r262607
      Kito Cheng committed
    • c-attribs.c (c_common_attribute_table): Add "omp declare target implicit" attribute. · 9b452033
      	* c-attribs.c (c_common_attribute_table): Add
      	"omp declare target implicit" attribute.
      
      	* c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
      	type here, instead add "omp declare target implicit" attribute.
      	(finish_decl): Diagnose vars without mappable type here.
      
      	* decl2.c (cplus_decl_attributes): Don't diagnose vars without mappable
      	type here, instead add "omp declare target implicit" attribute.  Add
      	that attribute instead of "omp declare target" also when
      	processing_template_decl.
      	* decl.c (cp_finish_decl): Diagnose vars without mappable type here,
      	and before calling cp_omp_mappable_type call complete_type.
      
      	* c-c++-common/gomp/declare-target-3.c: New test.
      	* g++.dg/gomp/declare-target-2.C: New test.
      
      From-SVN: r262605
      Jakub Jelinek committed