[LLVMdev] Is bitcast now needed in LLVM?

Dave Pitsbawn dpitsbawn at gmail.com
Fri Apr 17 01:21:29 PDT 2015


Got it. Thanks for clearing that up.

On Fri, Apr 17, 2015 at 1:16 AM, James Molloy <james at jamesmolloy.co.uk>
wrote:

> Hi,
>
> sitofp has different semantics to bitcast. "bitcast i32 %a to float" would
> not do int-to-float conversion, but would perform the equivalent of "f =
> *&i;".
>
> Also, bitcast is still not a no-op in AArch64 big endian - we have to do
> vector shuffling still.
>
> Cheers,
>
> James
>
> On Fri, 17 Apr 2015 at 09:14 Dave Pitsbawn <dpitsbawn at gmail.com> wrote:
>
>> I always thought that bitcast was a no-op internal llvm thing to fit the
>> IR type system.
>>
>> I currently use sitofp, but I see your point.
>>
>> On Fri, Apr 17, 2015 at 1:04 AM, James Molloy <james at jamesmolloy.co.uk>
>> wrote:
>>
>>> Hi Dave,
>>>
>>> You can still bitcast between i32 and float, for example.
>>>
>>> Cheers,
>>>
>>> James
>>>
>>> On Fri, 17 Apr 2015 at 09:03 Dave Pitsbawn <dpitsbawn at gmail.com> wrote:
>>>
>>>> Seems like a new change in LLVM has made it so that bitcast of bitcast
>>>> i8* %1 to %Foo* meaningless?
>>>>
>>>> If I'm correct is there any need for the bitcast anymore?
>>>> _______________________________________________
>>>> LLVM Developers mailing list
>>>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>>>
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150417/c1803265/attachment.html>


More information about the llvm-dev mailing list