This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Committed] S/390: Add bswaphi2 pattern
- From: Richard Henderson <rth at redhat dot com>
- To: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 20 Nov 2015 13:23:02 +0100
- Subject: Re: [Committed] S/390: Add bswaphi2 pattern
- Authentication-results: sourceware.org; auth=none
- References: <20151120115223 dot GA4423 at maggie>
On 11/20/2015 12:52 PM, Andreas Krebbel wrote:
+(define_insn "bswaphi2"
+ [(set (match_operand:HI 0 "register_operand" "=d")
+ (bswap:HI (match_operand:HI 1 "memory_operand" "RT")))]
+ "TARGET_CPU_ZARCH"
+ "lrvh\t%0,%1"
+ [(set_attr "type" "load")
+ (set_attr "op_type" "RXY")
+ (set_attr "z10prop" "z10_super")])
Surely it's better to arrange so that you can use STRVH as well.
And providing a fallback for the reg-reg case (e.g. LRVR+SRL).
Although I suppose I don't see support for STRV in bswap32/64 either...
r~