r177819 - Make clang to mark static stack allocations with lifetime markers to enable a more aggressive stack coloring.

Chris Lattner clattner at apple.com
Mon Mar 25 16:19:59 PDT 2013


On Mar 25, 2013, at 12:58 PM, Ulrich Weigand <Ulrich.Weigand at de.ibm.com> wrote:
> 
> The computation of "Elt" above looks to be correct only for little-endian
> platforms ...
> 
> If I disable the whole OptimizeIntToFloatBitCast optimization, I get the
> correct result again.

Yes, this does look endian unsafe.  I'd be fine with you disabling this when targeting a big-endian system.  It would be nice to generalize the code, but it isn't critical at all.

-Chris

> 
> 
> Chris, this optimization came in via your commits:
> 
> ------------------------------------------------------------------------
> r112232 | lattner | 2010-08-26 17:14:59 -0500 (Thu, 26 Aug 2010) | 5 lines
> 
> optimize "integer extraction out of the middle of a vector" as produced
> by SRoA.  This is part of rdar://7892780, but needs another xform to
> expose this.
> 
> 
> ------------------------------------------------------------------------
> r112227 | lattner | 2010-08-26 16:55:42 -0500 (Thu, 26 Aug 2010) | 43 lines
> 
> optimize bitcast(trunc(bitcast(x))) where the result is a float and 'x'
> is a vector to be a vector element extraction.
> 
> 
> Would you agree that this is incorrect on big-endian machines, or am I
> missing something here?
> 
> 
> Bye,
> Ulrich
> 




More information about the cfe-commits mailing list