Re: [PATCH] Optimize _Float16 usage for non AVX512FP16.

2021-11-28 Thread Uros Bizjak via Gcc-patches
On Mon, Nov 29, 2021 at 8:46 AM liuhongt wrote: > > As discussed in PR, this patch do optimizations: > 1. No memory is needed to move HI/HFmode between GPR and SSE registers > under TARGET_SSE2 and above, pinsrw/pextrw are used for them w/o > AVX512FP16. > 2. Use

Re: [PATCH] Fix regression introduced by r12-5536.

2021-11-28 Thread Uros Bizjak via Gcc-patches
On Mon, Nov 29, 2021 at 2:32 AM liuhongt wrote: > > There're several failures reported in [1]: > 1. unsupported instruction `pextrw` for "pextrw $0, %xmm31, 16(%rax)" > %vpextrw should be used in output templates. > 2. ICE in get_attr_memory for movhi_internal since some alternatives > are

[PATCH] Optimize _Float16 usage for non AVX512FP16.

2021-11-28 Thread liuhongt via Gcc-patches
As discussed in PR, this patch do optimizations: 1. No memory is needed to move HI/HFmode between GPR and SSE registers under TARGET_SSE2 and above, pinsrw/pextrw are used for them w/o AVX512FP16. 2. Use gen_sse2_pinsrph/gen_vec_setv4sf_0 to replace ix86_expand_vector_set in extendhfsf2/truncsfhf2

[PATCH]middle-end cse: Make sure duplicate elements are not entered into the equivalence set [PR103404]

