Hi,<br><br>Here is C function:<br><br>uint64_t mul(uint32_t x, uint32_t y) {<br>  return x * y;<br>}<br><br>current llvm-gcc-4.0 with -O3 will compile it to:<br><br>define i64 @mul(i32 %x, i32 %y) nounwind  {<br>entry:<br>
    %tmp3 = mul i32 %y, %x      ; <i32> [#uses=1]<br>    %tmp34 = zext i32 %tmp3 to i64      ; <i64> [#uses=1]<br>    ret i64 %tmp34<br>}<br><br>This seems incorrect. I think it should extend %x, %y to i64 first and then do the multiplication stuff.
<br>Otherwise, the result may lose some bits if %x, %y are very big.<br><br>gcc seems have the same issue. Is this a bug or just gcc's rule?<br><br><br>Thanks,<br>Sheng.<br>