Re: [PATCH] IBM Z: Restrict vec_cmp on z13

2020-11-24 Thread Andreas Krebbel via Gcc-patches
On 24.11.20 12:55, Ilya Leoshkevich wrote: > Bootstrapped and regtested on s390x-redhat-linux. Ok for master? > > > > Commit 5d9ade39b872 ("IBM Z: Fix PR97326: Enable fp compares in > vec_cmp") made it possible to create rtxes that describe signaling > comparisons on z13, which are not

Re: [PATCH] IBM Z: Update autovec-*-quiet-uneq expectations

2020-11-23 Thread Andreas Krebbel via Gcc-patches
On 23.11.20 22:38, Ilya Leoshkevich wrote: > Commit 229752afe315 ("VEC_COND_EXPR optimizations") has improved code > generation: we no longer need "vx x,x,-1", which turned out to be > superfluous. Instead, we simply swap 0 and -1 arguments of the > preceding "vsel". > > gcc/testsuite/ChangeLog:

Re: [PATCH] IBM Z: Do not run long double tests on old machines

2020-11-16 Thread Andreas Krebbel via Gcc-patches
On 13.11.20 23:23, Ilya Leoshkevich wrote: > Bootstrapped and regtested on z13 s390x-redhat-linux. Ok for master? > > gcc/testsuite/ChangeLog: > > 2020-11-12 Ilya Leoshkevich > > * gcc.target/s390/s390.exp (check_effective_target_s390_z14_hw): > New predicate. > *

Re: [PATCH] IBM Z: Define vec_vfees instruction pattern

2020-11-12 Thread Andreas Krebbel via Gcc-patches
On 12.11.20 13:21, Stefan Schulze Frielinghaus wrote: > Bootstrapped and regtested on IBM Z. Ok for master? > > gcc/ChangeLog: > > * config/s390/vector.md ("vec_vfees"): New insn pattern. > --- > gcc/config/s390/vector.md | 26 ++ > 1 file changed, 26

Re: [PATCH] IBM Z: Fix output template for "*vfees"

2020-11-12 Thread Andreas Krebbel via Gcc-patches
On 12.11.20 13:25, Stefan Schulze Frielinghaus wrote: > Bootstrapped and regtested on IBM Z. Ok for master? > > gcc/ChangeLog: > > * config/s390/vx-builtins.md ("*vfees"): Fix output > template. > --- > gcc/config/s390/vx-builtins.md | 2 +- > 1 file changed, 1 insertion(+), 1

[Committed 2/2] IBM Z: Fix PR97326: Enable fp compares in vec_cmp

2020-11-11 Thread Andreas Krebbel via Gcc-patches
Bootstrapped and regression tested on s390x. gcc/ChangeLog: PR target/97326 * config/s390/vector.md: Support vector floating point modes in vec_cmp. --- gcc/config/s390/vector.md | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git

[Committed 1/2] IBM Z: Rename mode attr tointvec to TOINTVEC

2020-11-11 Thread Andreas Krebbel via Gcc-patches
Just a preparation to add a lower-case tointvec. Bootstrapped and regression tested on s390x. gcc/ChangeLog: * config/s390/vector.md: Rename tointvec to TOINTVEC. * config/s390/vx-builtins.md: Likewise. --- gcc/config/s390/vector.md | 142 -

Re: [PATCH] IBM Z: Fix bootstrap breakage due to HAVE_TF macro

2020-11-10 Thread Andreas Krebbel via Gcc-patches
On 10.11.20 18:43, Ilya Leoshkevich wrote: > Bootstrap and regtest running on s390x-redhat-linux with --enable-shared > --with-system-zlib --enable-threads=posix --enable-__cxa_atexit > --enable-checking=yes,rtl --enable-gnu-indirect-function > --disable-werror

Re: [PATCH 2/2] IBM Z: Test long doubles in vector registers

2020-11-10 Thread Andreas Krebbel via Gcc-patches
On 09.11.20 20:54, Ilya Leoshkevich wrote: > gcc/testsuite/ChangeLog: > > 2020-11-05 Ilya Leoshkevich > > * gcc.target/s390/vector/long-double-callee-abi-scan.c: New test. > * gcc.target/s390/vector/long-double-caller-abi-run.c: New test. > *

Re: [PATCH 1/2] IBM Z: Store long doubles in vector registers when possible

2020-11-10 Thread Andreas Krebbel via Gcc-patches
On 09.11.20 20:54, Ilya Leoshkevich wrote: > On z14+, there are instructions for working with 128-bit floats (long > doubles) in vector registers. It's beneficial to use them instead of > instructions that operate on floating point register pairs, because it > allows to store 4 times more data in

Re: [PING] [PATCH] S/390: Do not turn maybe-uninitialized warnings into errors

2020-11-06 Thread Andreas Krebbel via Gcc-patches
On 06.11.20 04:52, Jeff Law via Gcc-patches wrote: > > On 10/30/20 7:01 AM, Richard Biener wrote: >> >> It's not that more / different inlining inherently exposes _more_ >> false positives in the middle-end warnings. They simply expose >> others and the GCC codebase is cleansed (by those who

Re: [PATCH 4/4] IBM Z: Test long doubles in vector registers

2020-11-04 Thread Andreas Krebbel via Gcc-patches
On 04.11.20 23:19, Ilya Leoshkevich wrote: > On Wed, 2020-11-04 at 18:28 +0100, Andreas Krebbel wrote: >> These tests all use the -mzvector option but do not appear to make >> use of the z vector languages >> extensions. I think that option could be removed. Then these tes

Re: [PATCH 3/4] IBM Z: Store long doubles in vector registers when possible

