Skip to content

Instantly share code, notes, and snippets.

@simonster
Created August 3, 2013 21:00
Show Gist options
  • Save simonster/6147959 to your computer and use it in GitHub Desktop.
Save simonster/6147959 to your computer and use it in GitHub Desktop.
IR with jl_value_t -> i8*
define void @julia_f(i8**, i64) #2 {
top:
%2 = icmp slt i64 %1, 1, !dbg !3364
br i1 %2, label %L2, label %if.lr.ph, !dbg !3364
if.lr.ph: ; preds = %top
%3 = getelementptr i8** %0, i64 1, !dbg !3369
%4 = load i8** %3, align 8, !dbg !3369
%5 = bitcast i8* %4 to double*, !dbg !3370
br label %if, !dbg !3364
if: ; preds = %if, %if.lr.ph
%"#s1.03" = phi i64 [ 1, %if.lr.ph ], [ %10, %if ]
%6 = add i64 %"#s1.03", -1, !dbg !3370
%7 = getelementptr double* %5, i64 %6, !dbg !3370
%8 = load double* %7, align 8, !dbg !3370
%9 = fmul double %8, 2.000000e+00, !dbg !3370
store double %9, double* %7, align 8, !dbg !3370
%10 = add nsw i64 %"#s1.03", 1, !dbg !3371
%exitcond = icmp eq i64 %"#s1.03", %1, !dbg !3364
br i1 %exitcond, label %L2, label %if, !dbg !3364
L2: ; preds = %if, %top
ret void, !dbg !3371
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment