kripken/emscripten — pull request #505 by caiiiycuk (2012-07-09 14:30:32+00:00)
Title: llvm_uadd_with_overflow_i8

When i compile project with optimization flags --llvm-opts 1 --llvm-lto 1, i have error:

Uncaught TypeError: Property '_llvm_uadd_with_overflow_i8' of object [object DOMWindow] is not a function

Surrounding code:

var $22=(($v+188)|0);
var $23=HEAP8[($22)];
var $uadd=_llvm_uadd_with_overflow_i8($23, $6);
var $24=$uadd.f0;
HEAP8[($22)]=$24;
var $25=$_12 & 1;
var $26=(($25 << 24) >> 24)==0;
var $27=(($v+186)|0);
--
}
}
var _llvm_uadd_with_overflow_i8; // stub for _llvm_uadd_with_overflow_i8

I add implementation for llvm_uadd_with_overflow_i8, but i dont clearly understand why we should do x>>>0, y>>>0 (may be it is for get values unsigned)?