2020-11-04 Thread Andreas Krebbel via Gcc-patches
On 04.11.20 23:12, Ilya Leoshkevich wrote: > On Wed, 2020-11-04 at 18:16 +0100, Andreas Krebbel wrote: >> On 03.11.20 22:45, Ilya Leoshkevich wrote: >>> On z14+, there are instructions for working with 128-bit floats >>> (long >>> doubles) in vector registers.

Re: [PATCH 4/4] IBM Z: Test long doubles in vector registers

2020-11-04 Thread Andreas Krebbel via Gcc-patches
These tests all use the -mzvector option but do not appear to make use of the z vector languages extensions. I think that option could be removed. Then these tests should be moved to the vector subdir. You could do the asm scanning also in dg-do run tests. Andreas On 03.11.20 22:46, Ilya

Re: [PATCH 3/4] IBM Z: Store long doubles in vector registers when possible

2020-11-04 Thread Andreas Krebbel via Gcc-patches
On 03.11.20 22:45, Ilya Leoshkevich wrote: > On z14+, there are instructions for working with 128-bit floats (long > doubles) in vector registers. It's beneficial to use them instead of > instructions that operate on floating point register pairs, because it > allows to store 4 times more data in

Re: [PATCH 2/4] IBM Z: Unhardcode NR_C_MODES

2020-11-04 Thread Andreas Krebbel via Gcc-patches
On 03.11.20 22:45, Ilya Leoshkevich wrote: > gcc/ChangeLog: > > 2020-11-03 Ilya Leoshkevich > > * config/s390/s390.c (NR_C_MODES): Unhardcode. > (s390_alloc_pool): Use size_t for iterating from 0 to > NR_C_MODES. > (s390_add_constant): Likewise. >

Re: [PATCH 1/4] IBM Z: Remove unused RRe and RXe mode_attrs

2020-11-04 Thread Andreas Krebbel via Gcc-patches
On 03.11.20 22:36, Ilya Leoshkevich wrote: > gcc/ChangeLog: > > 2020-11-03 Ilya Leoshkevich > > * config/s390/s390.md (RRe): Remove. > (RXe): Remove. Ok. Thanks! Andreas

[Committed] Fix PR97497

2020-10-27 Thread Andreas Krebbel via Gcc-patches
This works around a limitation of gcse with handling of partially clobbered registers. With this patch our GOT pointer register r12 is not marked as partially clobbered anymore for the -m31 -mzarch -fpic combination. This is correct since all the bits in r12 we actually care about are in fact

[Committed] IBM Z: Add vcond_mask expander

2020-10-26 Thread Andreas Krebbel via Gcc-patches
After adding vec_cmp expanders we have seen various performance related regression in the testsuite. These appear to be caused by a missing vcond_mask definition in the backend. Fixed with this patch. The patch fixes the following testsuite fails: FAIL: gcc.dg/vect/vect-21.c -flto

[Committed] Fix PR97502

2020-10-22 Thread Andreas Krebbel via Gcc-patches
The S/390 backend does not define vec_cmp expanders so far. We relied solely on expanding vcond. With commit 502d63b6d various testcases started to ICE now. This patch just adds the missing expanders to prevent the ICE. However, there are still a couple of performance-related testcase

[Committed] Fix PR97439

2020-10-22 Thread Andreas Krebbel via Gcc-patches
decimal_real_maxval misses to set the sign flag in the REAL_VALUE_TYPE. Bootstrapped and regression tested on IBM Z. Committed to head, gcc-10, gcc-9, and gcc-8 branches. gcc/ChangeLog: PR rtl-optimization/97439 * dfp.c (decimal_real_maxval): Set the sign flag in the

Re: [PATCH] IBM Z: Emit vector alignment hints for strlen

2020-10-19 Thread Andreas Krebbel via Gcc-patches
On 18.10.20 20:32, Stefan Schulze Frielinghaus wrote: > In case the vectorized version of strlen is used, then each memory > access inside the loop is 16-byte aligned. Thus add this kind of > information so that vector alignment hints can later on be emitted. > > Bootstrapped and regtested on

Re: [PATCH v2] IBM Z: Change vector copysign to use bitwise operations

2020-10-12 Thread Andreas Krebbel via Gcc-patches
On 09.10.20 17:49, Ilya Leoshkevich wrote: > Bootstrapped and regtested on s390x-redhat-linux. OK for master? > > v1: https://gcc.gnu.org/pipermail/gcc-patches/2020-October/555782.html > v1 -> v2: Use related_int_vector_mode. > > > > The vector copysign pattern incorrectly assumes that vector

Re: [PATCH] IBM Z: Change vector copysign to use bitwise operations

2020-10-09 Thread Andreas Krebbel via Gcc-patches
On 08.10.20 11:38, Ilya Leoshkevich wrote: > Bootstrapped and regtested on s390x-redhat-linux. OK for master? > > The vector copysign pattern incorrectly assumes that vector > if_then_else operates on bits, not on elements. This can theoretically > mislead the optimizers. Fix by changing it to

[Committed] IBM Z: Doc: Add z15/arch13 to the list of -march/-mtune options

2020-10-06 Thread Andreas Krebbel via Gcc-patches
gcc/ChangeLog: * doc/invoke.texi: Add z15/arch13 to the list of documented -march/-mtune options. --- gcc/doc/invoke.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index f623467b763..7c81d7f41bd 100644 ---

Re: [committed] s390: Fix up s390_atomic_assign_expand_fenv

