Skip to content

Instantly share code, notes, and snippets.

@yuyichao
Created November 3, 2015 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuyichao/d7009ab9bac2153b425d to your computer and use it in GitHub Desktop.
Save yuyichao/d7009ab9bac2153b425d to your computer and use it in GitHub Desktop.
define i64 @julia_f_23056(i64) {
top:
%1 = icmp slt i64 %0, 1
br i1 %1, label %L.3, label %L.preheader
L.preheader: ; preds = %top
%2 = shl i64 %0, 1
%3 = add i64 %0, -1
%4 = zext i64 %3 to i65
%5 = add i64 %0, -2
%6 = zext i64 %5 to i65
%7 = mul i65 %4, %6
%8 = lshr i65 %7, 1
%9 = trunc i65 %8 to i64
%10 = add i64 %2, %9
%11 = add i64 %10, -1
br label %L.3
L.3: ; preds = %L.preheader, %top
%s.1 = phi i64 [ 0, %top ], [ %11, %L.preheader ]
ret i64 %s.1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment