[Bug optimization/14844] New: [tree-ssa] narrow types if wide result is not needed

kazu at cs dot umass dot edu gcc-bugzilla@gcc.gnu.org
Sun Apr 4 16:16:00 GMT 2004


Consider:

int
foo (int a, int b)
{
  long long aa = a;
  long long bb = b;
  return aa + bb;
}

The last tree looks like:

foo (a, b)
{
<bb 0>:
  return (int)(long long int)a + (int)(long long int)b;

}

We may be able to solve this problem by propagating narrowing casts backward.

-- 
           Summary: [tree-ssa] narrow types if wide result is not needed
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Keywords: pessimizes-code
          Severity: enhancement
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kazu at cs dot umass dot edu
                CC: gcc-bugs at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list