2021-11-28 Thread Tamar Christina via Gcc-patches
Hi All, CSE uses equivalence classes to keep track of expressions that all have the same values at the current point in the program. Normal equivalences through SETs only insert and perform lookups in this set but equivalence determined from comparisons, e.g. (insn 46 44 47 7 (set (reg:CCZ 17

Re: [PATCH] rs6000/test: Add emulated gather test case

2021-11-28 Thread Kewen.Lin via Gcc-patches
on 2021/11/27 上午12:24, Segher Boessenkool wrote: > Hi! > > On Thu, Nov 25, 2021 at 11:20:57AM +0800, Kewen.Lin wrote: >> This patch is to add a test case similar to the one in i386 >> to add testing coverage for 510.parest_r hotspots. > >> gcc/testsuite/ChangeLog: >> *

[PATCH] Make the path to etags used in the build system configurable [PR103021]

2021-11-28 Thread Eric Gallager via Gcc-patches
The attached patch allows users to specify a path to their `etags` executable for use when doing `make tags`, which is meant to close PR other/103021: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103021 I based this patch off of this one from upstream automake:

[PATCH] Fix regression introduced by r12-5536.

2021-11-28 Thread liuhongt via Gcc-patches
There're several failures reported in [1]: 1. unsupported instruction `pextrw` for "pextrw $0, %xmm31, 16(%rax)" %vpextrw should be used in output templates. 2. ICE in get_attr_memory for movhi_internal since some alternatives are marked as TYPE_SSELOG. Explicitly set memory_attr for those

Re: [PATCH] tree-optimization: [PR101540] Simplify CONSTRUCTOR for vector(1) to be VCE

2021-11-28 Thread Andrew Pinski via Gcc-patches
On Sun, Nov 28, 2021 at 12:25 PM Jeff Law via Gcc-patches wrote: > > > > On 11/28/2021 10:56 AM, apinski--- via Gcc-patches wrote: > > From: Andrew Pinski > > > > This just adds a simplification to simplify_vector_constructor for > > vector of 1 element to be VCE which should reduce memory usage

Re: [PATCH] Fix PR 19089: Environment variable TMP may yield gcc: abort

2021-11-28 Thread Andrew Pinski via Gcc-patches
On Sun, Nov 28, 2021 at 12:14 PM Jeff Law via Gcc-patches wrote: > > > > On 11/27/2021 7:49 PM, apinski--- via Gcc-patches wrote: > > From: Andrew Pinski > > > > Even though I cannot reproduce the ICE any more, this is still > > a bug. We check already to see if we can access the directory > >

Re: [committed 03/12] d: Insert null terminator in obstack buffers

2021-11-28 Thread Iain Buclaw via Gcc-patches
Excerpts from Iain Buclaw's message of November 26, 2021 1:35 pm: > Excerpts from Martin Liška's message of November 25, 2021 3:09 pm: >> On 7/30/21 13:01, Iain Buclaw via Gcc-patches wrote: >>> |Covers cases where functions that handle the extracted strings ignore the >>> explicit length. This

[PATCH] Extend usage of user hint in _Hashtable

2021-11-28 Thread François Dumont via Gcc-patches
    libstdc++: In _Hashtable, use insertion hint as much as possible.     Make use in unordered containers of the user provided hint iterator as much as possible.     Hint is now used:     - As a hint for allocation, in order to limit memory fragmentation when     allocator is making use of

Re: [PATCH] tree-optimization: [PR101540] Simplify CONSTRUCTOR for vector(1) to be VCE

2021-11-28 Thread Jeff Law via Gcc-patches
On 11/28/2021 10:56 AM, apinski--- via Gcc-patches wrote: From: Andrew Pinski This just adds a simplification to simplify_vector_constructor for vector of 1 element to be VCE which should reduce memory usage in the compiler and maybe allow for some more optimizations. OK? Bootstrapped and

Re: [PATCH] Fix PR 19089: Environment variable TMP may yield gcc: abort

2021-11-28 Thread Jeff Law via Gcc-patches
On 11/27/2021 7:49 PM, apinski--- via Gcc-patches wrote: From: Andrew Pinski Even though I cannot reproduce the ICE any more, this is still a bug. We check already to see if we can access the directory but never check to see if the path is actually a directory. This adds the check and now

Re: [PATCH] Fix PR 62157: disclean in libsanitizer not working

2021-11-28 Thread Jeff Law via Gcc-patches
On 11/27/2021 6:19 PM, apinski--- via Gcc-patches wrote: From: Andrew Pinski So what is happening is DIST_SUBDIRS contains the conditional directories which is wrong, so we need to force DIST_SUBDIRS to be the same as SUBDIRS as recommened by the automake manual. OK? Bootstrapped and

Re: [RFC][PATCH] c++/46476 - implement -Wunreachable-code-return

2021-11-28 Thread Jeff Law via Gcc-patches
On 11/26/2021 5:18 AM, Richard Biener via Gcc-patches wrote: This implements a subset of -Wunreachable-code, unreachable code after a return stmt. Contrary to the previous attemt at CFG construction time this implements the bits during GIMPLE lowering where there are still all GIMPLE return

Re: [PATCH] x86_64: PR target/100711: Splitters for pandn

2021-11-28 Thread Uros Bizjak via Gcc-patches
On Sun, Nov 28, 2021 at 2:25 PM Roger Sayle wrote: > > > This patch addresses PR target/100711 by introducing define_split > patterns so that not/broadcast/pand may be simplified (by combine) > to broadcast/pandn. This introduces two splitters one for optimizing > pandn on TARGET_SSE for V4SI

Re: [PATCH] Restore can_be_invalidated_p semantics to before refactoring

2021-11-28 Thread Jeff Law via Gcc-patches
On 11/26/2021 12:53 AM, Richard Biener via Gcc-patches wrote: This restores the semantics of can_be_invalidated_p to the original semantics of the function this was split out from tree-ssa-uninit.c. The current semantics only ever look at the first predicate which cannot be correct.

Re: [PATCH] Remove unreachable returns

2021-11-28 Thread Jeff Law via Gcc-patches
On 11/25/2021 7:16 AM, Richard Biener via Gcc-patches wrote: This removes unreachable return statements as diagnosed by the -Wunreachable-code patch. Some cases are more obviously an improvement than others - in fact some may get you the idea to replace them with gcc_unreachable () instead,

Re: [PATCH] x86_64: Improved V1TImode rotations by non-constant amounts.

2021-11-28 Thread Uros Bizjak via Gcc-patches
On Sun, Nov 28, 2021 at 3:02 PM Roger Sayle wrote: > > > This patch builds on the recent improvements to TImode rotations (and > Jakub's fixes to shldq/shrdq patterns). Now that expanding a TImode > rotation can never fail, it is safe to allow general_operand constraints > on the QImode shift

Re: [PATCH] Remove unreachable gcc_unreachable () at the end of functions

2021-11-28 Thread Jeff Law via Gcc-patches
On 11/25/2021 6:33 AM, Richard Biener via Gcc-patches wrote: It seems to be a style to place gcc_unreachable () after a switch that handles all cases with every case returning. Those are unreachable (well, yes!), so they will be elided at CFG construction time and the middle-end will place

Compare guessed profile frequencies to actual profile feedback in profile dump file

2021-11-28 Thread Jan Hubicka via Gcc-patches
Hi, this patch adds simple code to dump and compare frequencies of basic blocks read from the profile feedback and frequencies guessed statically. It dumps basic blocks in the order of decreasing frequencies from feedback along with guessed frequencies and histograms. It makes it to possible spot

Re: [PATCH] [RFC] unreachable returns

2021-11-28 Thread Jeff Law via Gcc-patches
On 11/25/2021 6:23 AM, Richard Biener via Gcc-patches wrote: We have quite a number of "default" returns that cannot be reached. One is particularly interesting since it says (see patch below): default: gcc_unreachable (); } /* We can get here with --disable-checking.

[PATCH] tree-optimization: [PR101540] Simplify CONSTRUCTOR for vector(1) to be VCE

2021-11-28 Thread apinski--- via Gcc-patches
From: Andrew Pinski This just adds a simplification to simplify_vector_constructor for vector of 1 element to be VCE which should reduce memory usage in the compiler and maybe allow for some more optimizations. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR

Re: [PATCH 1/4] libgcc: remove crt{begin,end}.o from powerpc-wrs-vxworks target

2021-11-28 Thread Olivier Hainque via Gcc-patches
Hi Rasmus, (making progress but not quite there on the stdint business) > On 1 Nov 2021, at 10:34, Rasmus Villemoes wrote: > > Since commit 78e49fb1bc (Introduce vxworks specific crtstuff support), > the generic crtbegin.o/crtend.o have been unnecessary to build. So > remove them from

[PATCH] x86_64: Improved V1TImode rotations by non-constant amounts.

2021-11-28 Thread Roger Sayle
This patch builds on the recent improvements to TImode rotations (and Jakub's fixes to shldq/shrdq patterns). Now that expanding a TImode rotation can never fail, it is safe to allow general_operand constraints on the QImode shift amounts in rotlv1ti3 and rotrv1ti3 patterns. I've also made an

[PATCH] x86_64: PR target/100711: Splitters for pandn

2021-11-28 Thread Roger Sayle
This patch addresses PR target/100711 by introducing define_split patterns so that not/broadcast/pand may be simplified (by combine) to broadcast/pandn. This introduces two splitters one for optimizing pandn on TARGET_SSE for V4SI and V2DI, and another for vpandn on TARGET_AVX2 for V16QI, V8HI,

Re: [PATCH] d: fix ASAN in option processing

2021-11-28 Thread Martin Liška
On 11/25/21 14:59, Martin Liška wrote: Fixes: ==129444==ERROR: AddressSanitizer: global-buffer-overflow on address 0x0666ca5c at pc 0x00ef094b bp 0x7fff8180 sp 0x7fff8178 READ of size 4 at 0x0666ca5c thread T0     #0 0xef094a in parse_optimize_options

Re: LoongArch Port

2021-11-28 Thread Xi Ruoyao via Gcc-patches
4 # of expected failures 861 # of unresolved testcases 2 # of unsupported tests 2235 /home/xry111/gcc-test/gcc-12-larch-20211128/build/gcc/xgcc version 12.0.0 20211127 (experimental) (GCC) === gfortran tests === Running target unix FAIL: gfortran.dg/bind_