Re: [PATCH 3/3] Power10: Add tests for PCREL_OPT support.

2020-08-17 Thread Michael Meissner via Gcc-patches
[PATCH 3/3] Power10: Add tests for PCREL_OPT support. These are the tests for the PCREL_OPT support. gcc/testsuite/ 2020-08-18 Michael Meissner * gcc.target/powerpc/pcrel-opt-inc-di.c: New PCREL_OPT test. * gcc.target/powerpc/pcrel-opt-ld-df.c: New PCREL_OPT test. * gc

Re: [PATCH 2/3] Power10: Add PCREL_OPT store support.

2020-08-17 Thread Michael Meissner via Gcc-patches
[PATCH 2/3] Power10: Add PCREL_OPT store support. This patch adds support for optimizing power10 stores to an external variable to eliminate loading the address of the variable, and then doing a subsequent store using that address. I have built compilers with and without these set of 3 patches do

Re: [PATCH 1/3] Power10: Add PCREL_OPT load support

2020-08-17 Thread Michael Meissner via Gcc-patches
[PATCH 1/3] Power10: Add PCREL_OPT load support. This patch adds support for optimizing power10 loads of an external variable to eliminate loading the address of the variable, and then doing a subsequent load using that address. I have built compilers with and without these set of 3 patches doing

[PATCH 0/3] Power10 PCREL_OPT support

2020-08-17 Thread Michael Meissner via Gcc-patches
The ELF-v2 ISA 3.1 support for Power10 has relocations to optimize cases where the code is references an external variable in only one location. This patch is similar to the optimizations that the linker already does to optimize TOC accesses. I will be submitting 3 patches as follow-ups to this m

Re: [PATCH]Don't use pinsr for struct initialization.

2020-08-17 Thread Uros Bizjak via Gcc-patches
On Tue, Aug 18, 2020 at 4:23 AM Hongtao Liu wrote: > > On Fri, Aug 14, 2020 at 5:57 PM Uros Bizjak wrote: > > > > On Fri, Aug 14, 2020 at 8:03 AM Hongtao Liu wrote: > > > > > > Hi: > > > For struct initialization, when it fits in a TImode, gcc will use > > > pinsr insn which causes poor codege

RE: [PATCH] AArch64: Add if condition in aarch64_function_value [PR96479]

2020-08-17 Thread qiaopeixin
Hi Richard, Thanks for the review and explanation. The previous fix adding if condition of TARGET_FLOAT does crash glibc-2.29. I checked the past log of writing the function aarch64_init_cumulative_args, and did not find the reason why Alan Lawrence added TREE_PUBLIC (fndecl) as one condition

Re: [PATCH v2] C-SKY: Support -mfloat-abi=hard.

2020-08-17 Thread Cooper Qu via Gcc-patches
Hi Jojo, Nowhere is this rule directly stated. But there are indent options showed in https://www.gnu.org/prep/standards/html_node/Formatting.html#Formatting corresponding to recommendations of C formatting style, which use the defualt 8 clumns tab wide. On 8/18/20 9:42 AM, Jojo R wrote:

Re: [PATCH]Don't use pinsr for struct initialization.

2020-08-17 Thread Hongtao Liu via Gcc-patches
On Fri, Aug 14, 2020 at 5:57 PM Uros Bizjak wrote: > > On Fri, Aug 14, 2020 at 8:03 AM Hongtao Liu wrote: > > > > Hi: > > For struct initialization, when it fits in a TImode, gcc will use > > pinsr insn which causes poor codegen described in PR93897 and PR96562. > > You should probably remove T

Re: [PATCH v2] C-SKY: Support -mfloat-abi=hard.

2020-08-17 Thread Jojo R
Hi, Is there coding rule with it ? I can not find it from  https://www.gnu.org/prep/standards/html_node/index.html and https://gcc.gnu.org/codingconventions.html Could you give me any hints ? Thanks. Jojo 在 2020年8月17日 +0800 PM11:05,Xianmiao Qu ,写道: > Hi

[committed] analyzer: fix name of local in region_model::get_rvalue_1

