This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/22077] [4.0/4.1 Regression] vec_all_eq does not produce good result
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Jun 2005 22:53:36 -0000
- Subject: [Bug target/22077] [4.0/4.1 Regression] vec_all_eq does not produce good result
- References: <20050615141027.22077.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-15 22:53 -------
This does not look like target bug after all. The extra move does not matter as it is removed in the 3.4/
4.0 case before getting to .combine:
int foo(vector float x, vector float y) {
int t = vec_all_eq(x,y);
if (t) return 3245;
else return 12;
}
it looks like .combine is not doing its job and we reject now the combine of the following RTL:
(insn 11 10 12 0 (set (reg:SI 121)
(lt:SI (reg:CC 74 cr6)
(const_int 0 [0x0]))) 424 {*rs6000.md:11313} (insn_list 10 (nil))
(expr_list:REG_DEAD (reg:CC 74 cr6)
(nil)))
(insn 12 11 13 0 (set (reg:CC 123)
(compare:CC (reg:SI 121)
(const_int 0 [0x0]))) 415 {*cmpsi_internal1} (insn_list 11 (nil))
(expr_list:REG_DEAD (reg:SI 121)
(nil)))
(jump_insn 13 12 40 0 (set (pc)
(if_then_else (eq (reg:CC 123)
(const_int 0 [0x0]))
(label_ref 22)
(pc))) 521 {*rs6000.md:13595} (insn_list 12 (nil))
(expr_list:REG_DEAD (reg:CC 123)
(expr_list:REG_BR_PROB (const_int 5000 [0x1388])
(nil))))
Into:
(insn 12 11 13 0 (set (reg:CCEQ 123)
(compare:CCEQ (lt:SI (reg:CC 74 cr6)
(const_int 0 [0x0]))
(const_int 0 [0x0]))) 527 {*cceq_rev_compare} (insn_list 10 (nil))
(expr_list:REG_DEAD (reg:CC 74 cr6)
(nil)))
(jump_insn 13 12 40 0 (set (pc)
(if_then_else (eq (reg:CCEQ 123)
(const_int 0 [0x0]))
(label_ref 22)
(pc))) 521 {*rs6000.md:13595} (insn_list 12 (nil))
(expr_list:REG_DEAD (reg:CC 123)
(expr_list:REG_BR_PROB (const_int 5000 [0x1388])
(nil))))
This might be due to the changes in taking into account the cost.
Maybe combine should combine it even further to the correct thing.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22077