Re: [PATCH] [i386] Implement permutation with pslldq + psrldq + por when pshufb is not available.

2022-05-08 Thread Hongtao Liu via Gcc-patches
On Mon, May 9, 2022 at 1:22 PM liuhongt via Gcc-patches wrote: > > pand/pandn may be used to clear upper/lower bits of the operands, in > that case there will be 4-5 instructions for permutation, and it's > still better than scalar codes. > > Bootstrapped and regtested on

[PATCH] [i386] Implement permutation with pslldq + psrldq + por when pshufb is not available.

2022-05-08 Thread liuhongt via Gcc-patches
pand/pandn may be used to clear upper/lower bits of the operands, in that case there will be 4-5 instructions for permutation, and it's still better than scalar codes. Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ok for trunk? gcc/ChangeLog: PR target/105354 *

[PATCH] [Middle-end] Enhance final_value_replacement_loop to handle bitwise induction.

2022-05-08 Thread liuhongt via Gcc-patches
This patch will enable below optimization: { - int bit; - long long unsigned int _1; - long long unsigned int _2; - [local count: 46707768]: - - [local count: 1027034057]: - # tmp_11 = PHI - # bit_13 = PHI - _1 = 1 << bit_13; - _2 = ~_1; - tmp_8 = _2 & tmp_11; - bit_9 = bit_13 +

[PATCH v2] Strip of a vector load which is only used partially.

2022-05-08 Thread liuhongt via Gcc-patches
Here's adjused patch. Ok for trunk? Optimize _4 = VEC_PERM_EXPR <_1, _1, { 4, 5, 6, 7, 4, 5, 6, 7 }>; _5 = BIT_FIELD_REF <_4, 128, 0>; to _5 = BIT_FIELD_REF <_1, 128, 128>; gcc/ChangeLog: PR tree-optimization/102583 * tree-ssa-forwprop.cc (simplify_bitfield_ref):

Re: [PATCH, rs6000] Implemented f[min/max]_optab by xs[min/max]dp [PR103605]

2022-05-08 Thread Kewen.Lin via Gcc-patches
Hi Haochen, Thanks for the patch, some comments are inlined. on 2022/5/9 09:54, HAO CHEN GUI wrote: > Hi, > This patch implements optab f[min/max]_optab by xs[min/max]dp on rs6000. > Tests show that outputs of xs[min/max]dp are consistent with the standard > of C99 fmin/max. > >

[PATCH V3 3/3] RISC-V:Cache Management Operation instructions testcases

2022-05-08 Thread shiyulong
From: yulong This commit adds testcases about CMO instructions. diff with the previous two versions: We change the names of builtin about cbo.clean, cbo.flush, cbo.inval, cbo.zero and prefetch.i instructions in the testcases. gcc/testsuite/ChangeLog: * gcc.target/riscv/cmo-zicbom-1.c:

[PATCH V3 2/3] RISC-V:Cache Management Operation instructions

2022-05-08 Thread shiyulong
From: yulong This commit adds cbo.clea,cbo.flush,cbo.inval,cbo.zero,prefetch.i,prefetch.r and prefetch.w instructions. diff with the previous two versions: 1.We change the instruction format from "prefetch.i\t%0" to "prefetch.i\t%a0" about the prefetch.i, cbo.clean, cbo.flush, cbo.inval,

[PATCH V3 1/3] RISC-V: Add mininal support for Zicbo[mzp]

2022-05-08 Thread shiyulong
From: yulong This commit adds minimal support for 'Zicbom','Zicboz' and 'Zicbop' extensions. gcc/ChangeLog: * common/config/riscv/riscv-common.cc: Add zicbom, zicboz, zicbop extensions. * config/riscv/riscv-opts.h (MASK_ZICBOZ): New. (MASK_ZICBOM): New.

[PATCH V3 0/3] RISC-V:Add mininal support for Zicbo[mzp]

2022-05-08 Thread shiyulong
From: yulong This patchset adds support for three recently ratified RISC-V extensions: - Zicbom (Cache-Block Management Instructions) - Zicbom (Cache-Block Management Instructions) - Zicboz (Cache-Block Zero Instructions) Patch 1: Add Zicbom/z/p mininal support Patch 2: Add Zicbom/z/p

[PATCH]rs6000: optimize li+rldicr+cmpd==>rotldi+cmpldi for 16bits cst

2022-05-08 Thread Jiufu Guo via Gcc-patches
Hi! I would like to ping for trunk: https://gcc.gnu.org/pipermail/gcc-patches/2022-March/591905.html BR, Jiufu -- When checking eq/neq with a constant which has only 16bits, then it can be optimized to check the rotated data. By this, the constant building is optimized. As the

[PATCH] [i386] Optimize movzwl + vmovd/vmovq to vmovw.

2022-05-08 Thread liuhongt via Gcc-patches
Similarly optimize movl + vmovq to vmovd. Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ok for trunk? gcc/ChangeLog: PR target/104915 * config/i386/sse.md (*vec_set_0_zero_extendhi): New pre_reload define_insn_and_split.

[PATCH, rs6000] Implemented f[min/max]_optab by xs[min/max]dp [PR103605]

2022-05-08 Thread HAO CHEN GUI via Gcc-patches
Hi, This patch implements optab f[min/max]_optab by xs[min/max]dp on rs6000. Tests show that outputs of xs[min/max]dp are consistent with the standard of C99 fmin/max. Bootstrapped and tested on ppc64 Linux BE and LE with no regressions. Is this okay for trunk? Any recommendations? Thanks a

Re: [PATCH] Expand __builtin_memcmp_eq with ptest for OImode.

2022-05-08 Thread Hongtao Liu via Gcc-patches
On Sat, May 7, 2022 at 1:05 PM liuhongt via Gcc-patches wrote: > > This is adjusted patch only for OImode. > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. > Ok for trunk? > > gcc/ChangeLog: > > PR target/104610 > * config/i386/i386-expand.cc (ix86_expand_branch): Use

[PATCH] c++: Implement P2324R2, labels at the end of compound-stmts [PR103539]

2022-05-08 Thread Marek Polacek via Gcc-patches
This patch implements C++23 , which allows labels at the end of a compound statement. Its C FE counterpart was already implemented in r11-4813. In cp_parser_statement I rely on in_compound to determine whether we're in a compound-statement, so that the patch doesn't

[PATCH] PR fortran/105501 - check for non-optional spaces between adjacent keywords

2022-05-08 Thread Harald Anlauf via Gcc-patches
Dear all, the PR correctly notes that a space between keywords 'TYPE' and 'IS' is required in free-form, but we currently accept 'TYPEIS'. We shouldn't. The combinations with non-optional blanks are listed in the standard; in F2018 this is table 6.2. While at it, I saw a couple of other keyword

New Ukrainian PO file for 'gcc' (version 12.1.0)

2022-05-08 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the Ukrainian team of translators. The file is available at: https://translationproject.org/latest/gcc/uk.po (This file, 'gcc-12.1.0.uk.po', has

New German PO file for 'gcc' (version 12.1.0)

2022-05-08 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the German team of translators. The file is available at: https://translationproject.org/latest/gcc/de.po (This file, 'gcc-12.1.0.de.po', has

New template for 'gcc' made available

2022-05-08 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. (If you have any questions, send them to .) A new POT file for textual domain 'gcc' has been made available to the language teams for translation. It is archived as:

[PATCH] testsuite: mallign: Handle word size of 1 byte

2022-05-08 Thread Dimitar Dimitrov
This patch fixes a spurious warning for pru-unknown-elf target: gcc/testsuite/gcc.dg/mallign.c:12:27: warning: ignoring return value of 'malloc' declared with attribute 'warn_unused_result' [-Wunused-result] For 8-bit targets the resulting mask ignores all bits in the value returned by malloc.

[PATCH] testsuite: Silence analyzer/pr51628-30.c for default_packed

2022-05-08 Thread Dimitar Dimitrov
On default_packed targets like PRU, a warning in the file included from analyzer/pr51628-30.c is reported as spurious one, even though it has been annotated there: Excess errors: gcc/gcc/testsuite/gcc.dg/analyzer/torture/../../../c-c++-common/pr51628-30.c:7:19: warning: 'packed' attribute