2020-10-01 Thread Andreas Krebbel via Gcc-patches
On 01.10.20 11:13, Jakub Jelinek wrote: > Hi! > > The following patch fixes > -FAIL: gcc.dg/pr94780.c (internal compiler error) > -FAIL: gcc.dg/pr94780.c (test for excess errors) > -FAIL: gcc.dg/pr94842.c (internal compiler error) > -FAIL: gcc.dg/pr94842.c (test for excess errors) > on

Re: [PATCH] S/390: Do not turn maybe-uninitialized warnings into errors

2020-09-22 Thread Andreas Krebbel via Gcc-patches
On 15.09.20 17:02, Stefan Schulze Frielinghaus wrote: > Over the last couple of months quite a few warnings about uninitialized > variables were raised while building GCC. A reason why these warnings > show up on S/390 only is due to the aggressive inlining settings here. > Some of these warnings

Re: [PATCH] IBM Z: Try to make use of load-and-test instructions

2020-09-21 Thread Andreas Krebbel via Gcc-patches
On 18.09.20 13:10, Stefan Schulze Frielinghaus wrote: > This patch enables a peephole2 optimization which transforms a load of > constant zero into a temporary register which is then finally used to > compare against a floating-point register of interest into a single load > and test instruction.

Re: [PATCH] IBM Z: Fix *vec_tf_to_v1tf constraints

2020-09-16 Thread Andreas Krebbel via Gcc-patches
On 03.09.20 08:39, Ilya Leoshkevich wrote: > Bootstrapped (with BOOT_CFLAGS='-g -O2 -Wno-error=maybe-uninitialized') > and regtested on s390x-redhat-linux. Ok for master? > > > > Certain alternatives of *vec_tf_to_v1tf use "v" constraint for its > TFmode source operand. Therefore it is assigned

[Committed] IBM Z: Fix PR96308

2020-08-12 Thread Andreas Krebbel via Gcc-patches
For the testcase a symbol with a TLS reloc and an unary minus is being generated. The backend didn't handle this correctly. In s390_cannot_force_const_mem an unary minus on a symbolic constant is rejected now since gas would not allow this. legitimize_tls_address now makes the NEG rtx the

[Committed] IBM Z: Fix PR96456

2020-08-12 Thread Andreas Krebbel via Gcc-patches
The testcase failed because our backend refuses to generate vector compare instructions for signaling operators with -fno-trapping-math -fno-finite-math-only. Bootstrapped and regression tested on s390x. Committed to mainline. gcc/ChangeLog: PR target/96456 * config/s390/s390.h

[Committed] Fix PR96127

2020-07-17 Thread Andreas Krebbel via Gcc-patches
In s390_expand_insv the movstrict patterns are always generated with a CC clobber although only movstricthi actually needs one. The patch invokes the expanders instead of constructing the pattern by hand. Bootstrapped and regression tested on s390x. Committed to mainline gcc/ChangeLog:

Re: [PATCH] S/390: Emit vector alignment hints for z13 if AS accepts them [BACKPORT GCC10]

2020-07-16 Thread Andreas Krebbel via Gcc-patches
On 09.07.20 09:29, Stefan Schulze Frielinghaus wrote: > gcc/ChangeLog: > > * config.in: Regenerate. > * config/s390/s390.c (print_operand): Emit vector alignment hints > for target z13, if AS accepts them. For other targets the logic > stays the same. > *

Re: [PATCH] S/390: Emit vector alignment hints for z13 if AS accepts them [BACKPORT GCC9]

2020-07-16 Thread Andreas Krebbel via Gcc-patches
On 09.07.20 09:35, Stefan Schulze Frielinghaus wrote: > Bootstrapped and regtested on s390x with and without a patched gas. Ok > for master? > > gcc/ChangeLog: > > * config.in: Regenerate. > * config/s390/s390.c (print_operand): Emit vector alignment hints > for target z13, if

Re: [PATCH 2/2] S/390: Emit vector alignment hints for z13 if AS accepts them

2020-07-16 Thread Andreas Krebbel via Gcc-patches
On 15.07.20 17:53, Stefan Schulze Frielinghaus wrote: > gcc/ChangeLog: > > * config.in: Regenerate. > * config/s390/s390.c (print_operand): Emit vector alignment hints > for target z13, if AS accepts them. For other targets the logic > stays the same. > *

Re: [PATCH 1/2] S/390: Support vector load/store alignment hints

2020-07-16 Thread Andreas Krebbel via Gcc-patches
On 15.07.20 17:53, Stefan Schulze Frielinghaus wrote: > From: Andreas Krebbel > > The IBM z14 POP adds an optional alignment operand to the vl, vst, > vlm, and vstm instruction (vector loads and stores). Vectors residing > on 8 or 16 byte boundaries might get loaded or stored

Re: [PATCH v4 2/2] S/390: Define CODE_LABEL_BOUNDARY

2020-07-01 Thread Andreas Krebbel via Gcc-patches
On 01.07.20 14:29, Ilya Leoshkevich wrote: ... > gcc/ChangeLog: > > 2020-06-30 Ilya Leoshkevich > > * config/s390/s390.h (CODE_LABEL_BOUNDARY): Specify that s390 > requires code labels to be aligned on a 2-byte boundary. > > gcc/testsuite/ChangeLog: > > 2019-06-30 Ilya

[Committed] IBM Z: Prevent mach optimization on doloop patterns

2020-06-17 Thread Andreas Krebbel via Gcc-patches
on IBM z15. Committed to mainline. 2020-06-17 Andreas Krebbel gcc/ * config/s390/s390.c (s390_fix_long_loop_prediction): Exit early for PARALLELs. gcc/testsuite/ * gcc.target/s390/20200617.c: New test. --- gcc/config/s390/s390.c | 9 +++-- gcc

