aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-09-17PR c/102245: Disable sign-changing optimization for shifts by zero.Roger Sayle2-2/+39
Respecting Jakub's suggestion that it may be better to warn-on-valid for "if (x << 0)" as the author might have intended "if (x < 0)" [which will also warn when x is _Bool], the simplest way to resolve this regression is to disable the recently added fold transformation for shifts by zero; these will be optimized later (elsewhere). Guarding against integer_zerop is the simplest of three alternatives; the second being to only apply this transformation to GIMPLE and not GENERIC, and the third (potentially) being to explicitly handle shifts by zero here, with an (if cond then else), optimizing the expression to a convert, but awkwardly duplicating a more general transformation earlier in match.pd's shift simplifications. 2021-09-17 Roger Sayle <roger@nextmovesoftware.com> gcc/ChangeLog PR c/102245 * match.pd (shift optimizations): Disable recent sign-changing optimization for shifts by zero, these will be folded later. gcc/testsuite/ChangeLog PR c/102245 * gcc.dg/Wint-in-bool-context-4.c: New test case.
2021-09-17rs6000: Move __builtin_mffsl to the [always] stanzaBill Schmidt1-3/+6
I over-restricted use of __builtin_mffsl, since I was unaware that it automatically uses mffs when mffsl is not available. Paul Clarke pointed this out in discussion of his SSE 4.1 compatibility patches. 2021-08-31 Bill Schmidt <wschmidt@linux.ibm.com> gcc/ * config/rs6000/rs6000-builtin-new.def (__builtin_mffsl): Move from [power9] to [always].
2021-09-17Fortran: Prefer GCC internal macros to float.h in ISO_Fortran_binding.h.Tobias Burnus1-17/+58
2021-09-17 Sandra Loosemore <sandra@codesourcery.com> Tobias Burnus <tobias@codesourcery.com> libgfortran/ * ISO_Fortran_binding.h: Only include float.h if the C compiler doesn't have predefined __LDBL_* and __DBL_* macros. Handle LDBL_MANT_DIG == 53 for FreeBSD.
2021-09-17configure, jit: Allow for 'make check-gcc-jit'.Iain Sandoe2-0/+9
This is a convenience feature that allows the user to do "make check-gcc-jit" at the top level of the build to check that facility in isolation from others. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> ChangeLog: * Makefile.def: Add a jit check target for the jit language. * Makefile.in: Regenerate.
2021-09-17Revert no longer needed fix for PR95539Richard Biener1-12/+1
The workaround is no longer necessary since we maintain alignment info on the DR group leader only. 2021-09-17 Richard Biener <rguenther@suse.de> * tree-vect-stmts.c (vectorizable_load): Do not frob stmt_info for SLP.
2021-09-17libstdc++: Rename tests with incorrect extensionJonathan Wakely2-0/+0
The libstdc++ testsuite only runs .cc files, so these two old tests have never been run. Signed-off-by: Jonathan Wakely <jwakely@redhat.com> libstdc++-v3/ChangeLog: * testsuite/26_numerics/valarray/dr630-3.C: Moved to... * testsuite/26_numerics/valarray/dr630-3.cc: ...here. * testsuite/27_io/basic_iostream/cons/16251.C: Moved to... * testsuite/27_io/basic_iostream/cons/16251.cc: ...here.
2021-09-17libgomp: Spelling error fix in OpenMP 5.1 conformance sectionJakub Jelinek1-2/+2
Fix spelling of OpenMP directive declare variant. 2021-09-17 Jakub Jelinek <jakub@redhat.com> * libgomp.texi (OpenMP 5.1): Spelling fix, declare variante -> declare variant.
2021-09-17openmp: Add support for OpenMP 5.1 atomics for C++Jakub Jelinek20-104/+1652
Besides the C++ FE changes, I've noticed that the C FE didn't reject #pragma omp atomic capture compare { v = x; x = y; } and other forms of atomic swap, this patch fixes that too. And the c-family/ routine needed quite a few changes so that the new code in it works fine with both FEs. 2021-09-17 Jakub Jelinek <jakub@redhat.com> gcc/c-family/ * c-omp.c (c_finish_omp_atomic): Avoid creating TARGET_EXPR if test is true, use create_tmp_var_raw instead of create_tmp_var and add a zero initializer to TARGET_EXPRs that had NULL initializer. When omitting operands after v = x, use type of v rather than type of x. Fix type of vtmp TARGET_EXPR. gcc/c/ * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture is true. gcc/cp/ * cp-tree.h (finish_omp_atomic): Add r and weak arguments. * parser.c (cp_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics, parse OpenMP 5.1 atomics and fail, compare and weak clauses. * semantics.c (finish_omp_atomic): Add r and weak arguments, handle them, handle COND_EXPRs. * pt.c (tsubst_expr): Adjust for COND_EXPR forms that finish_omp_atomic can now produce. gcc/testsuite/ * c-c++-common/gomp/atomic-18.c: Expect same diagnostics in C++ as in C. * c-c++-common/gomp/atomic-25.c: Drop c effective target. * c-c++-common/gomp/atomic-26.c: Likewise. * c-c++-common/gomp/atomic-27.c: Likewise. * c-c++-common/gomp/atomic-28.c: Likewise. * c-c++-common/gomp/atomic-29.c: Likewise. * c-c++-common/gomp/atomic-30.c: Likewise. Adjust expected diagnostics for C++ when it differs from C. (foo): Change return type from double to void. * g++.dg/gomp/atomic-5.C: Adjust expected diagnostics wording. * g++.dg/gomp/atomic-20.C: New test. libgomp/ * testsuite/libgomp.c-c++-common/atomic-19.c: Drop c effective target. Use /* */ comments instead of //. * testsuite/libgomp.c-c++-common/atomic-20.c: Likewise. * testsuite/libgomp.c-c++-common/atomic-21.c: Likewise. * testsuite/libgomp.c++/atomic-16.C: New test. * testsuite/libgomp.c++/atomic-17.C: New test.
2021-09-17x86: Add TARGET_SSE_PARTIAL_REG_[FP_]CONVERTS_DEPENDENCYH.J. Lu10-5/+125
1. Replace TARGET_SSE_PARTIAL_REG_DEPENDENCY with TARGET_SSE_PARTIAL_REG_FP_CONVERTS_DEPENDENCY in SSE FP to FP splitters. 2. Replace TARGET_SSE_PARTIAL_REG_DEPENDENCY with TARGET_SSE_PARTIAL_REG_CONVERTS_DEPENDENCY in SSE INT to FP splitters. 3. Also check TARGET_SSE_PARTIAL_REG_FP_CONVERTS_DEPENDENCY and TARGET_SSE_PARTIAL_REG_DEPENDENCY when handling avx_partial_xmm_update attribute. Don't convert AVX partial XMM register update if there is no partial SSE register dependency for SSE conversion. gcc/ * config/i386/i386-features.c (remove_partial_avx_dependency): Also check TARGET_SSE_PARTIAL_REG_FP_CONVERTS_DEPENDENCY and and TARGET_SSE_PARTIAL_REG_CONVERTS_DEPENDENCY before generating vxorps. * config/i386/i386.h (TARGET_SSE_PARTIAL_REG_FP_CONVERTS_DEPENDENCY): New. (TARGET_SSE_PARTIAL_REG_CONVERTS_DEPENDENCY): Likewise. * config/i386/i386.md (SSE FP to FP splitters): Replace TARGET_SSE_PARTIAL_REG_DEPENDENCY with TARGET_SSE_PARTIAL_REG_FP_CONVERTS_DEPENDENCY. (SSE INT to FP splitter): Replace TARGET_SSE_PARTIAL_REG_DEPENDENCY with TARGET_SSE_PARTIAL_REG_CONVERTS_DEPENDENCY. * config/i386/x86-tune.def (X86_TUNE_SSE_PARTIAL_REG_FP_CONVERTS_DEPENDENCY): New. (X86_TUNE_SSE_PARTIAL_REG_CONVERTS_DEPENDENCY): Likewise. gcc/testsuite/ * gcc.target/i386/avx-covert-1.c: New file. * gcc.target/i386/avx-fp-covert-1.c: Likewise. * gcc.target/i386/avx-int-covert-1.c: Likewise. * gcc.target/i386/sse-covert-1.c: Likewise. * gcc.target/i386/sse-fp-covert-1.c: Likewise. * gcc.target/i386/sse-int-covert-1.c: Likewise.
2021-09-17x86: Properly handle USE_VECTOR_FP_CONVERTS/USE_VECTOR_CONVERTSH.J. Lu4-3/+75
Check TARGET_USE_VECTOR_FP_CONVERTS or TARGET_USE_VECTOR_CONVERTS when handling avx_partial_xmm_update attribute. Don't convert AVX partial XMM register update if vector packed SSE conversion should be used. gcc/ PR target/101900 * config/i386/i386-features.c (remove_partial_avx_dependency): Check TARGET_USE_VECTOR_FP_CONVERTS and TARGET_USE_VECTOR_CONVERTS before generating vxorps. gcc/testsuite PR target/101900 * gcc.target/i386/pr101900-1.c: New test. * gcc.target/i386/pr101900-2.c: Likewise. * gcc.target/i386/pr101900-3.c: Likewise.
2021-09-17x86: Update memcpy/memset inline strategies for -mtune=tremontH.J. Lu3-2/+126
Simply memcpy and memset inline strategies to avoid branches for -mtune=tremont: 1. Create Tremont cost model from generic cost model. 2. With MOVE_RATIO and CLEAR_RATIO == 17, GCC will use integer/vector load and store for up to 16 * 16 (256) bytes when the data size is fixed and known. 3. Inline only if data size is known to be <= 256. a. Use "rep movsb/stosb" with simple code sequence if the data size is a constant. b. Use loop if data size is not a constant. 4. Use memcpy/memset libray function if data size is unknown or > 256. * config/i386/i386-options.c (processor_cost_table): Use tremont_cost for Tremont. * config/i386/x86-tune-costs.h (tremont_memcpy): New. (tremont_memset): Likewise. (tremont_cost): Likewise. * config/i386/x86-tune.def (X86_TUNE_PREFER_KNOWN_REP_MOVSB_STOSB): Enable for Tremont.
2021-09-17x86: Update -mtune=tremontH.J. Lu4-19/+23
Initial -mtune=tremont update 1. Use Haswell scheduling model. 2. Assume that stack engine allows to execute push&pop instructions in parall. 3. Prepare for scheduling pass as -mtune=generic. 4. Use the same issue rate as -mtune=generic. 5. Enable partial_reg_dependency. 6. Disable accumulate_outgoing_args 7. Enable use_leave 8. Enable push_memory 9. Disable four_jump_limit 10. Disable opt_agu 11. Disable avoid_lea_for_addr 12. Disable avoid_mem_opnd_for_cmove 13. Enable misaligned_move_string_pro_epilogues 14. Enable use_cltd 16. Enable avoid_false_dep_for_bmi 17. Enable avoid_mfence 18. Disable expand_abs 19. Enable sse_typeless_stores 20. Enable sse_load0_by_pxor 21. Disable split_mem_opnd_for_fp_converts 22. Disable slow_pshufb 23. Enable partial_reg_dependency This is the first patch to tune for Tremont. With all patches applied, performance impacts on SPEC CPU 2017 are: 500.perlbench_r 1.81% 502.gcc_r 0.57% 505.mcf_r 1.16% 520.omnetpp_r 0.00% 523.xalancbmk_r 0.00% 525.x264_r 4.55% 531.deepsjeng_r 0.00% 541.leela_r 0.39% 548.exchange2_r 1.13% 557.xz_r 0.00% geomean for intrate 0.95% 503.bwaves_r 0.00% 507.cactuBSSN_r 6.94% 508.namd_r 12.37% 510.parest_r 1.01% 511.povray_r 3.70% 519.lbm_r 36.61% 521.wrf_r 8.79% 526.blender_r 2.91% 527.cam4_r 6.23% 538.imagick_r 0.28% 544.nab_r 21.99% 549.fotonik3d_r 3.63% 554.roms_r -1.20% geomean for fprate 7.50% gcc/ChangeLog * common/config/i386/i386-common.c: Use Haswell scheduling model for Tremont. * config/i386/i386.c (ix86_sched_init_global): Prepare for Tremont scheduling pass. * config/i386/x86-tune-sched.c (ix86_issue_rate): Change Tremont issue rate to 4. (ix86_adjust_cost): Handle Tremont. * config/i386/x86-tune.def (X86_TUNE_SSE_PARTIAL_REG_DEPENDENCY): Enable for Tremont. (X86_TUNE_USE_LEAVE): Likewise. (X86_TUNE_PUSH_MEMORY): Likewise. (X86_TUNE_MISALIGNED_MOVE_STRING_PRO_EPILOGUES): Likewise. (X86_TUNE_USE_CLTD): Likewise. (X86_TUNE_AVOID_FALSE_DEP_FOR_BMI): Likewise. (X86_TUNE_AVOID_MFENCE): Likewise. (X86_TUNE_SSE_TYPELESS_STORES): Likewise. (X86_TUNE_SSE_LOAD0_BY_PXOR): Likewise. (X86_TUNE_ACCUMULATE_OUTGOING_ARGS): Disable for Tremont. (X86_TUNE_FOUR_JUMP_LIMIT): Likewise. (X86_TUNE_OPT_AGU): Likewise. (X86_TUNE_AVOID_LEA_FOR_ADDR): Likewise. (X86_TUNE_AVOID_MEM_OPND_FOR_CMOVE): Likewise. (X86_TUNE_EXPAND_ABS): Likewise. (X86_TUNE_SPLIT_MEM_OPND_FOR_FP_CONVERTS): Likewise. (X86_TUNE_SLOW_PSHUFB): Likewise.
2021-09-17Fix PR rtl-optimization/102306Eric Botcazou2-0/+29
This is a duplication of volatile loads introduced during GCC 9 development by the 2->2 mechanism of the RTL combiner. There is already a substantial checking for volatile references in can_combine_p but it implicitly assumes that the combination reduces the number of instructions, which is of course not the case here. So the fix teaches try_combine to abort the combination when it is about to make a copy of volatile references to preserve them. gcc/ PR rtl-optimization/102306 * combine.c (try_combine): Abort the combination if we are about to duplicate volatile references. gcc/testsuite/ * gcc.target/sparc/20210917-1.c: New test.
2021-09-17AVX512FP16: Add intrinsics for casting between vector float16 and vector ↵liuhongt6-0/+449
float32/float64/integer. gcc/ChangeLog: * config/i386/avx512fp16intrin.h (_mm_undefined_ph): New intrinsic. (_mm256_undefined_ph): Likewise. (_mm512_undefined_ph): Likewise. (_mm_cvtsh_h): Likewise. (_mm256_cvtsh_h): Likewise. (_mm512_cvtsh_h): Likewise. (_mm512_castph_ps): Likewise. (_mm512_castph_pd): Likewise. (_mm512_castph_si512): Likewise. (_mm512_castph512_ph128): Likewise. (_mm512_castph512_ph256): Likewise. (_mm512_castph128_ph512): Likewise. (_mm512_castph256_ph512): Likewise. (_mm512_zextph128_ph512): Likewise. (_mm512_zextph256_ph512): Likewise. (_mm512_castps_ph): Likewise. (_mm512_castpd_ph): Likewise. (_mm512_castsi512_ph): Likewise. * config/i386/avx512fp16vlintrin.h (_mm_castph_ps): New intrinsic. (_mm256_castph_ps): Likewise. (_mm_castph_pd): Likewise. (_mm256_castph_pd): Likewise. (_mm_castph_si128): Likewise. (_mm256_castph_si256): Likewise. (_mm_castps_ph): Likewise. (_mm256_castps_ph): Likewise. (_mm_castpd_ph): Likewise. (_mm256_castpd_ph): Likewise. (_mm_castsi128_ph): Likewise. (_mm256_castsi256_ph): Likewise. (_mm256_castph256_ph128): Likewise. (_mm256_castph128_ph256): Likewise. (_mm256_zextph128_ph256): Likewise. gcc/testsuite/ChangeLog: * gcc.target/i386/avx512fp16-typecast-1.c: New test. * gcc.target/i386/avx512fp16-typecast-2.c: Ditto. * gcc.target/i386/avx512fp16vl-typecast-1.c: Ditto. * gcc.target/i386/avx512fp16vl-typecast-2.c: Ditto.
2021-09-17AVX512FP16: Add testcase for vcvtsh2sd/vcvtsh2ss/vcvtsd2sh/vcvtss2sh.liuhongt8-0/+336
gcc/testsuite/ChangeLog: * gcc.target/i386/avx512fp16-vcvtsd2sh-1a.c: New test. * gcc.target/i386/avx512fp16-vcvtsd2sh-1b.c: Ditto. * gcc.target/i386/avx512fp16-vcvtsh2sd-1a.c: Ditto. * gcc.target/i386/avx512fp16-vcvtsh2sd-1b.c: Ditto. * gcc.target/i386/avx512fp16-vcvtsh2ss-1a.c: Ditto. * gcc.target/i386/avx512fp16-vcvtsh2ss-1b.c: Ditto. * gcc.target/i386/avx512fp16-vcvtss2sh-1a.c: Ditto. * gcc.target/i386/avx512fp16-vcvtss2sh-1b.c: Ditto.
2021-09-17AVX512FP16: Add vcvtsh2ss/vcvtsh2sd/vcvtss2sh/vcvtsd2sh.liuhongt10-1/+392
gcc/ChangeLog: * config/i386/avx512fp16intrin.h (_mm_cvtsh_ss): New intrinsic. (_mm_mask_cvtsh_ss): Likewise. (_mm_maskz_cvtsh_ss): Likewise. (_mm_cvtsh_sd): Likewise. (_mm_mask_cvtsh_sd): Likewise. (_mm_maskz_cvtsh_sd): Likewise. (_mm_cvt_roundsh_ss): Likewise. (_mm_mask_cvt_roundsh_ss): Likewise. (_mm_maskz_cvt_roundsh_ss): Likewise. (_mm_cvt_roundsh_sd): Likewise. (_mm_mask_cvt_roundsh_sd): Likewise. (_mm_maskz_cvt_roundsh_sd): Likewise. (_mm_cvtss_sh): Likewise. (_mm_mask_cvtss_sh): Likewise. (_mm_maskz_cvtss_sh): Likewise. (_mm_cvtsd_sh): Likewise. (_mm_mask_cvtsd_sh): Likewise. (_mm_maskz_cvtsd_sh): Likewise. (_mm_cvt_roundss_sh): Likewise. (_mm_mask_cvt_roundss_sh): Likewise. (_mm_maskz_cvt_roundss_sh): Likewise. (_mm_cvt_roundsd_sh): Likewise. (_mm_mask_cvt_roundsd_sh): Likewise. (_mm_maskz_cvt_roundsd_sh): Likewise. * config/i386/i386-builtin-types.def (V8HF_FTYPE_V2DF_V8HF_V8HF_UQI_INT, V8HF_FTYPE_V4SF_V8HF_V8HF_UQI_INT, V2DF_FTYPE_V8HF_V2DF_V2DF_UQI_INT, V4SF_FTYPE_V8HF_V4SF_V4SF_UQI_INT): Add new builtin types. * config/i386/i386-builtin.def: Add corrresponding new builtins. * config/i386/i386-expand.c: Handle new builtin types. * config/i386/sse.md (VF48_128): New mode iterator. (avx512fp16_vcvtsh2<ssescalarmodesuffix><mask_scalar_name><round_saeonly_scalar_name>): New. (avx512fp16_vcvt<ssescalarmodesuffix>2sh<mask_scalar_name><round_scalar_name>): Ditto. gcc/testsuite/ChangeLog: * gcc.target/i386/avx-1.c: Add test for new builtins. * gcc.target/i386/sse-13.c: Ditto. * gcc.target/i386/sse-23.c: Ditto. * gcc.target/i386/sse-14.c: Add test for new intrinsics. * gcc.target/i386/sse-22.c: Ditto.
2021-09-17AVX512FP16: Add testcase for vcvtph2pd/vcvtph2psx/vcvtpd2ph/vcvtps2phx.liuhongt17-6/+609
gcc/testsuite/ChangeLog: * gcc.target/i386/avx512fp16-helper.h (V512): Add DF contents. (src3f): New. * gcc.target/i386/avx512fp16-vcvtpd2ph-1a.c: New test. * gcc.target/i386/avx512fp16-vcvtpd2ph-1b.c: Ditto. * gcc.target/i386/avx512fp16-vcvtph2pd-1a.c: Ditto. * gcc.target/i386/avx512fp16-vcvtph2pd-1b.c: Ditto. * gcc.target/i386/avx512fp16-vcvtph2psx-1a.c: Ditto. * gcc.target/i386/avx512fp16-vcvtph2psx-1b.c: Ditto. * gcc.target/i386/avx512fp16-vcvtps2ph-1a.c: Ditto. * gcc.target/i386/avx512fp16-vcvtps2ph-1b.c: Ditto. * gcc.target/i386/avx512fp16vl-vcvtpd2ph-1a.c: Ditto. * gcc.target/i386/avx512fp16vl-vcvtpd2ph-1b.c: Ditto. * gcc.target/i386/avx512fp16vl-vcvtph2pd-1a.c: Ditto. * gcc.target/i386/avx512fp16vl-vcvtph2pd-1b.c: Ditto. * gcc.target/i386/avx512fp16vl-vcvtph2psx-1a.c: Ditto. * gcc.target/i386/avx512fp16vl-vcvtph2psx-1b.c: Ditto. * gcc.target/i386/avx512fp16vl-vcvtps2ph-1a.c: Ditto. * gcc.target/i386/avx512fp16vl-vcvtps2ph-1b.c: Ditto.
2021-09-17AVX512FP16: Add vcvtph2pd/vcvtph2psx/vcvtpd2ph/vcvtps2phx.liuhongt11-9/+791
gcc/ChangeLog: * config/i386/avx512fp16intrin.h (_mm512_cvtph_pd): New intrinsic. (_mm512_mask_cvtph_pd): Likewise. (_mm512_maskz_cvtph_pd): Likewise. (_mm512_cvt_roundph_pd): Likewise. (_mm512_mask_cvt_roundph_pd): Likewise. (_mm512_maskz_cvt_roundph_pd): Likewise. (_mm512_cvtxph_ps): Likewise. (_mm512_mask_cvtxph_ps): Likewise. (_mm512_maskz_cvtxph_ps): Likewise. (_mm512_cvtx_roundph_ps): Likewise. (_mm512_mask_cvtx_roundph_ps): Likewise. (_mm512_maskz_cvtx_roundph_ps): Likewise. (_mm512_cvtxps_ph): Likewise. (_mm512_mask_cvtxps_ph): Likewise. (_mm512_maskz_cvtxps_ph): Likewise. (_mm512_cvtx_roundps_ph): Likewise. (_mm512_mask_cvtx_roundps_ph): Likewise. (_mm512_maskz_cvtx_roundps_ph): Likewise. (_mm512_cvtpd_ph): Likewise. (_mm512_mask_cvtpd_ph): Likewise. (_mm512_maskz_cvtpd_ph): Likewise. (_mm512_cvt_roundpd_ph): Likewise. (_mm512_mask_cvt_roundpd_ph): Likewise. (_mm512_maskz_cvt_roundpd_ph): Likewise. * config/i386/avx512fp16vlintrin.h (_mm_cvtph_pd): New intrinsic. (_mm_mask_cvtph_pd): Likewise. (_mm_maskz_cvtph_pd): Likewise. (_mm256_cvtph_pd): Likewise. (_mm256_mask_cvtph_pd): Likewise. (_mm256_maskz_cvtph_pd): Likewise. (_mm_cvtxph_ps): Likewise. (_mm_mask_cvtxph_ps): Likewise. (_mm_maskz_cvtxph_ps): Likewise. (_mm256_cvtxph_ps): Likewise. (_mm256_mask_cvtxph_ps): Likewise. (_mm256_maskz_cvtxph_ps): Likewise. (_mm_cvtxps_ph): Likewise. (_mm_mask_cvtxps_ph): Likewise. (_mm_maskz_cvtxps_ph): Likewise. (_mm256_cvtxps_ph): Likewise. (_mm256_mask_cvtxps_ph): Likewise. (_mm256_maskz_cvtxps_ph): Likewise. (_mm_cvtpd_ph): Likewise. (_mm_mask_cvtpd_ph): Likewise. (_mm_maskz_cvtpd_ph): Likewise. (_mm256_cvtpd_ph): Likewise. (_mm256_mask_cvtpd_ph): Likewise. (_mm256_maskz_cvtpd_ph): Likewise. * config/i386/i386-builtin.def: Add corresponding new builtins. * config/i386/i386-builtin-types.def: Add corresponding builtin types. * config/i386/i386-expand.c: Handle new builtin types. * config/i386/sse.md (VF4_128_8_256): New. (VF48H_AVX512VL): Ditto. (ssePHmode): Add HF vector modes. (castmode): Add new convertable modes. (qq2phsuff): Ditto. (ph2pssuffix): New. (avx512fp16_vcvt<castmode>2ph_<mode><mask_name><round_name>): Ditto. (avx512fp16_vcvt<castmode>2ph_<mode>): Ditto. (*avx512fp16_vcvt<castmode>2ph_<mode>): Ditto. (avx512fp16_vcvt<castmode>2ph_<mode>_mask): Ditto. (*avx512fp16_vcvt<castmode>2ph_<mode>_mask): Ditto. (*avx512fp16_vcvt<castmode>2ph_<mode>_mask_1): Ditto. (avx512fp16_float_extend_ph<mode>2<mask_name><round_saeonly_name>): Ditto. (avx512fp16_float_extend_ph<mode>2<mask_name>): Ditto. (*avx512fp16_float_extend_ph<mode>2_load<mask_name>): Ditto. (avx512fp16_float_extend_phv2df2<mask_name>): Ditto. (*avx512fp16_float_extend_phv2df2_load<mask_name>): Ditto. gcc/testsuite/ChangeLog: * gcc.target/i386/avx-1.c: Add test for new builtins. * gcc.target/i386/sse-13.c: Ditto. * gcc.target/i386/sse-23.c: Ditto. * gcc.target/i386/sse-14.c: Add test for new intrinsics. * gcc.target/i386/sse-22.c: Ditto.
2021-09-17AVX512FP16: Add vcvttsh2si/vcvttsh2usi.liuhongt16-0/+404
gcc/ChangeLog: * config/i386/avx512fp16intrin.h (_mm_cvttsh_i32): New intrinsic. (_mm_cvttsh_u32): Likewise. (_mm_cvtt_roundsh_i32): Likewise. (_mm_cvtt_roundsh_u32): Likewise. (_mm_cvttsh_i64): Likewise. (_mm_cvttsh_u64): Likewise. (_mm_cvtt_roundsh_i64): Likewise. (_mm_cvtt_roundsh_u64): Likewise. * config/i386/i386-builtin.def: Add corresponding new builtins. * config/i386/sse.md (avx512fp16_fix<fixunssuffix>_trunc<mode>2<round_saeonly_name>): New. gcc/testsuite/ChangeLog: * gcc.target/i386/avx512fp16-vcvttsh2si-1a.c: New test. * gcc.target/i386/avx512fp16-vcvttsh2si-1b.c: Ditto. * gcc.target/i386/avx512fp16-vcvttsh2si64-1a.c: Ditto. * gcc.target/i386/avx512fp16-vcvttsh2si64-1b.c: Ditto. * gcc.target/i386/avx512fp16-vcvttsh2usi-1a.c: Ditto. * gcc.target/i386/avx512fp16-vcvttsh2usi-1b.c: Ditto. * gcc.target/i386/avx512fp16-vcvttsh2usi64-1a.c: Ditto. * gcc.target/i386/avx512fp16-vcvttsh2usi64-1b.c: Ditto. * gcc.target/i386/avx-1.c: Add test for new builtins. * gcc.target/i386/sse-13.c: Ditto. * gcc.target/i386/sse-23.c: Ditto. * gcc.target/i386/sse-14.c: Add test for new intrinsics. * gcc.target/i386/sse-22.c: Ditto.
2021-09-17AVX512FP16: Add testcase for ↵liuhongt24-0/+881
vcvttph2w/vcvttph2uw/vcvttph2dq/vcvttph2udq/vcvttph2qq/vcvttph2uqq. gcc/testsuite/ChangeLog: * gcc.target/i386/avx512fp16-vcvttph2dq-1a.c: New test. * gcc.target/i386/avx512fp16-vcvttph2dq-1b.c: Ditto. * gcc.target/i386/avx512fp16-vcvttph2qq-1a.c: Ditto. * gcc.target/i386/avx512fp16-vcvttph2qq-1b.c: Ditto. * gcc.target/i386/avx512fp16-vcvttph2udq-1a.c: Ditto. * gcc.target/i386/avx512fp16-vcvttph2udq-1b.c: Ditto. * gcc.target/i386/avx512fp16-vcvttph2uqq-1a.c: Ditto. * gcc.target/i386/avx512fp16-vcvttph2uqq-1b.c: Ditto. * gcc.target/i386/avx512fp16-vcvttph2uw-1a.c: Ditto. * gcc.target/i386/avx512fp16-vcvttph2uw-1b.c: Ditto. * gcc.target/i386/avx512fp16-vcvttph2w-1a.c: Ditto. * gcc.target/i386/avx512fp16-vcvttph2w-1b.c: Ditto. * gcc.target/i386/avx512fp16vl-vcvttph2dq-1a.c: Ditto. * gcc.target/i386/avx512fp16vl-vcvttph2dq-1b.c: Ditto. * gcc.target/i386/avx512fp16vl-vcvttph2qq-1a.c: Ditto. * gcc.target/i386/avx512fp16vl-vcvttph2qq-1b.c: Ditto. * gcc.target/i386/avx512fp16vl-vcvttph2udq-1a.c: Ditto. * gcc.target/i386/avx512fp16vl-vcvttph2udq-1b.c: Ditto. * gcc.target/i386/avx512fp16vl-vcvttph2uqq-1a.c: Ditto. * gcc.target/i386/avx512fp16vl-vcvttph2uqq-1b.c: Ditto. * gcc.target/i386/avx512fp16vl-vcvttph2uw-1a.c: Ditto. * gcc.target/i386/avx512fp16vl-vcvttph2uw-1b.c: Ditto. * gcc.target/i386/avx512fp16vl-vcvttph2w-1a.c: Ditto. * gcc.target/i386/avx512fp16vl-vcvttph2w-1b.c: Ditto.
2021-09-17AVX512FP16: Add ↵liuhongt9-0/+1036
vcvttph2w/vcvttph2uw/vcvttph2dq/vcvttph2qq/vcvttph2udq/vcvttph2uqq gcc/ChangeLog: * config/i386/avx512fp16intrin.h (_mm512_cvttph_epi32): New intrinsic. (_mm512_mask_cvttph_epi32): Likewise. (_mm512_maskz_cvttph_epi32): Likewise. (_mm512_cvtt_roundph_epi32): Likewise. (_mm512_mask_cvtt_roundph_epi32): Likewise. (_mm512_maskz_cvtt_roundph_epi32): Likewise. (_mm512_cvttph_epu32): Likewise. (_mm512_mask_cvttph_epu32): Likewise. (_mm512_maskz_cvttph_epu32): Likewise. (_mm512_cvtt_roundph_epu32): Likewise. (_mm512_mask_cvtt_roundph_epu32): Likewise. (_mm512_maskz_cvtt_roundph_epu32): Likewise. (_mm512_cvttph_epi64): Likewise. (_mm512_mask_cvttph_epi64): Likewise. (_mm512_maskz_cvttph_epi64): Likewise. (_mm512_cvtt_roundph_epi64): Likewise. (_mm512_mask_cvtt_roundph_epi64): Likewise. (_mm512_maskz_cvtt_roundph_epi64): Likewise. (_mm512_cvttph_epu64): Likewise. (_mm512_mask_cvttph_epu64): Likewise. (_mm512_maskz_cvttph_epu64): Likewise. (_mm512_cvtt_roundph_epu64): Likewise. (_mm512_mask_cvtt_roundph_epu64): Likewise. (_mm512_maskz_cvtt_roundph_epu64): Likewise. (_mm512_cvttph_epi16): Likewise. (_mm512_mask_cvttph_epi16): Likewise. (_mm512_maskz_cvttph_epi16): Likewise. (_mm512_cvtt_roundph_epi16): Likewise. (_mm512_mask_cvtt_roundph_epi16): Likewise. (_mm512_maskz_cvtt_roundph_epi16): Likewise. (_mm512_cvttph_epu16): Likewise. (_mm512_mask_cvttph_epu16): Likewise. (_mm512_maskz_cvttph_epu16): Likewise. (_mm512_cvtt_roundph_epu16): Likewise. (_mm512_mask_cvtt_roundph_epu16): Likewise. (_mm512_maskz_cvtt_roundph_epu16): Likewise. * config/i386/avx512fp16vlintrin.h (_mm_cvttph_epi32): New intirnsic. (_mm_mask_cvttph_epi32): Likewise. (_mm_maskz_cvttph_epi32): Likewise. (_mm256_cvttph_epi32): Likewise. (_mm256_mask_cvttph_epi32): Likewise. (_mm256_maskz_cvttph_epi32): Likewise. (_mm_cvttph_epu32): Likewise. (_mm_mask_cvttph_epu32): Likewise. (_mm_maskz_cvttph_epu32): Likewise. (_mm256_cvttph_epu32): Likewise. (_mm256_mask_cvttph_epu32): Likewise. (_mm256_maskz_cvttph_epu32): Likewise. (_mm_cvttph_epi64): Likewise. (_mm_mask_cvttph_epi64): Likewise. (_mm_maskz_cvttph_epi64): Likewise. (_mm256_cvttph_epi64): Likewise. (_mm256_mask_cvttph_epi64): Likewise. (_mm256_maskz_cvttph_epi64): Likewise. (_mm_cvttph_epu64): Likewise. (_mm_mask_cvttph_epu64): Likewise. (_mm_maskz_cvttph_epu64): Likewise. (_mm256_cvttph_epu64): Likewise. (_mm256_mask_cvttph_epu64): Likewise. (_mm256_maskz_cvttph_epu64): Likewise. (_mm_cvttph_epi16): Likewise. (_mm_mask_cvttph_epi16): Likewise. (_mm_maskz_cvttph_epi16): Likewise. (_mm256_cvttph_epi16): Likewise. (_mm256_mask_cvttph_epi16): Likewise. (_mm256_maskz_cvttph_epi16): Likewise. (_mm_cvttph_epu16): Likewise. (_mm_mask_cvttph_epu16): Likewise. (_mm_maskz_cvttph_epu16): Likewise. (_mm256_cvttph_epu16): Likewise. (_mm256_mask_cvttph_epu16): Likewise. (_mm256_maskz_cvttph_epu16): Likewise. * config/i386/i386-builtin.def: Add new builtins. * config/i386/sse.md (avx512fp16_fix<fixunssuffix>_trunc<mode>2<mask_name><round_saeonly_name>): New. (avx512fp16_fix<fixunssuffix>_trunc<mode>2<mask_name>): Ditto. (*avx512fp16_fix<fixunssuffix>_trunc<mode>2_load<mask_name>): Ditto. (avx512fp16_fix<fixunssuffix>_truncv2di2<mask_name>): Ditto. (avx512fp16_fix<fixunssuffix>_truncv2di2_load<mask_name>): Ditto. gcc/testsuite/ChangeLog: * gcc.target/i386/avx-1.c: Add test for new builtins. * gcc.target/i386/sse-13.c: Ditto. * gcc.target/i386/sse-23.c: Ditto. * gcc.target/i386/sse-14.c: Add test for new intrinsics. * gcc.target/i386/sse-22.c: Ditto.
2021-09-17AVX512FP16: Add testcase for vcvtsh2si/vcvtsh2usi/vcvtsi2sh/vcvtusi2sh.liuhongt17-0/+509
gcc/testsuite/ChangeLog: * gcc.target/i386/avx512fp16-helper.h (V512): Add int32 component. * gcc.target/i386/avx512fp16-vcvtsh2si-1a.c: New test. * gcc.target/i386/avx512fp16-vcvtsh2si-1b.c: Ditto. * gcc.target/i386/avx512fp16-vcvtsh2si64-1a.c: Ditto. * gcc.target/i386/avx512fp16-vcvtsh2si64-1b.c: Ditto. * gcc.target/i386/avx512fp16-vcvtsh2usi-1a.c: Ditto. * gcc.target/i386/avx512fp16-vcvtsh2usi-1b.c: Ditto. * gcc.target/i386/avx512fp16-vcvtsh2usi64-1a.c: Ditto. * gcc.target/i386/avx512fp16-vcvtsh2usi64-1b.c: Ditto. * gcc.target/i386/avx512fp16-vcvtsi2sh-1a.c: Ditto. * gcc.target/i386/avx512fp16-vcvtsi2sh-1b.c: Ditto. * gcc.target/i386/avx512fp16-vcvtsi2sh64-1a.c: Ditto. * gcc.target/i386/avx512fp16-vcvtsi2sh64-1b.c: Ditto. * gcc.target/i386/avx512fp16-vcvtusi2sh-1a.c: Ditto. * gcc.target/i386/avx512fp16-vcvtusi2sh-1b.c: Ditto. * gcc.target/i386/avx512fp16-vcvtusi2sh64-1a.c: Ditto. * gcc.target/i386/avx512fp16-vcvtusi2sh64-1b.c: Ditto.
2021-09-17AVX512FP16: Add vcvtsh2si/vcvtsh2usi/vcvtsi2sh/vcvtusi2sh.liuhongt10-0/+265
gcc/ChangeLog: * config/i386/avx512fp16intrin.h (_mm_cvtsh_i32): New intrinsic. (_mm_cvtsh_u32): Likewise. (_mm_cvt_roundsh_i32): Likewise. (_mm_cvt_roundsh_u32): Likewise. (_mm_cvtsh_i64): Likewise. (_mm_cvtsh_u64): Likewise. (_mm_cvt_roundsh_i64): Likewise. (_mm_cvt_roundsh_u64): Likewise. (_mm_cvti32_sh): Likewise. (_mm_cvtu32_sh): Likewise. (_mm_cvt_roundi32_sh): Likewise. (_mm_cvt_roundu32_sh): Likewise. (_mm_cvti64_sh): Likewise. (_mm_cvtu64_sh): Likewise. (_mm_cvt_roundi64_sh): Likewise. (_mm_cvt_roundu64_sh): Likewise. * config/i386/i386-builtin-types.def: Add corresponding builtin types. * config/i386/i386-builtin.def: Add corresponding new builtins. * config/i386/i386-expand.c (ix86_expand_round_builtin): Handle new builtin types. * config/i386/sse.md (avx512fp16_vcvtsh2<sseintconvertsignprefix>si<rex64namesuffix><round_name>): New define_insn. (avx512fp16_vcvtsh2<sseintconvertsignprefix>si<rex64namesuffix>_2): Likewise. (avx512fp16_vcvt<floatsuffix>si2sh<rex64namesuffix><round_name>): Likewise. gcc/testsuite/ChangeLog: * gcc.target/i386/avx-1.c: Add test for new builtins. * gcc.target/i386/sse-13.c: Ditto. * gcc.target/i386/sse-23.c: Ditto. * gcc.target/i386/sse-14.c: Add test for new intrinsics. * gcc.target/i386/sse-22.c: Ditto.
2021-09-17Daily bump.GCC Administrator8-1/+519
2021-09-16libgo: update to go1.17.1 releaseIan Lance Taylor14-21/+154
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/350414
2021-09-17analyzer: Fix bootstrap with clangMaxim Blinov1-0/+1
gcc/analyzer/ChangeLog: PR bootstrap/102242 * engine.cc (INCLUDE_UNIQUE_PTR): Define.
2021-09-16libstdc++: Regenerate the src/debug Makefiles as neededJonathan Wakely2-2/+2
When the build configuration changes and Makefiles are recreated, the src/debug/Makefile and src/debug/*/Makefile files are not recreated, because they're not managed in the usual way by automake. This can lead to build failures or surprising inconsistencies between the main and debug versions of the library when doing incremental builds. This causes them to be regenerated if any of the corresponding non-debug makefiles is newer. Signed-off-by: Jonathan Wakely <jwakely@redhat.com> libstdc++-v3/ChangeLog: * src/Makefile.am (stamp-debug): Add all Makefiles as prerequisites. * src/Makefile.in: Regenerate.
2021-09-16libstdc++: Increase timeout factor for slow pb_ds testsJonathan Wakely2-2/+2
Compiling these tests still times out too often when running the testsuite with more parallel jobs than there are available cores. Signed-off-by: Jonathan Wakely <jwakely@redhat.com> libstdc++-v3/ChangeLog: * testsuite/ext/pb_ds/regression/tree_map_rand.cc: Increase timeout factor to 3. * testsuite/ext/pb_ds/regression/tree_set_rand.cc: Likewise.
2021-09-16libstdc++: Update documentation that only refers to c++98 and c++11Jonathan Wakely2-2/+2
Signed-off-by: Jonathan Wakely <jwakely@redhat.com> libstdc++-v3/ChangeLog: * doc/xml/manual/using.xml: Generalize to apply to more than just -std=c++11. * doc/html/manual/using_macros.html: Regenerate.
2021-09-16libstdc++: Add noexcept to std::nullopt_t constructorJonathan Wakely1-1/+1
Signed-off-by: Jonathan Wakely <jwakely@redhat.com> libstdc++-v3/ChangeLog: * include/std/optional (nullptr_t): Make constructor noexcept.
2021-09-16libstdc++: Remove non-deducible parameter for std::advance overloadJonathan Wakely1-1/+1
This was just a copy and paste error. Signed-off-by: Jonathan Wakely <jwakely@redhat.com> libstdc++-v3/ChangeLog: * include/bits/fs_path.h (advance): Remove non-deducible template parameter.
2021-09-16libstdc++: Add missing 'constexpr' to std::tuple [PR102270]Jonathan Wakely2-0/+77
Signed-off-by: Jonathan Wakely <jwakely@redhat.com> libstdc++-v3/ChangeLog: PR libstdc++/102270 * include/std/tuple (_Head_base, _Tuple_impl): Add _GLIBCXX20_CONSTEXPR to allocator-extended constructors. (tuple<>::swap(tuple&)): Add _GLIBCXX20_CONSTEXPR. * testsuite/20_util/tuple/cons/102270.C: New test.
2021-09-16libstdc++: Add missing constraint to std::span deduction guide [PR102280]Jonathan Wakely1-1/+1
Signed-off-by: Jonathan Wakely <jwakely@redhat.com> libstdc++-v3/ChangeLog: PR libstdc++/102280 * include/std/span (span(Range&&)): Add constraint to deduction guide.
2021-09-16libstdc++: Fix recipes for C++11-compiled files in src/c++98Jonathan Wakely2-4/+4
Signed-off-by: Jonathan Wakely <jwakely@redhat.com> libstdc++-v3/ChangeLog: * src/c++98/Makefile.am: Use CXXCOMPILE not LTCXXCOMPILE. * src/c++98/Makefile.in: Regenerate.
2021-09-16libstdc++: Add noexcept to std::to_string overloads that don't allocateJonathan Wakely1-0/+12
When the values is guaranteed to fit in the SSO buffer we know the string won't allocate, so the function can be noexcept. For 32-bit integers, we know they need no more than 9 bytes (or 10 with a minus sign) and the SSO buffer is 15 bytes. Signed-off-by: Jonathan Wakely <jwakely@redhat.com> libstdc++-v3/ChangeLog: * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI] (to_string): Add noexcept if the type width is 32 bits or less.
2021-09-16libstdc++: Add noexcept to unique_ptr accessorsJonathan Wakely1-4/+4
Signed-off-by: Jonathan Wakely <jwakely@redhat.com> libstdc++-v3/ChangeLog: * include/bits/unique_ptr.h (__uniq_ptr_impl::_M_ptr) (__uniq_ptr_impl::_M_deleter): Add noexcept.
2021-09-16libstdc++: Fix UB in atomic_ref/wait_notify.cc [PR101761]Thomas Rodgers1-4/+3
Remove UB in atomic_ref/wait_notify test. Signed-off-by: Thomas Rodgers <trodgers@redhat.com> libstdc++-v3/ChangeLog: PR libstdc++/101761 * testsuite/29_atomics/atomic_ref/wait_notify.cc (test): Use va and vb as arguments to wait/notify, remove unused bb local.
2021-09-16rs6000: Handle overloads during program parsingBill Schmidt3-1/+1132
Although this patch looks quite large, the changes are fairly minimal. Most of it is duplicating the large function that does the overload resolution using the automatically generated data structures instead of the old hand-generated ones. This doesn't make the patch terribly easy to review, unfortunately. Just be aware that generally we aren't changing the logic and functionality of overload handling. 2021-09-16 Bill Schmidt <wschmidt@linux.ibm.com> gcc/ * config/rs6000/rs6000-c.c (rs6000-builtins.h): New include. (altivec_resolve_new_overloaded_builtin): New forward decl. (rs6000_new_builtin_type_compatible): New function. (altivec_resolve_overloaded_builtin): Call altivec_resolve_new_overloaded_builtin. (altivec_build_new_resolved_builtin): New function. (altivec_resolve_new_overloaded_builtin): Likewise. * config/rs6000/rs6000-call.c (rs6000_new_builtin_is_supported): Likewise. * config/rs6000/rs6000-gen-builtins.c (write_decls): Remove _p from name of rs6000_new_builtin_is_supported.
2021-09-16c++: constrained variable template issues [PR98486]Patrick Palka6-4/+56
This fixes some issues with constrained variable templates: - Constraints aren't checked when explicitly specializing a variable template. - Constraints aren't attached to a static data member template at parse time. - Constraints don't get propagated when (partially) instantiating a static data member template, so we need to make sure to look up constraints using the most general template during satisfaction. PR c++/98486 gcc/cp/ChangeLog: * constraint.cc (get_normalized_constraints_from_decl): Always look up constraints using the most general template. * decl.c (grokdeclarator): Set constraints on a static data member template. * pt.c (determine_specialization): Check constraints on a variable template. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-var-templ1.C: New test. * g++.dg/cpp2a/concepts-var-templ1a.C: New test. * g++.dg/cpp2a/concepts-var-templ1b.C: New test.
2021-09-16Fortran - fix handling of optional allocatable DT arguments with INTENT(OUT)Harald Anlauf2-0/+35
gcc/fortran/ChangeLog: PR fortran/102287 * trans-expr.c (gfc_conv_procedure_call): Wrap deallocation of allocatable components of optional allocatable derived type procedure arguments with INTENT(OUT) into a presence check. gcc/testsuite/ChangeLog: PR fortran/102287 * gfortran.dg/intent_out_14.f90: New test.
2021-09-16Fix PR 67102: Add libstdc++ dependancy to libffiAndrew Pinski2-0/+2
The error message is obvious -funconfigured-libstdc++-v3 is used on the g++ command line. So we just add the dependancy. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. ChangeLog: PR bootstrap/67102 * Makefile.def: Have configure-target-libffi depend on all-target-libstdc++-v3. * Makefile.in: Regenerate.
2021-09-16[i386] Change ix86_decompose_address return type to bool.Uros Bizjak2-25/+25
After a recent change only a boolean value is returned. 2021-09-16 Uroš Bizjak <ubizjak@gmail.com> gcc/ * config/i386/i386-protos.h (ix86_decompose_address): Change return type to bool. * config/i386/i386.c (ix86_decompose_address): Ditto.
2021-09-16PowerPC: Fix rs6000-gen-builtins with build != host [PR102353]Tobias Burnus1-10/+7
This mimics what the main Makefile.in does: compile the generator files under build (with Makefile.in's 'build/%.o' rule for compilation). It also adds $(RUN_GEN) to optionally run it with valgrind and the $(build_exeext) suffix. Before, the .o files were compiled with $(COMPILE), causing link error with $(LINKER_FOR_BUILD) for build != host. gcc/ PR target/102353 * config/rs6000/t-rs6000 (build/rs6000-gen-builtins.o, build/rbtree.o): Added 'build/' to target, use build/%.o rule. (build/rs6000-gen-builtins$(build_exeext)): Add 'build/' and '$(build_exeext)' to target and 'build/' for the *.o files. (rs6000-builtins.c): Update for those changes; run rs6000-gen-builtins with $(RUN_GEN).
2021-09-16cgraph: Do not warn about caller count mismatches of removed functionsMartin Jambor1-2/+2
To verify other changes in the patch series, I have been searching for "Invalid sum of caller counts" string in symtab dump but found that there are false warnings about functions which have their body removed because they are now unreachable. Those are of course invalid and so this patches avoids checking such cgraph_nodes. gcc/ChangeLog: 2021-08-20 Martin Jambor <mjambor@suse.cz> * cgraph.c (cgraph_node::dump): Do not check caller count sums if the body has been removed. Remove trailing whitespace.
2021-09-16coroutines: Small cleanups to await_statement_walker [NFC].Iain Sandoe1-66/+59
There is no need to make a MODIFY_EXPR for any of the condition vars that we synthesize. Expansion of co_return can be carried out independently of any co_awaits that might be contained which simplifies this. Where we are rewriting statements to handle await expression logic, there is no need to carry out any analysis - we just need to detect the presence of any co_await. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> gcc/cp/ChangeLog: * coroutines.cc (await_statement_walker): Code cleanups.
2021-09-16middle-end/102360 - adjust .DEFERRED_INIT expansionRichard Biener2-15/+64
This avoids using native_interpret_type when we cannot do it with the original type of the variable, instead use an integer type for the initialization and side-step the size limitation of native_interpret_int. 2021-09-16 Richard Biener <rguenther@suse.de> PR middle-end/102360 * internal-fn.c (expand_DEFERRED_INIT): Make pattern-init of non-memory more robust. * g++.dg/pr102360.C: New testcase.
2021-09-16sparc: Add scheduling information for LEON5Daniel Cederman7-22/+220
The LEON5 can often dual issue instructions from the same 64-bit aligned double word if there are no data dependencies. Add scheduling information to avoid scheduling unpairable instructions back-to-back. gcc/ChangeLog: * config/sparc/sparc-opts.h (enum sparc_processor_type): Add LEON5 * config/sparc/sparc.c (struct processor_costs): Add LEON5 costs (leon5_adjust_cost): Increase cost of store with data dependency on ALU instruction and FPU anti-dependencies. (sparc_option_override): Add LEON5 costs (sparc_adjust_cost): Add LEON5 cost adjustments * config/sparc/sparc.h: Add LEON5 * config/sparc/sparc.md: Include LEON5 scheduling information * config/sparc/sparc.opt: Add LEON5 * doc/invoke.texi: Add LEON5 * config/sparc/leon5.md: New file.
2021-09-16sparc: Add NOP in stack_protect_set32 if sparc_fix_b2bst enabledDaniel Cederman1-2/+8
This is needed to prevent the Store -> (Non-store or load) -> Store sequence. gcc/ChangeLog: * config/sparc/sparc.md (stack_protect_set32): Add NOP to prevent sensitive sequence for B2BST errata workaround.
2021-09-16sparc: Prevent atomic instructions in beginning of functions for UT700Daniel Cederman1-0/+11
A call to the function might have a load instruction in the delay slot and a load followed by an atomic function could cause a deadlock. gcc/ChangeLog: * config/sparc/sparc.c (sparc_do_work_around_errata): Do not begin functions with atomic instruction in the UT700 errata workaround.
2021-09-16sparc: Skip all empty assembly statementsDaniel Cederman1-14/+21
This version detects multiple empty assembly statements in a row and also detects non-memory barrier empty assembly statements (__asm__("")). It can be used instead of next_active_insn(). gcc/ChangeLog: * config/sparc/sparc.c (next_active_non_empty_insn): New function that returns next active non empty assembly instruction. (sparc_do_work_around_errata): Use new function.