[(set_attr "type" "store")])
(define_insn_and_split "bswaphi2_reg"
- [(set (match_operand:HI 0 "gpc_reg_operand" "=&r,wa")
+ [(set (match_operand:HI 0 "gpc_reg_operand" "=r,&r,wa")
(bswap:HI
- (match_operand:HI 1 "gpc_reg_operand" "r,wa")))
- (clobber (match_scratch:SI 2 "=&r,X"))]
+ (match_operand:HI 1 "gpc_reg_operand" "r,r,wa")))
+ (clobber (match_scratch:SI 2 "=X,&r,X"))]
""
"@
+ brh %0,%1
#
xxbrh %x0,%x1"
- "reload_completed && int_reg_operand (operands[0], HImode)"
+ "reload_completed && !TARGET_POWER10 && int_reg_operand (operands[0], HImode)"
[(set (match_dup 3)
(and:SI (lshiftrt:SI (match_dup 4)
(const_int 8))
operands[3] = simplify_gen_subreg (SImode, operands[0], HImode, 0);
operands[4] = simplify_gen_subreg (SImode, operands[1], HImode, 0);
}
- [(set_attr "length" "12,4")
- (set_attr "type" "*,vecperm")
- (set_attr "isa" "*,p9v")])
+ [(set_attr "length" "*,12,*")
+ (set_attr "type" "shift,*,vecperm")
+ (set_attr "isa" "p10,*,p9v")])
;; We are always BITS_BIG_ENDIAN, so the bit positions below in
;; zero_extract insns do not change for -mlittle.
(define_insn_and_split "bswapsi2_reg"
- [(set (match_operand:SI 0 "gpc_reg_operand" "=&r,wa")
+ [(set (match_operand:SI 0 "gpc_reg_operand" "=r,&r,wa")
(bswap:SI
- (match_operand:SI 1 "gpc_reg_operand" "r,wa")))]
+ (match_operand:SI 1 "gpc_reg_operand" "r,r,wa")))]
""
"@
+ brw %0,%1
#
xxbrw %x0,%x1"
- "reload_completed && int_reg_operand (operands[0], SImode)"
+ "reload_completed && !TARGET_POWER10 && int_reg_operand (operands[0], SImode)"
[(set (match_dup 0) ; DABC
(rotate:SI (match_dup 1)
(const_int 24)))
(and:SI (match_dup 0)
(const_int -256))))]
""
- [(set_attr "length" "12,4")
- (set_attr "type" "*,vecperm")
- (set_attr "isa" "*,p9v")])
+ [(set_attr "length" "4,12,4")
+ (set_attr "type" "shift,*,vecperm")
+ (set_attr "isa" "p10,*,p9v")])
;; On systems with LDBRX/STDBRX generate the loads/stores directly, just like
;; we do for L{H,W}BRX and ST{H,W}BRX above. If not, we have to generate more
emit_insn (gen_bswapdi2_store (dest, src));
}
else if (TARGET_P9_VECTOR)
- emit_insn (gen_bswapdi2_xxbrd (dest, src));
+ emit_insn (gen_bswapdi2_brd (dest, src));
else
emit_insn (gen_bswapdi2_reg (dest, src));
DONE;
"stdbrx %1,%y0"
[(set_attr "type" "store")])
-(define_insn "bswapdi2_xxbrd"
- [(set (match_operand:DI 0 "gpc_reg_operand" "=wa")
- (bswap:DI (match_operand:DI 1 "gpc_reg_operand" "wa")))]
+(define_insn "bswapdi2_brd"
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=r,wa")
+ (bswap:DI (match_operand:DI 1 "gpc_reg_operand" "r,wa")))]
"TARGET_P9_VECTOR"
- "xxbrd %x0,%x1"
- [(set_attr "type" "vecperm")
- (set_attr "isa" "p9v")])
+ "@
+ brd %0,%1
+ xxbrd %x0,%x1"
+ [(set_attr "type" "shift,vecperm")
+ (set_attr "isa" "p10,p9v")])
(define_insn "bswapdi2_reg"
[(set (match_operand:DI 0 "gpc_reg_operand" "=&r")