Re: [PATCH] S/390: Emit vector alignment hints for z13 if AS accepts them

2020-06-16 Thread Andreas Krebbel via Gcc-patches
On 16.06.20 10:26, Stefan Schulze Frielinghaus wrote: > Since 87cb9423add vector alignment hints are emitted for target z13, > too. This patch changes this behaviour in the sense that alignment > hints are only emitted for target z13 if the assembler accepts them. > > Bootstrapped and regtested

Re: [PATCH] S/390: Emit vector alignment hints for z13

2020-05-29 Thread Andreas Krebbel via Gcc-patches
On 28.05.20 20:24, Stefan Schulze Frielinghaus wrote: > Vector alignment hints are fully supported since z14. On z13 alignment > hints have no effect, however, instructions with alignment hints are > still legal. Thus, emit alignment hints also for z13 targets so that if > the binary is actually

[Committed] IBM Z: Define probe_stack expander

2020-05-14 Thread Andreas Krebbel via Gcc-patches
Probes emitted by the common code routines still use a store. Define the "probe_stack" pattern to use a compare instead. Bootstrapped and regression tested on s390x Committed to mainline gcc/ChangeLog: 2020-05-14 Andreas Krebbel * config/s390/s390.c (s390_emit_stack_pr

[Committed] IBM Z: stack clash prot: add missing updates of last_probe_offset

2020-05-14 Thread Andreas Krebbel via Gcc-patches
-05-14 Andreas Krebbel * config/s390/s390.c (allocate_stack_space): Add missing updates of last_probe_offset. gcc/testsuite/ChangeLog: 2020-05-14 Andreas Krebbel * gcc.target/s390/stack-clash-1.c: New test. --- gcc/ChangeLog | 5

[PATCH 1/1] Make anti_adjust_stack_and_probe_stack_clash extern and use it for Z

2020-05-08 Thread Andreas Krebbel via Gcc-patches
2020-05-08 Andreas Krebbel * explow.c (anti_adjust_stack_and_probe_stack_clash): Remove prototype. Remove static. * explow.h (anti_adjust_stack_and_probe_stack_clash): Add prototype. * config/s390/s390.md ("allocat

Re: [PATCH] var-tracking.c: Fix possible use of uninitialized variable pre

2020-05-04 Thread Andreas Krebbel via Gcc-patches
On 04.05.20 09:27, Richard Biener wrote: > On Mon, May 4, 2020 at 8:14 AM Andreas Krebbel wrote: >> >> On 30.04.20 18:33, Richard Biener wrote: >>> On Thu, Apr 30, 2020 at 5:14 PM Andreas Krebbel >>> wrote: >>>> >>>> On 30.04.20 08:25, R

Re: [PATCH] var-tracking.c: Fix possible use of uninitialized variable pre

2020-05-04 Thread Andreas Krebbel via Gcc-patches
On 30.04.20 18:33, Richard Biener wrote: > On Thu, Apr 30, 2020 at 5:14 PM Andreas Krebbel wrote: >> >> On 30.04.20 08:25, Richard Biener via Gcc-patches wrote: >>> On Wed, Apr 29, 2020 at 5:56 PM Jeff Law wrote: >>>> >>>> On Tue, 2020-04-28 at 1

Re: [PATCH] var-tracking.c: Fix possible use of uninitialized variable pre

2020-04-30 Thread Andreas Krebbel via Gcc-patches
On 30.04.20 08:25, Richard Biener via Gcc-patches wrote: > On Wed, Apr 29, 2020 at 5:56 PM Jeff Law wrote: >> >> On Tue, 2020-04-28 at 11:44 +0200, Richard Biener via Gcc-patches wrote: >>> >>> Btw, does s390 have different inlining parameters somehow? >> I think so. We saw a ton of backend

Re: [PATCH] s390: Fix up -Wpsabi diagnostcs + analysis [PR94704]

2020-04-29 Thread Andreas Krebbel via Gcc-patches
On 28.04.20 17:44, Jakub Jelinek wrote: > On Tue, Apr 28, 2020 at 04:23:24PM +0200, Andreas Krebbel via Gcc-patches > wrote: >> Given that this is something which hasn't been covered by the ABI so far I'm >> not sure we really need >> a -Wpsabi warning for that. >

[PATCH 1/1] IBM Z: vec_store_len_r/vec_load_len_r fix

2020-04-29 Thread Andreas Krebbel via Gcc-patches
load the full vector. If it can be recognized that it is in effect a full vector register load or store it is now implemented with vl/vst instead. I'll commit it to mainline after successful bootstrap and regtest. gcc/ChangeLog: 2020-04-29 Andreas Krebbel * config/s390/constraints.md

Re: [PATCH] s390: Fix up -Wpsabi diagnostcs + analysis [PR94704]

2020-04-28 Thread Andreas Krebbel via Gcc-patches
On 28.04.20 14:13, Jakub Jelinek wrote: > Hi! > > So, based on the yesterday's discussions, similarly to powerpc64le-linux > I've done some testing for s390x-linux too. > > First of all, I found a bug in my patch from yesterday, it was printing > the wrong type like 'double' etc. rather than the

Re: [PATCH] s390: Fix C++14 vs. C++17 ABI incompatibility on s390{, x} [PR94704]

2020-04-27 Thread Andreas Krebbel via Gcc-patches
On 27.04.20 09:36, Jakub Jelinek wrote: > On Mon, Apr 27, 2020 at 08:41:32AM +0200, Andreas Krebbel wrote: >> Ok. Thanks for doing this! > > Thanks, committed. > >> We probably have to look into providing a -Wpsabi warning as well. > > So like this? Untes

Re: [PATCH] s390: Fix C++14 vs. C++17 ABI incompatibility on s390{, x} [PR94704]

2020-04-27 Thread Andreas Krebbel via Gcc-patches
On 26.04.20 14:20, Jakub Jelinek wrote: > Hi! > > The following patch fixes the C++14 vs. C++17 ABI passing incompatibility > on s390x-linux. > > Bootstrapped/regtested on s390x-linux without and with the patch, the > difference being: > -FAIL: tmpdir-g++.dg-struct-layout-1/t032

Re: [PATCH v2] S/390: Fix several test cases

2020-04-22 Thread Andreas Krebbel via Gcc-patches
On 22.04.20 13:56, Stefan Schulze Frielinghaus wrote: > Hi, > > Added option `--save-temps` back to `addsub-signed-overflow-{1,2}.c`. > Ok for master? > > Cheers, > Stefan > > gcc/ChangeLog: > > 2020-04-21 Stefan Schulze Frielinghaus > > * config/s390/s390.md ("*_ior_and_sr_ze"):

[Committed] S/390: Fix PR94666

2020-04-20 Thread Andreas Krebbel via Gcc-patches
-04-20 Andreas Krebbel * config/s390/vector.md ("popcountv8hi2_vx", "popcountv4si2_vx") ("popcountv2di2_vx"): Use simplify_gen_subreg. gcc/testsuite/ChangeLog: 2020-04-20 Andreas Krebbel * g++.dg/pr94666.C: New test. --- gcc/ChangeLog

[PATCH 1/1] PR94613: Fix vec_sel builtin for IBM Z

2020-04-17 Thread Andreas Krebbel via Gcc-patches
point mode for AND/IOR and friends although several targets emit bit ops on floating point vectors (including i386, Power, and s390). So I assume this is a safe thing to do?! Bootstrapped and regression-tested on IBM z15. gcc/ChangeLog: 2020-04-17 Andreas Krebbel PR target/94613

Re: [PATCH] S/390: Fix PR91628

2020-04-07 Thread Andreas Krebbel via Gcc-patches
On 07.04.20 18:26, Iain Buclaw wrote: > > > On 07/04/2020 16:33, Stefan Liebler wrote: >> On 4/1/20 6:20 PM, Stefan Liebler wrote: >>> On 4/1/20 12:50 PM, Iain Buclaw wrote: On 01/04/2020 08:28, Stefan Liebler wrote: > ping > Hi Stefan, As I've already

Re: [PATCH] S/390: Fix layout of struct sigaction_t

2020-04-07 Thread Andreas Krebbel via Gcc-patches
On 07.04.20 09:59, Iain Buclaw wrote: > On 01/04/2020 18:20, Stefan Liebler wrote: >> On 4/1/20 12:54 PM, Iain Buclaw wrote: >>> On 01/04/2020 08:28, Stefan Liebler wrote: ping >>> >>> Thanks, I'll send the patch upstream, as it's the same there. >>> >>> Looks OK to me. >>> >>> Regards

[Committed] S/390 zTPF: Handle skip trace addresses when unwinding

2020-04-03 Thread Andreas Krebbel via Gcc-patches
From: Jim Johnston Check for and handle new skip trace addresses when unwinding on zTPF. libgcc/ChangeLog: 2020-04-03 Jim Johnston * config/s390/tpf-unwind.h (MIN_PATRANGE, MAX_PATRANGE) (TPFRA_OFFSET): Macros removed. (CP_CNF, cinfc_fast, CINFC_CMRESET,

[Committed] S/390: Remove superfluous commutative constraint modifiers

2020-04-02 Thread Andreas Krebbel via Gcc-patches
modifier was plain wrong: "sub3" and "ior_not3". Fortunately it never had any effect. Bootstrapped and regression tested on s390x. SPEC binaries built with and without the patch are identical. gcc/ChangeLog: 2020-04-02 Andreas Krebbel * config/s390/vect

Re: [PATCH 1/1] libstdc++: Deal with ENOSYS == ENOTSUP

2020-03-06 Thread Andreas Krebbel
On 3/6/20 10:15 AM, Ville Voutilainen wrote: > On Fri, 6 Mar 2020 at 10:41, Andreas Krebbel wrote: >> >> zTPF uses the same numeric value for ENOSYS and ENOTSUP. >> >> Ok for mainline? >> >> libstdc++-v3/ChangeLog: >> >> 2020-03-06 Andreas

[Committed] IBM Z: Fix error format string.

2020-03-06 Thread Andreas Krebbel
gcc/ChangeLog: 2020-03-06 Andreas Krebbel * config/s390/s390.md ("tabort"): Get rid of two consecutive blanks in format string. --- gcc/config/s390/s390.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/config/s390/s390.md b/gcc/config

[PATCH 1/1] libstdc++: Deal with ENOSYS == ENOTSUP

2020-03-06 Thread Andreas Krebbel
zTPF uses the same numeric value for ENOSYS and ENOTSUP. Ok for mainline? libstdc++-v3/ChangeLog: 2020-03-06 Andreas Krebbel * src/c++11/system_error.cc: Omit the ENOTSUP case statement if it would match ENOSYS. --- libstdc++-v3/src/c++11/system_error.cc | 3 ++- 1 file

Re: [Committed 4/4] IBM Z: zTPF: Include glibc-stdint.h

2020-03-05 Thread Andreas Krebbel
On 3/5/20 12:34 AM, Joseph Myers wrote: > On Wed, 4 Mar 2020, Andreas Krebbel wrote: > >> Building a zTPF cross currently fails when building libstdc++ >> complaining about the __UINTPTR_TYPE__ to be missing. >> >> Fixed by including the glibc-stdint.h header.

[Committed 4/4] IBM Z: zTPF: Include glibc-stdint.h

2020-03-04 Thread Andreas Krebbel
Building a zTPF cross currently fails when building libstdc++ complaining about the __UINTPTR_TYPE__ to be missing. Fixed by including the glibc-stdint.h header. 2020-03-04 Andreas Krebbel * config.gcc: Include the glibc-stdint.h header for zTPF. --- gcc/config.gcc | 2 +- 1 file

[Committed 1/4] IBM Z: zTPF: Add tpf trace customization options

2020-03-04 Thread Andreas Krebbel
be changed at compile-time using the new command line options. For convenience one additional command line option (-mtpf-trace-skip) implements a new set of hard-coded addresses. gcc/ChangeLog: 2020-03-04 Andreas Krebbel * config/s390/s390.c (s390_emit_prologue): Specify the 2 new

[Committed 3/4] IBM Z: zTPF: Prevent FPR usage

2020-03-04 Thread Andreas Krebbel
For the zTPF we must not use floating point registers. gcc/ChangeLog: 2020-03-04 Andreas Krebbel * config/s390/s390.c (s390_secondary_memory_needed): Disallow direct FPR-GPR copies. (s390_register_info_gprtofpr): Disallow GPR content to be saved in FPRs

[Committed 2/4] IBM Z: zTPF: Build libgcc with -mtpf-trace-skip

2020-03-04 Thread Andreas Krebbel
libgcc is supposed to be built with the trace skip flags and branch targets. Add a zTPF header file fragment and add the -mtpf-trace-skip option. libgcc/ChangeLog: 2020-03-04 Andreas Krebbel * config.host: Include the new makefile fragment. * config/s390/t-tpf: New file

Re: [PATCH] s390: Fix --with-arch=... --with-tune=... [PR26877]

2020-03-02 Thread Andreas Krebbel
On 2/25/20 10:20 AM, Jakub Jelinek wrote: > Hi! > > In Fedora we configure GCC with --with-arch=zEC12 --with-tune=z13 right now > and furthermore redhat-rpm-config adds to rpm packages -march=zEC12 -mtune=z13 > options (among others). While looking at the git compilation, I've been > surprised

Re: [PATCH] s390x: Fix popcounthi2_z196 expander [PR93533]

2020-02-02 Thread Andreas Krebbel
On 2/1/20 9:41 PM, Jakub Jelinek wrote: > Hi! > > The following testcase started to ICE when .POPCOUNT matching has been added > to match.pd; we had __builtin_popcount*, but nothing would use the > popcounthi2 expander before. > > The problem is that the popcounthi2_z196 expander doesn't emit

[PATCH 1/1] Work around array out of bounds warning in mkdeps

2019-12-17 Thread Andreas Krebbel
on x86_64 by changing the inlining threshold using: --param max-inline-insns-auto=80 Bootstrapped and regression tested on x86_64 and IBM Z. Ok for mainline? libcpp/ChangeLog: 2019-12-17 Andreas Krebbel PR tree-optimization/92176 * mkdeps.c (deps_add_default_target): --- libcpp

[Committed] Fix PR92950: Wrong code emitted for movv1qi

2019-12-16 Thread Andreas Krebbel
The backend emits 16 bit memory loads for single element character vector. As a result the character will not be right justified in the GPR. gcc/ChangeLog: 2019-12-16 Andreas Krebbel PR target/92950 * config/s390/vector.md ("mov" for V_8): Replace lh, lhy,

Re: [PATCH] musl: use correct long double abi by default

2019-11-17 Thread Andreas Krebbel
On 15.11.19 19:58, Szabolcs Nagy wrote: > On 15/11/2019 18:15, Segher Boessenkool wrote: >> On Fri, Nov 15, 2019 at 06:03:25PM +, Szabolcs Nagy wrote: >>> i'm fine with that, it means the --with-long-double-128 >>> switch does not work on *-musl, >> >> I thought that is what you wanted to do.

Re: [PATCH] s390: add musl support

2019-11-17 Thread Andreas Krebbel
On 15.11.19 18:23, Szabolcs Nagy wrote: > Add the musl dynamic linker names. > > Build tested on s390x-linux-musl and s390x-linux-gnu. > > gcc/ChangeLog: > > 2019-11-15 Szabolcs Nagy > > * config/s390/linux.h (MUSL_DYNAMIC_LINKER32): Define. > (MUSL_DYNAMIC_LINKER64): Define. >

Re: [Committed] IBM Z: Add pattern for load truth value of comparison into reg

2019-11-11 Thread Andreas Krebbel
On 11.11.19 15:39, Richard Henderson wrote: > On 11/7/19 12:52 PM, Andreas Krebbel wrote: >> +; Such patterns get directly emitted by noce_emit_store_flag. >> +(define_insn_and_split "*cstorecc_z13" >> + [(set (match_o

[Committed] IBM Z: Add pattern for load truth value of comparison into reg

2019-11-07 Thread Andreas Krebbel
of a CC compare into a GPR. Done with the attached patch. Bootstrapped and regression tested on s390x. Committed to mainline. 2019-11-07 Andreas Krebbel * config/s390/s390.md ("*cstorecc_z13"): New insn_and_split pattern. gcc/testsuite/ChangeLog: 2019-11-07 Andre

[PATCH 4/4] IBM Z: gen-vect-26/28: Vectorizing without peeling is ok for Z

2019-11-05 Thread Andreas Krebbel
These tests check if loop peeling has been applied to avoid having to vectorize unaligned loops. On Z we do not have any alignment requirements for vectorization so we also don't need want the loop peeling here. 2019-11-05 Andreas Krebbel * gcc.dg/tree-ssa/gen-vect-26.c: Disable loop

[PATCH 3/4] IBM Z: gen-vect-11/32: Set min-vect-loop-bound param back to default

2019-11-05 Thread Andreas Krebbel
actually is a pity. The patch sets min-vect-loop-bound back to the default value of 0 in order to enable vectorization. 2019-11-05 Andreas Krebbel * gcc.dg/tree-ssa/gen-vect-11.c: Add --param min-vect-loop-bound=0 for IBM Z. * gcc.dg/tree-ssa/gen-vect-11.c: Likewise

[PATCH 1/4] IBM Z: Use tree_fits_uhwi_p in vector_alignment hook

2019-11-05 Thread Andreas Krebbel
This fixes an ICE in gcc.dg/attr-vector_size.c testcase. gcc/ChangeLog: 2019-11-05 Andreas Krebbel * config/s390/s390.c (s390_vector_alignment): Check if the value fits into uhwi before using it. --- gcc/config/s390/s390.c | 8 +++- 1 file changed, 7 insertions(+), 1

[PATCH 2/4] IBM Z: Fix testsuite useable_hw check

2019-11-05 Thread Andreas Krebbel
/ChangeLog: 2019-11-05 Andreas Krebbel * gcc.target/s390/s390.exp (check_effective_target_s390_useable_hw): Add inline asm for z14 and z15. Replace instruction for z13 with lochiz. Add register clobbers. Check also for __zarch__ when doing the __VX__ test. --- gcc

[Committed 0/4] IBM Z: Fix a few testsuite problems

2019-11-05 Thread Andreas Krebbel
Andreas Krebbel (4): IBM Z: Use tree_fits_uhwi_p in vector_alignment hook IBM Z: Fix testsuite useable_hw check IBM Z: gen-vect-11/32: Set min-vect-loop-bound param back to default IBM Z: gen-vect-26/28: Vectorizing without peeling is ok for Z gcc/config/s390/s390.c

[Committed] ipa-sra-19.c: Avoid unprototyped function

2019-10-24 Thread Andreas Krebbel
Andreas Krebbel * gcc.dg/ipa/ipa-sra-19.c: Remove dg-skip-if. Add argument type to prototype of k. --- gcc/testsuite/gcc.dg/ipa/ipa-sra-19.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-sra-19.c b/gcc/testsuite/gcc.dg/ipa/ipa

Re: [PR testsuite/91842] Skip gcc.dg/ipa/ipa-sra-19.c on power

2019-10-24 Thread Andreas Krebbel
On 24.10.19 15:26, Martin Jambor wrote: > Hi, > > On Thu, Oct 24 2019, Andreas Krebbel wrote: >> On 02.10.19 17:06, Martin Jambor wrote: >>> Hi, >>> >>> I seem to remember I minimized gcc.dg/ipa/ipa-sra-19.c on power but >>> perhaps I am wron

Re: [PR testsuite/91842] Skip gcc.dg/ipa/ipa-sra-19.c on power

2019-10-24 Thread Andreas Krebbel
On 02.10.19 17:06, Martin Jambor wrote: > Hi, > > I seem to remember I minimized gcc.dg/ipa/ipa-sra-19.c on power but > perhaps I am wrong because the testcase fails there with a > power-specific error: > > gcc.dg/ipa/ipa-sra-19.c:19:3: error: AltiVec argument passed to unprototyped > function

Re: [PATCH] S/390: Use UNSPEC_GET_TP for thread pointer loads

2019-10-24 Thread Andreas Krebbel
On 23.10.19 13:02, Ilya Leoshkevich wrote: > Boostrapped and regtested on s390x-redhat-linux. > > gcc/ChangeLog: > > 2019-10-21 Ilya Leoshkevich > > * config/s390/s390.c (s390_get_thread_pointer): Use > gen_get_thread_pointer. > (s390_expand_split_stack_prologue): Likewise.

Re: [PATCH] S/390: Run %a0:DI splitters only after reload

2019-10-15 Thread Andreas Krebbel
On 11.10.19 18:35, Ilya Leoshkevich wrote: > Bootstrapped and regtested on s390x-redhat-linux. > > gcc/ChangeLog: > > 2019-10-10 Ilya Leoshkevich > > * config/s390/s390.md: Run %a0:DI splitters only after reload. > > gcc/testsuite/ChangeLog: > > 2019-10-10 Ilya Leoshkevich > >

[PATCH 2/2] GO S/390: Add kdsaQuery function

2019-10-14 Thread Andreas Krebbel
Since the update to Go 1.13beta1 the kdsaQuery function is expected to be present. However, it is not with GCCGO since the assembler file from GOLANG cannot be understood by gas. This patch adds an inline assembly implementation to cpu_gccgo.c. 2019-10-14 Andreas Krebbel * libgo/go

[PATCH 1/2] Sync hardware facility names with other files in os_linux_s390x.go

2019-10-14 Thread Andreas Krebbel
2019-10-14 Andreas Krebbel * libgo/go/runtime/os_linux_s390x.go: cpu.go, cpu_s390x.go, cpu.go, and cpu_linux_s390x.go expect the hardware facilities in capital letters. Sync this file accordingly. Add support for the VXE HWCAP as well. --- libgo/go/runtime

[Committed] S/390: PR91035 Fix call to __morestack

2019-10-10 Thread Andreas Krebbel
this I could also get rid of the unspec which was required for the parameter block generation so far. gcc/ChangeLog: 2019-10-10 Andreas Krebbel PR target/91035 * config/s390/s390-protos.h (s390_output_split_stack_data): Add prototype. * config/s390/s390.md

[Committed] S/390: Add support for z15 as CPU name.

2019-10-10 Thread Andreas Krebbel
So far z15 was identified as arch13. After the machine has been announced we can now add the real name. gcc/ChangeLog: 2019-10-10 Andreas Krebbel * common/config/s390/s390-common.c (PF_ARCH13): Rename to... (PF_Z15): ... this. * config.gcc: Add z15 as option

Re: [PATCH v4 7/7] S/390: Test signaling FP comparison instructions

2019-10-07 Thread Andreas Krebbel
On 01.10.19 15:27, wrote: > gcc/testsuite/ChangeLog: > > 2019-08-09 Ilya Leoshkevich > > PR target/77918 > * gcc.target/s390/s390.exp: Enable Fortran tests. > * gcc.target/s390/zvector/autovec-double-quiet-eq.c: New test. > *

Re: [PATCH v4 6/7] S/390: Use signaling FP comparison instructions

2019-10-07 Thread Andreas Krebbel
On 01.10.19 15:27, Ilya Leoshkevich wrote: > dg-torture.exp=inf-compare-1.c is failing, because (qNaN > +Inf) > comparison is compiled to CDB instruction, which does not signal an > invalid operation exception. KDB should have been used instead. > > This patch introduces a new CCmode and a new

Re: [PATCH v4 3/7] S/390: Do not use signaling vector comparisons on z13

2019-10-07 Thread Andreas Krebbel
On 01.10.19 15:27, Ilya Leoshkevich wrote: > z13 supports only non-signaling vector comparisons. This means we > cannot vectorize LT, LE, GT, GE and LTGT when compiling for z13. Notify > middle-end about this by using more restrictive operator predicate in > vcond. > > gcc/ChangeLog: > >

Re: [PATCH v4 5/7] S/390: Remove code duplication in vec_* comparison expanders

2019-10-01 Thread Andreas Krebbel
On 01.10.19 15:27, Ilya Leoshkevich wrote: > s390.md uses a lot of near-identical expanders that perform dispatching > to other expanders based on operand types. Since the following patch > would require even more of these, avoid copy-pasting the code by > generating these expanders using an

Re: [PATCH v4 4/7] S/390: Implement vcond expander for V1TI,V1TF

2019-10-01 Thread Andreas Krebbel
On 01.10.19 15:27, Ilya Leoshkevich wrote: > Currently gcc does not emit wf{c,k}* instructions when comparing long > double values. Middle-end actually adds them in the first place, but > then veclower pass replaces them with floating point register pair > operations, because the corresponding

Re: [PATCH v3 5/9] S/390: Implement vcond expander for V1TI,V1TF

2019-09-30 Thread Andreas Krebbel
On 05.09.19 13:10, Ilya Leoshkevich wrote: > Currently gcc does not emit wf{c,k}* instructions when comparing long > double values. Middle-end actually adds them in the first place, but > then veclower pass replaces them with floating point register pair > operations, because the corresponding

Re: [PATCH v3 7/9] S/390: Remove code duplication in vec_* comparison expanders

2019-09-30 Thread Andreas Krebbel
On 05.09.19 13:10, Ilya Leoshkevich wrote: > s390.md uses a lot of near-identical expanders that perform dispatching > to other expanders based on operand types. Since the following patch > would require even more of these, avoid copy-pasting the code by > generating these expanders using an

Re: [PATCH v3 6/9] S/390: Remove code duplication in vec_unordered

2019-09-30 Thread Andreas Krebbel
On 05.09.19 13:10, Ilya Leoshkevich wrote: > vec_unordered is vec_ordered plus a negation at the end. > Reuse vec_unordered logic. > > gcc/ChangeLog: > > 2019-08-13 Ilya Leoshkevich > > PR target/77918 > * config/s390/vector.md (vec_unordered): Call > gen_vec_ordered. Ok.

Re: PR88751: Backport to GCC 8 and 9 branches?

2019-09-20 Thread Andreas Krebbel
On 06.09.19 12:48, Richard Biener wrote: > On Fri, Sep 6, 2019 at 10:11 AM Andreas Krebbel wrote: >> >> Hi, >> >> since this caused a critical performance regression in the OpenJ9 byte code >> interpreter after >> migrating from GCC 4.8 to GCC 7 I

PR88751: Backport to GCC 8 and 9 branches?

2019-09-06 Thread Andreas Krebbel
d3dc20418aad41af83fe45ccba527deb0b334983 Author: krebbel Date: Thu Jun 6 11:35:04 2019 + Fix PR88751 This patch implements a small improvement for the heuristic in lra which decides when it has to activate the simpler register allocation algorithm. gcc/ChangeLog: 2019-06-06 Andreas Krebbel

Re: [PATCH] S/390: Fix failing RTL check in s390_canonicalize_comparison

2019-09-02 Thread Andreas Krebbel
On 02.09.19 16:46, Ilya Leoshkevich wrote: > Bootstrap and regtest running on s390x-redhat-linux. > > The new sigfpe-eh.c fails with > > internal compiler error: RTL check: expected elt 0 type 'e' or 'u', have > 'w' (rtx const_int) > > This is most likely due to a typo: XEXP (*op1, 0) was

[Committed] S/390: Add add/sub/mul overflow check patterns

2019-07-24 Thread Andreas Krebbel
This patch implements the addv, subv, and mulv patterns for signed integers. Bootstrapped and regression tested on s390x (IBM z14). Committed to mainline. gcc/ChangeLog: 2019-07-24 Andreas Krebbel * config/s390/predicates.md (addv_const_operand): New predicate. * config

<    1   2   3   4   5   6   7   8   9   10   >