Commit b4e8ceb9 by H.J. Lu Committed by H.J. Lu

Don't clear destination if it is used in source

	* config/i386/i386.md (*ctz<mode>2_falsedep_1): Don't clear
	destination if it is used in source.
	(*clz<mode>2_lzcnt_falsedep_1): Likewise.
	(*popcount<mode>2_falsedep_1): Likewise.

From-SVN: r214169
parent 95204cd5
2014-08-19 H.J. Lu <hongjiu.lu@intel.com> 2014-08-19 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/i386.md (*ctz<mode>2_falsedep_1): Don't clear
destination if it is used in source.
(*clz<mode>2_lzcnt_falsedep_1): Likewise.
(*popcount<mode>2_falsedep_1): Likewise.
2014-08-19 H.J. Lu <hongjiu.lu@intel.com>
PR other/62168 PR other/62168
* configure.ac: Set install_gold_as_default to no first. * configure.ac: Set install_gold_as_default to no first.
* configure: Regenerated. * configure: Regenerated.
......
...@@ -12269,8 +12269,11 @@ ...@@ -12269,8 +12269,11 @@
(match_operand:SWI248 1 "nonimmediate_operand"))) (match_operand:SWI248 1 "nonimmediate_operand")))
(clobber (reg:CC FLAGS_REG))])]) (clobber (reg:CC FLAGS_REG))])])
; False dependency happens when destination is only updated by tzcnt,
; lzcnt or popcnt. There is no false dependency when destination is
; also used in source.
(define_insn_and_split "*ctz<mode>2_falsedep_1" (define_insn_and_split "*ctz<mode>2_falsedep_1"
[(set (match_operand:SWI48 0 "register_operand" "=&r") [(set (match_operand:SWI48 0 "register_operand" "=r")
(ctz:SWI48 (ctz:SWI48
(match_operand:SWI48 1 "nonimmediate_operand" "rm"))) (match_operand:SWI48 1 "nonimmediate_operand" "rm")))
(clobber (reg:CC FLAGS_REG))] (clobber (reg:CC FLAGS_REG))]
...@@ -12283,7 +12286,10 @@ ...@@ -12283,7 +12286,10 @@
(ctz:SWI48 (match_dup 1))) (ctz:SWI48 (match_dup 1)))
(unspec [(match_dup 0)] UNSPEC_INSN_FALSE_DEP) (unspec [(match_dup 0)] UNSPEC_INSN_FALSE_DEP)
(clobber (reg:CC FLAGS_REG))])] (clobber (reg:CC FLAGS_REG))])]
"ix86_expand_clear (operands[0]);") {
if (!reg_mentioned_p (operands[0], operands[1]))
ix86_expand_clear (operands[0]);
})
(define_insn "*ctz<mode>2_falsedep" (define_insn "*ctz<mode>2_falsedep"
[(set (match_operand:SWI48 0 "register_operand" "=r") [(set (match_operand:SWI48 0 "register_operand" "=r")
...@@ -12363,7 +12369,7 @@ ...@@ -12363,7 +12369,7 @@
"TARGET_LZCNT") "TARGET_LZCNT")
(define_insn_and_split "*clz<mode>2_lzcnt_falsedep_1" (define_insn_and_split "*clz<mode>2_lzcnt_falsedep_1"
[(set (match_operand:SWI48 0 "register_operand" "=&r") [(set (match_operand:SWI48 0 "register_operand" "=r")
(clz:SWI48 (clz:SWI48
(match_operand:SWI48 1 "nonimmediate_operand" "rm"))) (match_operand:SWI48 1 "nonimmediate_operand" "rm")))
(clobber (reg:CC FLAGS_REG))] (clobber (reg:CC FLAGS_REG))]
...@@ -12376,7 +12382,10 @@ ...@@ -12376,7 +12382,10 @@
(clz:SWI48 (match_dup 1))) (clz:SWI48 (match_dup 1)))
(unspec [(match_dup 0)] UNSPEC_INSN_FALSE_DEP) (unspec [(match_dup 0)] UNSPEC_INSN_FALSE_DEP)
(clobber (reg:CC FLAGS_REG))])] (clobber (reg:CC FLAGS_REG))])]
"ix86_expand_clear (operands[0]);") {
if (!reg_mentioned_p (operands[0], operands[1]))
ix86_expand_clear (operands[0]);
})
(define_insn "*clz<mode>2_lzcnt_falsedep" (define_insn "*clz<mode>2_lzcnt_falsedep"
[(set (match_operand:SWI48 0 "register_operand" "=r") [(set (match_operand:SWI48 0 "register_operand" "=r")
...@@ -12683,7 +12692,7 @@ ...@@ -12683,7 +12692,7 @@
"TARGET_POPCNT") "TARGET_POPCNT")
(define_insn_and_split "*popcount<mode>2_falsedep_1" (define_insn_and_split "*popcount<mode>2_falsedep_1"
[(set (match_operand:SWI48 0 "register_operand" "=&r") [(set (match_operand:SWI48 0 "register_operand" "=r")
(popcount:SWI48 (popcount:SWI48
(match_operand:SWI48 1 "nonimmediate_operand" "rm"))) (match_operand:SWI48 1 "nonimmediate_operand" "rm")))
(clobber (reg:CC FLAGS_REG))] (clobber (reg:CC FLAGS_REG))]
...@@ -12696,7 +12705,10 @@ ...@@ -12696,7 +12705,10 @@
(popcount:SWI48 (match_dup 1))) (popcount:SWI48 (match_dup 1)))
(unspec [(match_dup 0)] UNSPEC_INSN_FALSE_DEP) (unspec [(match_dup 0)] UNSPEC_INSN_FALSE_DEP)
(clobber (reg:CC FLAGS_REG))])] (clobber (reg:CC FLAGS_REG))])]
"ix86_expand_clear (operands[0]);") {
if (!reg_mentioned_p (operands[0], operands[1]))
ix86_expand_clear (operands[0]);
})
(define_insn "*popcount<mode>2_falsedep" (define_insn "*popcount<mode>2_falsedep"
[(set (match_operand:SWI48 0 "register_operand" "=r") [(set (match_operand:SWI48 0 "register_operand" "=r")
......
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