[LLVMdev] type promotion i16 -> i32
Giovanni Ansaloni
giovanni.ansaloni at epfl.ch
Thu Jun 23 08:47:29 PDT 2011
Hello,
I'm developing a llvm backend. It seems that, if i16 is not a legal type
(no register can hold i16 types in RegisterInfo.td and as a RegisterClass in
SelLowering.cpp), i16 should be promoted to i32.
Nonotheless, this simple program:
int main(){
volatile short a;
a= 3;
return 0;
}
which is trasformed in this IR:
define i32 @main() nounwind readnone {
entry:
%a = alloca i16, align 2 ; <i16*> [#uses=1]
volatile store i16 3, i16* %a, align 2
ret i32 0
}
fails to compile with the following error:
LLVM ERROR: Cannot yet select: 0x181c2d0: ch = store 0x1204a08, 0x181c248,
0x181be90, 0x181bfa0 <0x12022ec:0> <trunc i16> <volatile> alignment=2
Can anybody help?
Thanks
Giovanni.
--
View this message in context: http://old.nabble.com/type-promotion-i16--%3E-i32-tp31911111p31911111.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.
More information about the llvm-dev
mailing list