This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH i386 2/8] [AVX512] Add mask registers.


On 07/31/2013 05:02 AM, Kirill Yukhin wrote:
> 
> There's ICE (max. number of generated reload insns per insn is achieved (90)),
> when LRA tried to save mask register before call. This was caused by fact that  split_reg function
> in lra-constraints.c allocates memory for saved reg in SECONDARY_MEMORY_NEEDED_MODE which 

I've told you before that it's not SECONDARY_MEMORY that you want, but
a secondary reload.  You should be patching ix86_secondary_reload, right
below where we handle QImode spills from non-Q registers for x86-32.

> +(define_insn "kand<mode>"
> +  [(set (match_operand:SWI12 0 "register_operand" "=Yk")
> +	(unspec:SWI12
> +	  [(match_operand:SWI12 1 "register_operand" "Yk")
> +	   (match_operand:SWI12 2 "register_operand" "Yk")]
> +	  UNSPEC_KAND))]

Trying to avoid auto usage of the registers?  Maybe.  I can see this hurting
too, depending on how complicated the expressions get.

> +(define_insn "kxnor<mode>"
> +  [(set (match_operand:SWI12 0 "register_operand" "=Yk")
> +	(not:SWI12
> +	  (xor:SWI12

E.g. your partial conversion to unspecs here.  Will never match.

> +(define_insn "kortestzhi"
> +  [(set (reg:CCZ FLAGS_REG)
> +	(compare:CCZ
> +	  (ior:HI

And here.

> +(define_insn "kortestchi"
> +  [(set (reg:CCC FLAGS_REG)
> +	(compare:CCC
> +	  (ior:HI

And here.

> +(define_insn "kunpckhi"
> +  [(set (match_operand:HI 0 "register_operand" "=Yk")
> +	(ior:HI
> +	  (ashift:HI

And here.

> +(define_insn "*one_cmplhi2_1"
> +  [(set (match_operand:HI 0 "nonimmediate_operand" "=rm,Yk")
> +	(not:HI (match_operand:HI 1 "nonimmediate_operand" "0,Yk")))]
> +  "ix86_unary_operator_ok (NOT, HImode, operands)"
> +  "@
> +   not{w}\t%0
> +   knotw\t{%1, %0|%0, %1}"

But not here?  And if this is the route to go, surely "*Yk".



r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]