This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/31799] Failed to optimize out test instruction



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]