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 optimization/2962] inefficient code with and


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2962


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |
            Summary|unnecessary instruction cwtl|inefficient code with and


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-08-10 15:34 -------
The problem is that gcc is producing a sign_extend and not removing based on the "and":
(insn 4 3 6 0 (set (reg/v:SI 59 [ i ])
        (sign_extend:SI (mem/f:HI (reg/f:SI 16 argp) [2 i+0 S2 A16]))) 90 {extendhisi2} (nil)
    (nil))

(note 6 4 13 0 NOTE_INSN_FUNCTION_BEG)

(insn 13 6 18 0 (parallel [
            (set (reg:SI 61)
                (and:SI (reg/v:SI 59 [ i ])
                    (const_int 1 [0x1])))
            (clobber (reg:CC 17 flags))
        ]) 212 {*andsi_1} (insn_list 4 (nil))
    (expr_list:REG_DEAD (reg/v:SI 59 [ i ])
        (expr_list:REG_UNUSED (reg:CC 17 flags)
            (nil))))


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