2020-08-17 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to master as da7c2773e56c889f4f131b80d4b91f1adbae80a2. gcc/analyzer/ChangeLog: * region-model.cc (region_model::get_rvalue_1): Fix name of local. --- gcc/analyzer/region-model.cc | 4 ++-- 1 file changed, 2 insertions(+

[committed] analyzer: fix ICE on unhandled tree codes in get_rvalue_1 [PR96641]

2020-08-17 Thread David Malcolm via Gcc-patches
The old implementation of region_model::get_rvalue_1 gracefully handled tree codes it didn't understand, returning "UNKNOWN", whereas the new implementation (r11-2694-g808f4dfeb3a95f50f15e71148e5c1067f90a126d) had an assertion left over from development, leading to ICEs. This patch restores the ol

[committed] analyzer: fix ICE on unhandled tree codes in gassign [PR96640]

2020-08-17 Thread David Malcolm via Gcc-patches
PR analyzer/96640 reports a ICE within region_model::on_assignment when failing to handle a WIDEN_MULT_EVEN_EXPR, and various other tree codes. The old implementation of region_model::on_assignment gracefully handled tree codes it didn't understand, returning "UNKNOWN", whereas the new implementat

Go patch committed: Export thunks referenced by inline functions

2020-08-17 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go fronted exports thunks referenced by inline functions. Otherwise we get a link time error. The test case is https://golang.org/cl/248637. This fixes https://golang.org/issue/40252. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline and GCC 10 b

Re: [PATCH] libibery/hashtab: add new functions

2020-08-17 Thread Ian Lance Taylor via Gcc-patches
On Mon, Aug 17, 2020 at 7:06 AM Martin Liška wrote: > > Adding libiberty maintainer to CC. I guess I'm not sure why either of these belong in libiberty. htab_insert can be written elsewhere as needed. And while perhaps some sort of stats API would be reasonable, I don't think it should be someth

Re: [PATCH] bb-reorder: Remove a misfiring micro-optimization (PR96475)

2020-08-17 Thread Segher Boessenkool
Ping (added some Cc:s). Thanks in advance, Segher On Fri, Aug 07, 2020 at 09:51:04PM +, Segher Boessenkool wrote: > When the compgotos pass copies the tail of blocks ending in an indirect > jump, there is a micro-optimization to not copy the last one, since the > original block will then j

Re: [PATCH] middle-end: Fix PR middle-end/85811: Introduce tree_expr_maybe_nan_p et al.

2020-08-17 Thread Segher Boessenkool
On Mon, Aug 17, 2020 at 10:31:08PM +, Joseph Myers wrote: > On Sat, 15 Aug 2020, Segher Boessenkool wrote: > > On Sat, Aug 15, 2020 at 12:10:42PM +0100, Roger Sayle wrote: > > > I'll quote Joseph Myers (many thanks) who describes things clearly as: > > > > (a) When both arguments are NaNs, the

Re: [RFC PATCH v1 1/1] PPC64: Implement POWER Architecture Vector Function ABI.

2020-08-17 Thread Segher Boessenkool
On Mon, Aug 17, 2020 at 06:05:09PM -0400, David Edelsohn wrote: > The Power Vector ABI is available at > > https://github.com/power8-abi-doc/vector-function-abi > > It apparently did not attach correctly to the sourceware wiki or the > filename is different. Thanks! Segher

Re: [PATCH] rs6000: unaligned VSX in memcpy/memmove expansion

2020-08-17 Thread Segher Boessenkool
Hi! On Fri, Aug 14, 2020 at 05:59:05PM -0500, Aaron Sawdey via Gcc-patches wrote: > +static rtx > +gen_lxvl_stxvl_move (rtx dest, rtx src, int length) > +{ > + gcc_assert (MEM_P (dest) ^ MEM_P (src)); Maybe just "!="? > + gcc_assert (GET_MODE (dest) == V16QImode && GET_MODE (src) == V16QImode)

Re: [PATCH] middle-end: Fix PR middle-end/85811: Introduce tree_expr_maybe_nan_p et al.

2020-08-17 Thread Joseph Myers
On Sat, 15 Aug 2020, Segher Boessenkool wrote: > Hi! > > On Sat, Aug 15, 2020 at 12:10:42PM +0100, Roger Sayle wrote: > > I'll quote Joseph Myers (many thanks) who describes things clearly as: > > > (a) When both arguments are NaNs, the return value should be a qNaN, > > > but sometimes it is an

Re: [PATCH] c: Fix -Wunused-but-set-* warning with _Generic [PR96571]

2020-08-17 Thread Joseph Myers
On Fri, 14 Aug 2020, Jakub Jelinek via Gcc-patches wrote: > Hi! > > The following testcase shows various problems with -Wunused-but-set* > warnings and _Generic construct. I think it is best to treat the selector > and the ignored expressions as (potentially) read, because when they are > parsed

Re: [PATCH 2/5] C front end support to detect out-of-bounds accesses to array parameters

2020-08-17 Thread Joseph Myers
On Thu, 13 Aug 2020, Martin Sebor via Gcc-patches wrote: > > * Maybe cdk_pointer is followed by cdk_attrs before cdk_id. In this case > > the code won't return. > > I think I see the problem you're pointing out (I just don't see how > to trigger it or test that it doesn't happen). If the tweak

Re: [RFC PATCH v1 1/1] PPC64: Implement POWER Architecture Vector Function ABI.

2020-08-17 Thread David Edelsohn via Gcc-patches
The Power Vector ABI is available at https://github.com/power8-abi-doc/vector-function-abi It apparently did not attach correctly to the sourceware wiki or the filename is different. Thanks, David On Mon, Aug 17, 2020 at 1:44 PM GT wrote: > > ‐‐‐ Original Message ‐‐‐ > On Thursday, Aug

Re: [RFC PATCH v1 1/1] PPC64: Implement POWER Architecture Vector Function ABI.

2020-08-17 Thread Segher Boessenkool
On Mon, Aug 17, 2020 at 05:44:46PM +, GT wrote: > > This is about the Power binding to some OpenMP API, right? It has > > nothing to do with "vector" or "ABI" -- we have vectors already, and > > we have ABIs already, more than enough of each. > > > > It is very very VERY hard to review this wit

[PATCH] PR fortran/96613 - SIGFPE on min1() with -ffpe-trap=invalid switch

2020-08-17 Thread Harald Anlauf
While looking at the reported issue, it appeared that the Fortran frontend mishandled the conversion of functions of the MIN/MAX variety to inline code. At the same time, the simplification of expressions using a common and GNU extension (but non-standard) could result in inconsistent results. The

[committed] analyzer: fix ICE on NULL dereference [PR96644]

2020-08-17 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to master as r11-2725-gb00a83047574eb6f8d1e670ad439609125873506. gcc/analyzer/ChangeLog: PR analyzer/96644 * region-model-manager.cc (get_region_for_unexpected_tree_code): Handle ctxt being NULL. gcc/te

[committed] analyzer: fix ICE due to NULL type [PR96639]

2020-08-17 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to master as r11-2724-g42c5ae5d7f0ad89b75d93c497fe44b6c66da7e76. gcc/analyzer/ChangeLog: PR analyzer/96639 * region.cc (region::get_subregions_for_binding): Check for "type" being NULL. gcc/testsuite/Ch

[committed] analyzer: handle &STRING_CST in constant pool initializers [PR96642]

2020-08-17 Thread David Malcolm via Gcc-patches
In r11-2708-g2867118ddda9b56d991c16022f7d3d634ed08313 I added support to the analyzer for initialization from var_decls in the global constant pool. However, that commit didn't support initialization from ADDR_EXPR of a STRING_CST leading to an ICE seen in data-model-1.c and pr94639.c on arm and p

[committed] i386: Use parametrized pattern names some more.

2020-08-17 Thread Uros Bizjak via Gcc-patches
Use parameterized pattern names to simplify calling of named patterns. 2020-08-15 Uroš Bizjak gcc/ChangeLog: * config/i386/i386-builtin.def (__builtin_ia32_bextri_u32) (__builtin_ia32_bextri_u64): Use CODE_FOR_nothing. * config/i386/i386.md (@tbm_bextri_): Implement as paramet

[PATCH][Arm] Auto-vectorization for MVE: vsub

2020-08-17 Thread Dennis Zhang
Hi all, This patch enables MVE vsub instructions for auto-vectorization. It adds RTL templates for MVE vsub instructions using 'minus' instead of unspec expression to make the instructions recognizable for vectorization. MVE target is added in sub3 optab. The sub3 optab is modified to use a mod

RE: [PATCH] rs6000, restrict bfloat convert intrinsic to Power 10. Fix BU_P10V macro definitions.

2020-08-17 Thread Carl Love via Gcc-patches
Bill: On Mon, 2020-08-17 at 13:09 -0500, Bill Schmidt wrote: > > > > There are three prototypes __builtin_cfuged, __builtin_pdepd, > > __builtin_pextd defined in the document. > > > > The corresponding builtin definitions in GCC are: > > > > __builtin_altivec_cfuged, __builtin_altivec_pdep

Re: [EXTERNAL] Re: [PATCH] rs6000, restrict bfloat convert intrinsic to Power 10. Fix BU_P10V macro definitions.

2020-08-17 Thread Bill Schmidt via Gcc-patches
On 8/17/20 12:13 PM, Carl Love wrote: Segher, Bill, Peter: On Fri, 2020-08-14 at 19:42 -0500, Segher Boessenkool wrote: Do the names agree with the (future) documentation now? Did not double check on the documentation. Someone should... Looking at the box document "Proposed function Prototyp

Re: [PATCH] x86_64: PR rtl-optimization/92180: class_likely_spilled vs. cant_combine_insn.

2020-08-17 Thread Segher Boessenkool
Hi! On Mon, Aug 17, 2020 at 01:06:10PM +0200, Uros Bizjak wrote: > On Mon, Aug 17, 2020 at 12:42 PM Roger Sayle > wrote: > > (insn 14 7 15 2 (set (reg/i:SI 0 ax) > > (subreg:SI (reg:DI 84) 0)) "pr92180.c":5:1 67 {*movsi_internal} > > (expr_list:REG_DEAD (reg:DI 84) > > (nil)

Re: [RFC PATCH v1 1/1] PPC64: Implement POWER Architecture Vector Function ABI.

2020-08-17 Thread GT via Gcc-patches
‐‐‐ Original Message ‐‐‐ On Thursday, August 13, 2020 6:49 PM, Segher Boessenkool wrote: > Hi! > > This is about the Power binding to some OpenMP API, right? It has > nothing to do with "vector" or "ABI" -- we have vectors already, and > we have ABIs already, more than enough of each. >

Re: [PATCH][Hashtable 5/6] Remove H1/H2 template parameters

2020-08-17 Thread François Dumont via Gcc-patches
Hi     Here is the new proposal.     As we can't remove template parameters I simply restore those that I tried to pass differently _H2 and _ExtractKey, so eventually I only remove usage of _Hash which I renamed in _Unused. Maybe I can keep the doc about it in hashtable.h and just add a remar

RE: [PATCH] rs6000, restrict bfloat convert intrinsic to Power 10. Fix BU_P10V macro definitions.

2020-08-17 Thread Carl Love via Gcc-patches
Segher, Bill, Peter: On Fri, 2020-08-14 at 19:42 -0500, Segher Boessenkool wrote: > > > Do the names agree with the (future) documentation now? > > > > Did not double check on the documentation. > > Someone should... Looking at the box document "Proposed function Prototypes for P10". There are

Re: [Patch, fortran] PRs 96100 and 96101 - Problems with string lengths of array constructors

2020-08-17 Thread Andre Vehreschild
Hi Paul, > The fix for PR9601 is rather trivial and is the last chunk of the patch. > Finding the fix for PR96100 took a silly amount of time but it now looks > rather obvious. Trying to evaluate the string length by calling > gfc_conv_expr_descriptor, when this function is already failing to find

Re: PING: Fwd: [PATCH 2/2] Decouple adjust_range_from_scev from vr_values and value_range_equiv.

2020-08-17 Thread Andrew MacLeod via Gcc-patches
On 8/17/20 6:04 AM, Aldy Hernandez wrote: On 8/14/20 7:16 PM, Andrew MacLeod wrote: On 8/14/20 12:05 PM, Aldy Hernandez wrote: I made some minor changes to the function comments. gcc/ChangeLog: * vr-values.c (check_for_binary_op_overflow): Change type of store to range_query. (v

Re: [PATCH] rs6000: unaligned VSX in memcpy/memmove expansion

2020-08-17 Thread will schmidt via Gcc-patches
On Fri, 2020-08-14 at 17:59 -0500, Aaron Sawdey via Gcc-patches wrote: Hi, > This patch adds a few new instructions to inline expansion of > memcpy/memmove. Generation of all these is controlled by s/is/are/ ? > the option -mblock-ops-unaligned-vsx which is set on by default if the > target has

Re: [PATCH v2] C-SKY: Support -mfloat-abi=hard.

2020-08-17 Thread Xianmiao Qu
Hi Jojo, On 8/17/20 7:09 PM, Jojo R wrote: diff --git a/gcc/config/csky/csky.c b/gcc/config/csky/csky.c index 7ba3ed3..b71291a 100644 --- a/gcc/config/csky/csky.c +++ b/gcc/config/csky/csky.c @@ -328,6 +328,16 @@ csky_cpu_cpp_builtins (cpp_reader *pfile) { builtin_define ("__csky_

Re: [PATCH] improve memcmp and memchr constant folding (PR 78257)

2020-08-17 Thread Jeff Law via Gcc-patches
On Sat, 2020-08-15 at 16:19 +0200, Christophe Lyon wrote: > Hi Martin, > > > On Sat, 15 Aug 2020 at 01:14, Martin Sebor via Gcc-patches > wrote: > > On 8/13/20 11:44 AM, Martin Sebor wrote: > > > On 8/13/20 10:21 AM, Jeff Law wrote: > > > > On Fri, 2020-07-31 at 17:55 -0600, Martin Sebor via Gcc

Re: [PATCH] Add support for putting jump table into relocation read-only section

2020-08-17 Thread Segher Boessenkool
Hi! On Mon, Aug 17, 2020 at 10:28:31AM +0800, HAO CHEN GUI wrote: > >For the reloc,  my understanding is the jump table needs to be > >relocated if it's a non-relative jump table and PIC flag is set at the > >same time. Yes, I did say the *existing* code seems sub-optimal, too :-) > >According

[committed] libstdc++: Remove inheritance from elements in std::tuple

2020-08-17 Thread Jonathan Wakely via Gcc-patches
This fixes a number of std::tuple bugs by no longer making use of the empty base-class optimization. By using the C++20 [[no_unique_address]] attribute we can always store the element as a data member, while still compressing the layout of tuples containing empty types. Since we no longer use inhe

[PATCH 4/X] libsanitizer: options: Add hwasan flags and argument parsing

2020-08-17 Thread Matthew Malcomson
These flags can't be used at the same time as any of the other sanitizers. We add an equivalent flag to -static-libasan in -static-libhwasan to ensure static linking. The -fsanitize=kernel-hwaddress option is for compiling targeting the kernel. This flag has defaults that allow compiling KASAN wi

[PATCH 6/X] libsanitizer: Add hwasan pass and associated gimple changes

2020-08-17 Thread Matthew Malcomson
There are four main features to this change: 1) Check pointer tags match address tags. In the new `hwasan` pass we put HWASAN_CHECK internal functions before all memory accesses to check that tags in the pointer being used match the tag stored in shadow memory for the memory region being used. T

[PATCH 5/X] libsanitizer: mid-end: Introduce stack variable handling for HWASAN

2020-08-17 Thread Matthew Malcomson
Handling stack variables has three features. 1) Ensure HWASAN required alignment for stack variables When tagging shadow memory, we need to ensure that each tag granule is only used by one variable at a time. This is done by ensuring that each tagged variable is aligned to the tag granule repres

[PATCH 7/X] libsanitizer: Add tests

2020-08-17 Thread Matthew Malcomson
Adding hwasan tests. Only interesting thing here is that we have to make sure the tagging mechanism is deterministic to avoid flaky tests. gcc/testsuite/ChangeLog: * c-c++-common/hwasan/aligned-alloc.c: New test. * c-c++-common/hwasan/alloca-array-accessible.c: New test.

[PATCH 1/X] libsanitizer: Tie the hwasan library into our build system

2020-08-17 Thread Matthew Malcomson
This patch tries to tie libhwasan into the GCC build system in the same way that the other sanitizer runtime libraries are handled. libsanitizer/ChangeLog: * Makefile.am: Build libhwasan. * Makefile.in: Build libhwasan. * asan/Makefile.in: Build libhwasan. * con

[PATCH 2/X] libsanitizer: Only build libhwasan when targeting AArch64

2020-08-17 Thread Matthew Malcomson
Though the library has limited support for x86, we don't have any support for generating code targeting x86 so there is no point building for that target. libsanitizer/ChangeLog: * Makefile.am: Condition building hwasan directory. * Makefile.in: Regenerate. * configure: Re

[PATCH 3/X] libsanitizer: Add option to bootstrap using HWASAN

2020-08-17 Thread Matthew Malcomson
This is an analogous option to --bootstrap-asan to configure. It allows bootstrapping GCC using HWASAN. For the same reasons as for ASAN we have to avoid using the HWASAN sanitizer when compiling libiberty and the lto-plugin. Also add a function to query whether -fsanitize=hwaddress has been pas

Re: [PATCH] libibery/hashtab: add new functions

2020-08-17 Thread Martin Liška
Adding libiberty maintainer to CC. On 8/17/20 4:03 PM, Martin Liška wrote: Hey. I'm working on bintuils where I would like to port a hash table implementation in gas/hash.[ch] to libiberty one. But it would be handy for me to add 2 new functions. Thoughts? Thanks, Martin include/ChangeLog:

[PATCH] libibery/hashtab: add new functions

2020-08-17 Thread Martin Liška
Hey. I'm working on bintuils where I would like to port a hash table implementation in gas/hash.[ch] to libiberty one. But it would be handy for me to add 2 new functions. Thoughts? Thanks, Martin include/ChangeLog: * hashtab.h (htab_insert): New function. (htab_print_statisti

Re: [PATCH] Implement no_stack_protect attribute.

2020-08-17 Thread Martin Liška
PING^4 On 7/23/20 1:10 PM, Martin Liška wrote: PING^3 On 6/24/20 11:09 AM, Martin Liška wrote: PING^2 On 6/10/20 10:12 AM, Martin Liška wrote: PING^1 On 5/25/20 3:10 PM, Martin Liška wrote: On 5/21/20 4:53 PM, Martin Sebor wrote: On 5/21/20 5:28 AM, Martin Liška wrote: On 5/18/20 10:37 P

[PATCH] floatformat.h: Add bfloat16 support.

2020-08-17 Thread Felix Willgerodt via Gcc-patches
This change is motivated by a patchset that adds bfloat16 debugging support for new avx512 instructions to GDB. The gdb thread can be found here: https://sourceware.org/pipermail/gdb-patches/2020-July/170820.html include: 2020-08-17 Felix Willgerodt * floatformat.h (floatformat_bfloat1

Re: [PATCH] openmp: fix UBSAN error at gcc/fortran/openmp.c:4737

2020-08-17 Thread Tobias Burnus
On 8/17/20 11:15 AM, Martin Liška wrote: I'm suggesting one more clean up that uses static assert instead of a run-time check. I concur that compile-time checks are nicer. LGTM – it should be able catch this kind of mistakes. Tobias Thoughts? Martin 0001-opnemp-add-static-assert-for-claus

[PATCH v2] C-SKY: Support -mfloat-abi=hard.

2020-08-17 Thread Jojo R
gcc/ChangeLog: * config/csky/csky.md (CSKY_NPARM_FREGS): New. (call_value_internal_vs/d): New. (untyped_call): New. * config/csky/csky.h (TARGET_SINGLE_FPU): New. (TARGET_DOUBLE_FPU): New. (FUNCTION_VARG_REGNO_P): New. (CSKY_VREG_MODE_P): New

Re: [PATCH] x86_64: PR rtl-optimization/92180: class_likely_spilled vs. cant_combine_insn.

2020-08-17 Thread Uros Bizjak via Gcc-patches
On Mon, Aug 17, 2020 at 12:42 PM Roger Sayle wrote: > > > This patch catches a missed optimization opportunity where GCC currently > generates worse code than LLVM. The issue, as nicely analyzed in bugzilla, > boils down to the following three insns in combine: > > (insn 6 5 7 2 (parallel [ >

[PATCH] x86_64: PR rtl-optimization/92180: class_likely_spilled vs. cant_combine_insn.

2020-08-17 Thread Roger Sayle
This patch catches a missed optimization opportunity where GCC currently generates worse code than LLVM. The issue, as nicely analyzed in bugzilla, boils down to the following three insns in combine: (insn 6 5 7 2 (parallel [ (set (reg:DI 85) (ashift:DI (reg:DI 85)

Re: [PATCH 4/4][PR target/88808]Enable bitwise operator for AVX512 masks.

2020-08-17 Thread Uros Bizjak via Gcc-patches
On Fri, Aug 14, 2020 at 10:26 AM Hongtao Liu wrote: > > Enable operator or/xor/and/andn/not for mask register, kxnor is not > enabled since there's no corresponding instruction for general > registers. > > gcc/ > PR target/88808 > * config/i386/i386.md: (*movsi_internal): Adjust co

Re: PING: Fwd: [PATCH 2/2] Decouple adjust_range_from_scev from vr_values and value_range_equiv.

2020-08-17 Thread Aldy Hernandez via Gcc-patches
On 8/14/20 7:16 PM, Andrew MacLeod wrote: On 8/14/20 12:05 PM, Aldy Hernandez wrote: I made some minor changes to the function comments. gcc/ChangeLog: * vr-values.c (check_for_binary_op_overflow): Change type of store to range_query. (vr_values::adjust_range_with_scev): Abstract

Re: [PATCH 3/4][PR target/88808]Enable bitwise operator for AVX512 masks.

2020-08-17 Thread Uros Bizjak via Gcc-patches
On Fri, Aug 14, 2020 at 10:25 AM Hongtao Liu wrote: > > 1. Set cost of movement inside mask registers a bit higher than gpr's. > 2. Set cost of movement between mask register and gpr much higher than > movement >inside gpr, but still less equal than load/store. > 3. Set cost of mask register

Re: [PATCH 2/4][PR target/88808]Enable bitwise operator for AVX512 masks.

2020-08-17 Thread Uros Bizjak via Gcc-patches
On Fri, Aug 14, 2020 at 10:24 AM Hongtao Liu wrote: > > Enable direct move between masks and gprs in pass_reload with > consideration of cost model. > > Changelog > gcc/ > * config/i386/i386.c (inline_secondary_memory_needed): > No memory is needed between mask regs and gpr. >

Re: [PATCH 1/4][PR target/88808]Enable bitwise operator for AVX512 masks.

2020-08-17 Thread Uros Bizjak via Gcc-patches
On Fri, Aug 14, 2020 at 10:22 AM Hongtao Liu wrote: > > Hi: > First, since avx512 masks involve both vector isa and general part, > so i add both maintainers to the maillist. > > I'm doing this in 4 steps: > 1 - Add cost model for operation of mask registers. > 2 - Introduce new cover clas

Re: PING: Fwd: [PATCH 1/2] Add statement context to get_value_range.

2020-08-17 Thread Aldy Hernandez via Gcc-patches
On 8/14/20 6:03 PM, Andrew MacLeod wrote: On 8/11/20 7:53 AM, Aldy Hernandez via Gcc-patches wrote: -- Forwarded message - From: Aldy Hernandez Date: Tue, Aug 4, 2020, 13:55 Subject: [PATCH 1/2] Add statement context to get_value_range. To: Cc: , Aldy Hernandez This is in

Re: [PATCH] openmp: fix UBSAN error at gcc/fortran/openmp.c:4737

2020-08-17 Thread Martin Liška
On 8/17/20 10:52 AM, Tobias Burnus wrote: LGTM & thanks! – Sorry for missing it. That happens. (I re-checked against the OMP_LIST_* enum and it seems to be only missing one.) Good. I'm suggesting one more clean up that uses static assert instead of a run-time check. Thoughts? Martin >From

RE: [PATCH] driver: Fix several memory leaks

2020-08-17 Thread Alex Coplan
Ping^2. > -Original Message- > From: Gcc-patches On Behalf Of Alex > Coplan > Sent: 03 August 2020 16:02 > To: gcc-patches@gcc.gnu.org > Subject: RE: [PATCH] driver: Fix several memory leaks > > Ping. > > > -Original Message- > > From: Jit On Behalf Of Alex Coplan > > Sent: 14

[PATCH] aarch64: Don't generate invalid zero/sign-extend syntax

2020-08-17 Thread Alex Coplan
Hello, Given the following C function: double *f(double *p, unsigned x) { return p + x; } prior to this patch, GCC at -O2 would generate: f: add x0, x0, x1, uxtw 3 ret but this add instruction uses architecturally-invalid syntax: the width of the third operand conflicts

[PATCH] download_prerequisites: Add option --proxy

2020-08-17 Thread Mert Kirpici via Gcc-patches
The script contrib/download_prerequisites now accepts the command line argument '--proxy'. Which instructs the fetcher program to use the specified proxy. Signed-off-by: Mert Kirpici --- contrib/download_prerequisites | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-)

Re: [PATCH] openmp: fix UBSAN error at gcc/fortran/openmp.c:4737

2020-08-17 Thread Tobias Burnus
On 8/17/20 10:41 AM, Martin Liška wrote: Since 21cfe724cbdc30612bf1ef59b26f19ada2210832 there's a new OMP_LIST_NONTEMPORAL value, but it was missing in resolve_omp_clauses static array that is defined at the function beginning: gcc/fortran/ChangeLog: * openmp.c (resolve_omp_clauses): Add N

[PATCH] openmp: fix UBSAN error at gcc/fortran/openmp.c:4737

2020-08-17 Thread Martin Liška
Since 21cfe724cbdc30612bf1ef59b26f19ada2210832 there's a new OMP_LIST_NONTEMPORAL value, but it was missing in resolve_omp_clauses static array that is defined at the function beginning: ./xgcc -B. /home/marxin/Programming/gcc/gcc/testsuite/gfortran.dg/gomp/nontemporal-1.f90 -fopenmp -c ../../g

[PATCH] vxworks: Fix GCC selftests for *-wrs-vxworks7-* targets

2020-08-17 Thread Iain Buclaw via Gcc-patches
Hi, Currently when building a cross-compiler targeting arm-wrs-vxworks7, the selftests fail unless the VSB_DIR environment variable is set. The same !nostdinc condition is used for VXWORKS_ADDITIONAL_CPP_SPEC. OK for mainline? Iain. --- gcc/ChangeLog: * config/vxworks.h (STARTFILE_PRE

RE: [PATCH] middle-end: Recognize idioms for bswap32 and bswap64 in match.pd.

2020-08-17 Thread Roger Sayle
Hi Jakub and Marc, Here's version #3 of the patch to recognize bswap32 and bswap64 that now also implements Jakub's suggestion to support addition and xor in addition to bitwise ior when recognizing the union of highpart and lowpart (and two additional tests to check for these variants). This rev

RE: [PATCH PR94442] [AArch64] Redundant ldp/stp instructions emitted at -O3

2020-08-17 Thread xiezhiheng
> -Original Message- > From: Richard Sandiford [mailto:richard.sandif...@arm.com] > Sent: Wednesday, August 5, 2020 12:26 AM > To: xiezhiheng > Cc: Richard Biener ; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH PR94442] [AArch64] Redundant ldp/stp instructions > emitted at -O3 > > xiezhih

[PING][PATCH 6/6] contrib: Add OPT-enable-obsolete to tile*-*-*

2020-08-17 Thread Iain Buclaw via Gcc-patches
Ping. On 31/05/2020 12:20, Iain Buclaw wrote: > The tile*-*-* targets were marked as obsolete in SVN r259724. > > OK? > > Regards > Iain > > --- > contrib/ChangeLog: > > * config-list.mk (LIST): Add OPT-enable-obsolete to tilegx-linux-gnu, > tilegxbe-linux-gnu, and tilepro-linux-gn

[PING][PATCH] tilepro: Update generator file to define IN_TARGET_CODE in target file.

2020-08-17 Thread Iain Buclaw via Gcc-patches
Ping. On 31/05/2020 12:48, Iain Buclaw wrote: > Hi, > > The target files tilegx/mul-tables.c and tilepri/mul-tables.c were > updated in SVN r255743, but the generator file that produces them > wasn't, so it was reverting this change during builds. > > Only tested by running make all-gcc for all

[PATCH] Fortran : get_environment_variable runtime error PR96486

2020-08-17 Thread Mark Eggleston
Please find attached a fix for PR96486. OK to commit? [PATCH] Fortran  :  get_environment_variable runtime error PR96486 Runtime error occurs when the type of the value argument is character(0):  "Zero-length string passed as value...". The status argument, intent(out), will contain -1 if the v

[PATCH] Fortran : rejected f0.d edit descriptor PR96436

2020-08-17 Thread Mark Eggleston
Please find attached a patch for PR96436. OK to commit? [PATCH] Fortran  : rejected f0.d edit descriptor PR96436 Zero length f format descriptors are valid for Fortran 95 and later.  For g format descriptors from Fortran 2008 and later. Finally for D, E, EN and ES for Fortran 2018 and later. 2

*PING* – Re: [Patch] OpenMP: Handle cpp_implicit_alias in declare-target discovery (PR96390)

2020-08-17 Thread Tobias Burnus
On 8/3/20 5:37 PM, Tobias Burnus wrote: It turned out that the omp_discover_declare_target_tgt_fn_r discovered all nodes – but as it tagged the C++ alias nodes and not the streamed-out nodes, no device function was created and one got link errors if offloading devices were configured. (Only with