[Patch] Avoid conversion to float when creating ConstantDataArray/ConstantDataVector

Raoux, Thomas F thomas.f.raoux at intel.com
Thu Feb 5 13:34:48 PST 2015


There is a test as part of the patch. Let me know if any other tests are needed. The spec already specify that bitcast doesn't change any bits. Although here it is not the bitcast changing the bits but the insertElement. I would expect that the insertElement shouldn't change the bits either.

"The ‘bitcast‘ instruction converts value to type ty2 without changing any bits."


-----Original Message-----
From: Rafael Espíndola [mailto:rafael.espindola at gmail.com] 
Sent: Thursday, February 05, 2015 1:23 PM
To: Raoux, Thomas F
Cc: llvm-commits at cs.uiuc.edu; Nick Lewycky
Subject: Re: [Patch] Avoid conversion to float when creating ConstantDataArray/ConstantDataVector

This needs a testcase.

In the end, was it decided that cast of floats have to preserve exact bit parterns? Should we make that explicit in the language reference?

On 28 January 2015 at 11:15, Raoux, Thomas F <thomas.f.raoux at intel.com> wrote:
> Hi,
>
> Could someone review (and possibly commit) this patch related to ConstantDataArray/ConstantDataVector?
>
> This addresses a bug discussed in this thread: 
> http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-January/080575.html
>
> To avoid conversion to float and potential change of the constant I added new constructors for float types for ConstantDataArray/ConstantDataVector.
>
> Cheers,
> Thomas
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>




More information about the llvm-commits mailing list