Commit e8536e2b by Kyrylo Tkachov Committed by Kyrylo Tkachov

[2/3][AArch64] Keep CTZ components together until after reload

	PR middle-end/37780
	* config/aarch64/aarch64.md (ctz<mode>2): Convert to
	define_insn_and_split.

From-SVN: r237139
parent 3295b529
2016-06-06 Kyrylo Tkachov <kyrylo.tkachov@arm.com> 2016-06-06 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR middle-end/37780 PR middle-end/37780
* config/aarch64/aarch64.md (ctz<mode>2): Convert to
define_insn_and_split.
2016-06-06 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR middle-end/37780
* config/arm/arm.md (ctzsi2): Convert to define_insn_and_split. * config/arm/arm.md (ctzsi2): Convert to define_insn_and_split.
2016-06-06 Bernd Edlinger <bernd.edlinger@hotmail.de> 2016-06-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
......
...@@ -3784,16 +3784,23 @@ ...@@ -3784,16 +3784,23 @@
[(set_attr "type" "rbit")] [(set_attr "type" "rbit")]
) )
(define_expand "ctz<mode>2" ;; Split after reload into RBIT + CLZ. Since RBIT is represented as an UNSPEC
[(match_operand:GPI 0 "register_operand") ;; it is unlikely to fold with any other operation, so keep this as a CTZ
(match_operand:GPI 1 "register_operand")] ;; expression and split after reload to enable scheduling them apart if
;; needed.
(define_insn_and_split "ctz<mode>2"
[(set (match_operand:GPI 0 "register_operand" "=r")
(ctz:GPI (match_operand:GPI 1 "register_operand" "r")))]
"" ""
{ "#"
"reload_completed"
[(const_int 0)]
"
emit_insn (gen_rbit<mode>2 (operands[0], operands[1])); emit_insn (gen_rbit<mode>2 (operands[0], operands[1]));
emit_insn (gen_clz<mode>2 (operands[0], operands[0])); emit_insn (gen_clz<mode>2 (operands[0], operands[0]));
DONE; DONE;
} ")
)
(define_insn "*and<mode>_compare0" (define_insn "*and<mode>_compare0"
[(set (reg:CC_NZ CC_REGNUM) [(set (reg:CC_NZ CC_REGNUM)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment