Skip to content

Instantly share code, notes, and snippets.

@simonster
Created August 3, 2013 21:01
Show Gist options
  • Save simonster/6147965 to your computer and use it in GitHub Desktop.
Save simonster/6147965 to your computer and use it in GitHub Desktop.
IR
define void @julia_f(%jl_value_t*, 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 inbounds %jl_value_t* %0, i64 1, i32 0, !dbg !3369
%4 = load %jl_value_t** %3, align 8, !dbg !3369
br label %if, !dbg !3364
if: ; preds = %if, %if.lr.ph
%"#s1.03" = phi i64 [ 1, %if.lr.ph ], [ %10, %if ]
%5 = add i64 %"#s1.03", -1, !dbg !3370
%6 = getelementptr %jl_value_t* %4, i64 %5, !dbg !3370
%7 = bitcast %jl_value_t* %6 to double*, !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