Re: [PATCH] Fix PR 63952 (Re: [PATCH, ifcvt] Allow CC mode if HAVE_cbranchcc4)

2014-11-21 Thread Richard Biener
On Fri, Nov 21, 2014 at 2:51 AM, Ulrich Weigand wrote: > Richard Biener wrote: > >> This probably caused bootstrap on s390x-linux to fail as in PR63952 >> (last checked with rev. 217714). > > It seems we have both a back-end bug and a middle-end bug here. > > First of all, this code in optabs.c:pr

[PATCH] Fix PR 63952 (Re: [PATCH, ifcvt] Allow CC mode if HAVE_cbranchcc4)

2014-11-20 Thread Ulrich Weigand
Richard Biener wrote: > This probably caused bootstrap on s390x-linux to fail as in PR63952 > (last checked with rev. 217714). It seems we have both a back-end bug and a middle-end bug here. First of all, this code in optabs.c:prepare_cmp_insn is quite strange: if (GET_MODE_CLASS (mode) == M

Re: [PATCH, ifcvt] Allow CC mode if HAVE_cbranchcc4 (fix s390 build)

2014-11-19 Thread Richard Biener
On Thu, Nov 13, 2014 at 7:57 PM, Ulrich Weigand wrote: > Richard Henderson wrote: >> On 11/12/2014 09:41 PM, Ulrich Weigand wrote: >> > * optabs.c (prepare_operand): Gracefully fail if the mode of X >> > does not match the operand mode expected by the insn pattern. >> >> This is ok. > > I'

Re: [PATCH, ifcvt] Allow CC mode if HAVE_cbranchcc4 (fix s390 build)

2014-11-17 Thread H.J. Lu
eigand; >> Andreas Krebbel >> Cc: gcc-patches@gcc.gnu.org >> Subject: Re: [PATCH, ifcvt] Allow CC mode if HAVE_cbranchcc4 (fix s390 > build) >> >> On 11/06/2014 08:44 AM, Zhenqiang Chen wrote: >> > Hi, >> > >> > The patch add runtime check to f

Re: [PATCH, ifcvt] Allow CC mode if HAVE_cbranchcc4 (fix s390 build)

2014-11-13 Thread Ulrich Weigand
Richard Henderson wrote: > On 11/12/2014 09:41 PM, Ulrich Weigand wrote: > > * optabs.c (prepare_operand): Gracefully fail if the mode of X > > does not match the operand mode expected by the insn pattern. > > This is ok. I've checked this in now, thanks. > I wondered whether s390 benefi

Re: [PATCH, ifcvt] Allow CC mode if HAVE_cbranchcc4 (fix s390 build)

2014-11-12 Thread Richard Henderson
On 11/13/2014 08:49 AM, Zhenqiang Chen wrote: > After adding HAVE_cbranchcc4, we can just use HAVE_cbranchcc4. No need to > add a local variable allow_cc_mode. > > Here is the updated patch. This is ok. Since I've already approved Ulrich's s390 fix, there should not be a problem there for long.

RE: [PATCH, ifcvt] Allow CC mode if HAVE_cbranchcc4 (fix s390 build)

2014-11-12 Thread Zhenqiang Chen
> -Original Message- > From: Richard Henderson [mailto:r...@redhat.com] > Sent: Thursday, November 06, 2014 4:23 PM > To: Zhenqiang Chen; 'Jan-Benedict Glaw'; Hartmut Penner; Ulrich Weigand; > Andreas Krebbel > Cc: gcc-patches@gcc.gnu.org > Subject: Re:

Re: [PATCH, ifcvt] Allow CC mode if HAVE_cbranchcc4 (fix s390 build)

2014-11-12 Thread Richard Henderson
On 11/12/2014 09:41 PM, Ulrich Weigand wrote: > * optabs.c (prepare_operand): Gracefully fail if the mode of X > does not match the operand mode expected by the insn pattern. This is ok. Another solution I'd thought about involved accepting the mode with the predicate, but FAILing in

Re: [PATCH, ifcvt] Allow CC mode if HAVE_cbranchcc4 (fix s390 build)

2014-11-12 Thread Ulrich Weigand
Zhenqiang Chen wrote: > Function noce_emit_store_flag tries to generate instruction to store flag by > emit_store_flag for general_operand. For s390, CCU is a general _operand, > but can not match cstorecc4, then it tries to generate a register move > instruction from CCU to CCZ1, which will trigg

RE: [PATCH, ifcvt] Allow CC mode if HAVE_cbranchcc4 (fix s390 build)

2014-11-11 Thread Zhenqiang Chen
> -Original Message- > From: Ulrich Weigand [mailto:uweig...@de.ibm.com] > Sent: Friday, November 07, 2014 12:11 AM > To: Richard Henderson > Cc: Zhenqiang Chen; 'Jan-Benedict Glaw'; Hartmut Penner; Andreas Krebbel; > gcc-patches@gcc.gnu.org > Subject: Re:

Re: [PATCH, ifcvt] Allow CC mode if HAVE_cbranchcc4 (fix s390 build)

2014-11-07 Thread Ulrich Weigand
Richard Henderson wrote: > On 11/06/2014 05:10 PM, Ulrich Weigand wrote: > >>> + /* For s390, CC REG is general_operand. But cstorecc4 > >>> only > >>> + handles CCZ1, which can not handle others like CCU. > >>> */ > >>> + || GET_MODE_CLASS (GET_MODE (XEXP (c

Re: [PATCH, ifcvt] Allow CC mode if HAVE_cbranchcc4 (fix s390 build)

2014-11-06 Thread Richard Henderson
On 11/06/2014 05:10 PM, Ulrich Weigand wrote: >>> +/* For s390, CC REG is general_operand. But cstorecc4 >>> only >>> + handles CCZ1, which can not handle others like CCU. >>> */ >>> + || GET_MODE_CLASS (GET_MODE (XEXP (cond, 0))) == MODE_CC); >>> >>

Re: [PATCH, ifcvt] Allow CC mode if HAVE_cbranchcc4 (fix s390 build)

2014-11-06 Thread Ulrich Weigand
Richard Henderson wrote: > On 11/06/2014 08:44 AM, Zhenqiang Chen wrote: > > Hi, > > > > The patch add runtime check to fix s390 build fail > > (https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00050.html). > > > > And there is additional code to workaround s390 cstorecc4 issue. > > > > Bootstrap a

Re: [PATCH, ifcvt] Allow CC mode if HAVE_cbranchcc4 (fix s390 build)

2014-11-06 Thread Richard Henderson
On 11/06/2014 08:44 AM, Zhenqiang Chen wrote: > Hi, > > The patch add runtime check to fix s390 build fail > (https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00050.html). > > And there is additional code to workaround s390 cstorecc4 issue. > > Bootstrap and no make check regression on X86-64. > Bu

[PATCH, ifcvt] Allow CC mode if HAVE_cbranchcc4 (fix s390 build)

2014-11-05 Thread Zhenqiang Chen
Hi, The patch add runtime check to fix s390 build fail (https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00050.html). And there is additional code to workaround s390 cstorecc4 issue. Bootstrap and no make check regression on X86-64. Build s390-linux-gnu and s390x-linux-gnu. I do not have env to ru

RE: [BUILDROBOT] s390x-linux: Breaking in ifcvt.c (was: [PATCH, ifcvt] Allow CC mode if HAVE_cbranchcc4)

2014-11-03 Thread Zhenqiang Chen
Krebbel > Cc: 'Richard Henderson'; gcc-patches@gcc.gnu.org > Subject: Re: [BUILDROBOT] s390x-linux: Breaking in ifcvt.c (was: [PATCH, > ifcvt] > Allow CC mode if HAVE_cbranchcc4) > > On Mon, 2014-11-03 11:06:06 +0100, Jan-Benedict Glaw > wrote: > > On Wed, 2

RE: [BUILDROBOT] s390x-linux: Breaking in ifcvt.c (was: [PATCH, ifcvt] Allow CC mode if HAVE_cbranchcc4)

2014-11-03 Thread Zhenqiang Chen
ROBOT] s390x-linux: Breaking in ifcvt.c (was: [PATCH, > ifcvt] > Allow CC mode if HAVE_cbranchcc4) > > On Mon, 2014-11-03 11:06:06 +0100, Jan-Benedict Glaw > wrote: > > On Wed, 2014-10-29 18:27:57 +0800, Zhenqiang Chen > wrote: > > > Hi, > > &

Re: [BUILDROBOT] s390x-linux: Breaking in ifcvt.c (was: [PATCH, ifcvt] Allow CC mode if HAVE_cbranchcc4)

2014-11-03 Thread Jan-Benedict Glaw
On Mon, 2014-11-03 11:06:06 +0100, Jan-Benedict Glaw wrote: > On Wed, 2014-10-29 18:27:57 +0800, Zhenqiang Chen > wrote: > > Hi, > > > > The patch enhances ifcvt to allow_cc_mode if HAVE_cbranchcc4. > > > > Bootstrap and no make check regression on X86-64. > > Will add new test cases after ccm

Re: [PATCH, ifcvt] Allow CC mode if HAVE_cbranchcc4

2014-11-03 Thread Andreas Schwab
"Zhenqiang Chen" writes: > diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c > index a28f5c1..5cd0ac0 100644 > --- a/gcc/ifcvt.c > +++ b/gcc/ifcvt.c > @@ -1441,10 +1441,17 @@ noce_emit_cmove (struct noce_if_info *if_info, rtx > x, enum rtx_code code, >end_sequence (); > } > > - /* Don't even

Re: [BUILDROBOT] s390x-linux: Breaking in ifcvt.c (was: [PATCH, ifcvt] Allow CC mode if HAVE_cbranchcc4)

2014-11-03 Thread Jakub Jelinek
On Mon, Nov 03, 2014 at 11:06:06AM +0100, Jan-Benedict Glaw wrote: > On Wed, 2014-10-29 18:27:57 +0800, Zhenqiang Chen > wrote: > > Hi, > > > > The patch enhances ifcvt to allow_cc_mode if HAVE_cbranchcc4. > > > > Bootstrap and no make check regression on X86-64. > > Will add new test cases aft

[BUILDROBOT] s390x-linux: Breaking in ifcvt.c (was: [PATCH, ifcvt] Allow CC mode if HAVE_cbranchcc4)

2014-11-03 Thread Jan-Benedict Glaw
On Wed, 2014-10-29 18:27:57 +0800, Zhenqiang Chen wrote: > Hi, > > The patch enhances ifcvt to allow_cc_mode if HAVE_cbranchcc4. > > Bootstrap and no make check regression on X86-64. > Will add new test cases after ccmp is enabled. > > Ok for trunk? This seems to uncover something for s390x-l

Re: [PATCH, ifcvt] Allow CC mode if HAVE_cbranchcc4

2014-10-29 Thread Richard Henderson
On 10/29/2014 03:27 AM, Zhenqiang Chen wrote: > > ChangeLog: > 2014-10-29 Zhenqiang Chen > > * ifcvt.c (noce_emit_cmove, noce_get_alt_condition, > noce_get_condition): > Allow CC mode if HAVE_cbranchcc4. Ok. r~

[PATCH, ifcvt] Allow CC mode if HAVE_cbranchcc4

2014-10-29 Thread Zhenqiang Chen
Hi, The patch enhances ifcvt to allow_cc_mode if HAVE_cbranchcc4. Bootstrap and no make check regression on X86-64. Will add new test cases after ccmp is enabled. Ok for trunk? Thanks! -Zhenqiang ChangeLog: 2014-10-29 Zhenqiang Chen * ifcvt.c (noce_emit_cmove, noce_get_alt_conditio