I tested a simple function shown as follows for for llvm-g++:
-------------------------------------------------------------
void f_loop(long* c, long sz) {
long i;
for (i = 0; i < sz; i++) {
long offset = i * sz;
long* out = c + offset;
out[i] = 0;
}
}
-------------------------------------------------------------
LLVM assembly was emitted out as follows:
-------------------------------------------------------------
void %_Z6f_loopPll(int* %c, int %sz) {
entry:
%sz = cast int %sz to uint ; <uint> [#uses=1]
%tmp18 = setgt int %sz, 0 ; <bool> [#uses=1]
...
...
...
-------------------------------------------------------------
The function name is strange.. Hmmm...
llvm-gcc emitted normally as shown like this:
-------------------------------------------------------------
void %f_loop(int* %c, int %sz) {
entry:
%sz = cast int %sz to uint ; <uint> [#uses=1]
%tmp18 = setgt int %sz, 0 ; <bool> [#uses=1]
...
...
...
-------------------------------------------------------------
Is this a bug?
(?_?)
Thanks,
Seung J. Lee