This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Committed] IBM Z: Add pattern for load truth value of comparison into reg
- From: Richard Henderson <rth at twiddle dot net>
- To: Andreas Krebbel <krebbel at linux dot ibm dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 11 Nov 2019 15:39:03 +0100
- Subject: Re: [Committed] IBM Z: Add pattern for load truth value of comparison into reg
- References: <20191107115252.26397-1-krebbel@linux.ibm.com>
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<mode>_z13"
> + [(set (match_operand:GPR 0 "register_operand" "=&d")
> + (match_operator:GPR 1 "s390_comparison"
> + [(match_operand 2 "cc_reg_operand" "c")
> + (match_operand 3 "const_int_operand" "")]))]
The clobbered-output seems superfluous, since it can't overlap "c".
I believe the only valid const_int is 0, fwiw, so perhaps matching any
const_int is overkill.
Does it help Z12 to allow the 3-insn sequence using LOC(G)R?
> + "TARGET_Z13"
> + "#"
> + "reload_completed"
> + [(set (match_dup 0) (const_int 0))
> + (set (match_dup 0)
> + (if_then_else:GPR
> + (match_op_dup 1 [(match_dup 2) (match_dup 3)])
> + (const_int 1)
> + (match_dup 0)))])
r~