[LLVMdev] problem using 128-bit integer on x86-32
Jeff Bezanson
jeff.bezanson at gmail.com
Thu Jun 21 13:20:49 PDT 2012
Hello everybody,
I'm seeing LLVM (v 3.1) abort when trying to generate code that
multiplies or divides 128-bit integers on x86-32.
Here is a complete example function:
define %jl_value_t* @foo564(%jl_value_t*, %jl_value_t**, i32) {
top:
%3 = load %jl_value_t** %1, align 4, !dbg !5139
%4 = getelementptr inbounds %jl_value_t* %3, i32 0, i32 0, !dbg !5139
%5 = getelementptr %jl_value_t** %4, i32 1, !dbg !5139
%6 = bitcast %jl_value_t** %5 to i128*, !dbg !5139
%7 = load i128* %6, align 4, !dbg !5139
%8 = mul i128 %7, 137, !dbg !5146, !julia_type !5147
%9 = call %jl_value_t* @allocobj(i32 20), !dbg !5146
%10 = getelementptr inbounds %jl_value_t* %9, i32 0, i32 0, !dbg !5146
store %jl_value_t* inttoptr (i32 159792480 to %jl_value_t*),
%jl_value_t** %10, align 4, !dbg !5146
%11 = getelementptr %jl_value_t** %10, i32 1, !dbg !5146
%12 = bitcast %jl_value_t** %11 to i128*, !dbg !5146
store i128 %8, i128* %12, align 4, !dbg !5146
ret %jl_value_t* %9, !dbg !5146
}
On JITing to native code, I get:
UNREACHABLE executed!
Stack dump:
0. Running pass 'X86 DAG->DAG Instruction Selection' on function '@foo564'
Aborted
Add and subtract seem to work fine.
Is there anything I might be doing wrong?
thanks,
-Jeff
More information about the llvm-dev
mailing list