Displaying 2 results from an estimated 2 matches for "vali8".
Did you mean:
valid
2011 Sep 06
4
[LLVMdev] Unexpected behavior reading/writing <8 x i1> vector to memory
...e back!). This happens both with TOT and 2.9. This program illustrates the issue:
define i32 @foo() {
%c = alloca <8 x i1>
store <8 x i1> <i1 true, i1 false, i1 false, i1 false, i1 false, i1 false, i1 false, i1 false>, <8 x i1>* %c
%val = load <8 x i1>* %c
%vali8 = bitcast <8 x i1> %val to i8
%vali32 = zext i8 %vali8 to i32
ret i32 %vali32
}
If I run this through opt -mem2reg before compiling with llc, then I basically get:
_foo:
movl $1, %eax
ret
which looks good to me (and is the result I expect).
If I just run it through llc without mem2r...
2011 Sep 06
0
[LLVMdev] Unexpected behavior reading/writing <8 x i1> vector to memory
...oth with TOT and 2.9. This program illustrates the issue:
>
> define i32 @foo() {
> %c = alloca <8 x i1>
> store <8 x i1> <i1 true, i1 false, i1 false, i1 false, i1 false, i1 false, i1 false, i1 false>, <8 x i1>* %c
> %val = load <8 x i1>* %c
> %vali8 = bitcast <8 x i1> %val to i8
> %vali32 = zext i8 %vali8 to i32
> ret i32 %vali32
> }
>
> If I run this through opt -mem2reg before compiling with llc, then I basically get:
>
> _foo:
> movl $1, %eax
> ret
>
> which looks good to me (and is...