If I have an '&' operator inside an 'if' statement, LLVM seems to always promote a 16 bit integer type to a 32 bit integer type.  I don't want this to happen because my back-end only supports 16 bit types.  Why is this happening?  Where might this be happening, so I can fix it?  It doesn't seem to happen with the '|' operator, only '&'.  Thanks!<br>
<br>Code is below.  Relevant code highlighted in <b>bold</b>.<br><br><br>C Function:<br>-------------------<br><br>$cat test.c<br>short foo(short a) {<br>  if <b>(a & 1)</b><br>    return -1;<br>  else<br>    return 1;<br>
}<br><br>LLVM:<br>---------------------<br><br>$ cat test.ll<br>; ModuleID = 'test.o'<br>target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"<br>
target triple = "i386-pc-linux-gnu"<br><br>define signext i16 @foo(i16 signext %a) nounwind readnone {<br>entry:<br>        <b>%0 = zext i16 %a to i32         ; <i32> [#uses=1]</b><br>        %1 = and i32 %0, 1              ; <i32> [#uses=1]<br>
        %toBool = icmp eq i32 %1, 0             ; <i1> [#uses=1]<br>        %.0 = select i1 %toBool, i16 1, i16 -1          ; <i16> [#uses=1]<br>        ret i16 %.0<br>}<br><br>