https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115881

--- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Richard Sandiford from comment #4)
> As expected, the results weren't pretty.  Things like:
> 
> (define_split
>   [(set (match_operand:SWI48 0 "register_operand")
>         (and:SWI48 (match_dup 0)
>                    (const_int -65536)))
>    (clobber (reg:CC FLAGS_REG))]
>   "(TARGET_FAST_PREFIX && !TARGET_PARTIAL_REG_STALL)
>     || optimize_function_for_size_p (cfun)"
>   [(set (strict_low_part (match_dup 1)) (const_int 0))]
>   "operands[1] = gen_lowpart (HImode, operands[0]);")
> 
> expect to be able to generate (strict_low_part (subreg:HI (reg:DI SP) 0))
> after reload, so we can't ban it outright.  The fallback was going to be
> to make register_operand reject subregs after reload, but patterns like:
> 
> (define_insn_and_split "*neg<mode>_1_slp"
>   [(set (strict_low_part (match_operand:SWI12 0 "register_operand"
> "+<r>,&<r>")\
> )
>         (neg:SWI12 (match_operand:SWI12 1 "register_operand" "0,!<r>")))
>    (clobber (reg:CC FLAGS_REG))]
> 
> use register_operand for cases like the above.  Not really sure what
> to do here.

Maybe define "register_operand_slp" predicate that would allow SUBREGs after
reload? When accessing the operand of "register_operand_slp" after reload, one
would have to use reg_or_subregno instead of REGNO.

Reply via email to