(divsi3): Fix divide by 2^N with compare RTL.
From-SVN: r7498
This commit is contained in:
parent
f63184aca6
commit
b6b12107a9
@ -1254,8 +1254,9 @@
|
||||
|
||||
(define_insn ""
|
||||
[(set (match_operand:CC 0 "cc_reg_operand" "=x")
|
||||
(div:SI (match_operand:SI 1 "gpc_reg_operand" "r")
|
||||
(match_operand:SI 2 "const_int_operand" "N")))
|
||||
(compare:CC (div:SI (match_operand:SI 1 "gpc_reg_operand" "r")
|
||||
(match_operand:SI 2 "const_int_operand" "N"))
|
||||
(const_int 0)))
|
||||
(clobber (match_scratch:SI 3 "=r"))]
|
||||
"exact_log2 (INTVAL (operands[2])) >= 0"
|
||||
"{srai|srawi} %3,%1,%p2\;{aze.|addze.} %3,%3"
|
||||
@ -1264,8 +1265,9 @@
|
||||
|
||||
(define_insn ""
|
||||
[(set (match_operand:CC 3 "cc_reg_operand" "=x")
|
||||
(div:SI (match_operand:SI 1 "gpc_reg_operand" "r")
|
||||
(match_operand:SI 2 "const_int_operand" "N")))
|
||||
(compare:CC (div:SI (match_operand:SI 1 "gpc_reg_operand" "r")
|
||||
(match_operand:SI 2 "const_int_operand" "N"))
|
||||
(const_int 0)))
|
||||
(set (match_operand:SI 0 "gpc_reg_operand" "=r")
|
||||
(div:SI (match_dup 1) (match_dup 2)))]
|
||||
"exact_log2 (INTVAL (operands[2])) >= 0"
|
||||
|
Loading…
Reference in New Issue
Block a user