This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/31799] Failed to optimize out test instruction
- From: "hjl at lucon dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 May 2007 01:31:40 -0000
- Subject: [Bug rtl-optimization/31799] Failed to optimize out test instruction
- References: <bug-31799-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from hjl at lucon dot org 2007-05-05 02:31 -------
The problem may be patterns like
[(set (match_operand:SI 0 "nonimmediate_operand" "=r,rm,r")
(plus:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0,r")
(match_operand:SI 2 "general_operand" "rmni,rni,lni")))
(clobber (reg:CC FLAGS_REG))]
What if we replace (clobber (reg:CC FLAGS_REG)) with something more
reasonable like
(set (reg FLAGS_REG)
(compare
(plus:SI (match_dup 1) (match_dup 2))
(const_int 0)))
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31799