[Bug optimization/14287] [tree-ssa] does not remove unnecessary extensions

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Mar 17 01:46:00 GMT 2004


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-17 01:46 -------
Actually it is not that involved at all.
Basically here is how my pass works:
For each block:
  For each statement in the block:
    is the statement is a modify expression and the RHS is a cast then:
      is the cast's operand's definition a modifiy express and its RHS a cast also:
        Do the inner and outer types match and is the intermediate's type size is larger or 
equal to the outer's type then remove change the statement to point to the outer variable.

Let DCE do its work with respect to getting rid of the intermediate variable.

-- 


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



More information about the Gcc-bugs mailing list