[llvm-commits] [llvm] r72688 - in /llvm/trunk: lib/Transforms/Scalar/ScalarReplAggregates.cpp test/Transforms/ScalarRepl/2009-06-01-BitcastIntPadding.ll

Eli Friedman eli.friedman at gmail.com
Mon Jun 1 16:09:07 PDT 2009


On Mon, Jun 1, 2009 at 6:38 AM, Duncan Sands<baldrick at free.fr> wrote:
> Hi Eli,
>
>> +     %a = alloca %struct.singlebool, align 1         ; <%struct.singlebool*> [#uses=2]
>> +     %storetmp.i = bitcast %struct.singlebool* %a to i1*             ; <i1*> [#uses=1]
>> +     store i1 true, i1* %storetmp.i
>> +     %tmp = getelementptr %struct.singlebool* %a, i64 0, i32 0               ; <i8*> [#uses=1]
>> +     %tmp1 = load i8* %tmp           ; <i8> [#uses=1]
>> +     ret i8 %tmp1
>
> what does this return?  It's unspecified as to what is stored in
> the extra bits when you do an i1 store (in fact it is zero, but
> we may want to keep some freedom here).

It returns something with a bottom bit of 1.  Note that this is a
simplified version of the original testcase.

-Eli




More information about the llvm-commits mailing list