[llvm] r178031 - Make InstCombineCasts.cpp:OptimizeIntToFloatBitCast endian safe.

Ulrich Weigand Ulrich.Weigand at de.ibm.com
Tue Mar 26 09:46:26 PDT 2013


Duncan Sands <baldrick at free.fr> wrote:

> > Make InstCombineCasts.cpp:OptimizeIntToFloatBitCast endian safe.
> ...
>
> the testcase seems to be missing.

Hmm, it fixed an existing test case failure for me on PowerPC.
But I can try and see if I manage to extract a .ll level test case.

> > +  // We need to know the target byte order to perform this
optimization.
> > +  if (!IC.getDataLayout()) return 0;
> > +
>
> I think DataLayout is only needed in the vector case, so how about
testing it
> later when the code is treating the vector case, and do the bailing out
there.
> That way the non-vector case will still be optimized if there is no
> target data.

I'm sorry, but I don't see any non-vector case in this routine ...
Could you elaborate?

Bye,
Ulrich




More information about the llvm-commits mailing list