[llvm-dev] Storing and loading of i1

Sanjoy Das via llvm-dev llvm-dev at lists.llvm.org
Sat Aug 19 13:16:35 PDT 2017


Hi Michael,

When in doubt about the canonical way to do something, try writing a
small C/C++ snippet and seeing what clang lowers it to, like so
https://godbolt.org/g/4zAFjM .

-- Sanjoy

On Thu, Aug 17, 2017 at 5:21 AM, Haidl, Michael via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> Hi,
>
> I am looking for the canonical way to store i1 values (results from
> compares) to memory and load them back in another function. Is a zext to
> i8 before the store and a trunc to i1 after the load of the stored i8 a
> safe approach?
>
> Cheers,
> Michael Haidl
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


More information about the llvm-dev mailing list