Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; ModuleID = 'pow.cc'
- source_filename = "pow.cc"
- target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
- target triple = "x86_64-pc-windows-msvc18.0.21005"
- ; Function Attrs: noinline nounwind uwtable
- define i32 @"\01?pow@@YAJJI@Z"(i32 %x, i32 %n) #0 {
- entry:
- %n.addr = alloca i32, align 4
- %x.addr = alloca i32, align 4
- %a = alloca i32, align 4
- %p = alloca i32, align 4
- store i32 %n, i32* %n.addr, align 4
- store i32 %x, i32* %x.addr, align 4
- %0 = load i32, i32* %x.addr, align 4
- store i32 %0, i32* %a, align 4
- store i32 1, i32* %p, align 4
- br label %while.cond
- while.cond: ; preds = %if.end, %entry
- %1 = load i32, i32* %n.addr, align 4
- %cmp = icmp ugt i32 %1, 0
- br i1 %cmp, label %while.body, label %while.end
- while.body: ; preds = %while.cond
- %2 = load i32, i32* %n.addr, align 4
- %and = and i32 %2, 1
- %cmp1 = icmp ne i32 %and, 0
- br i1 %cmp1, label %if.then, label %if.end
- if.then: ; preds = %while.body
- %3 = load i32, i32* %a, align 4
- %4 = load i32, i32* %p, align 4
- %mul = mul nsw i32 %4, %3
- store i32 %mul, i32* %p, align 4
- br label %if.end
- if.end: ; preds = %if.then, %while.body
- %5 = load i32, i32* %a, align 4
- %6 = load i32, i32* %a, align 4
- %mul2 = mul nsw i32 %6, %5
- store i32 %mul2, i32* %a, align 4
- %7 = load i32, i32* %n.addr, align 4
- %shr = lshr i32 %7, 1
- store i32 %shr, i32* %n.addr, align 4
- br label %while.cond
- while.end: ; preds = %while.cond
- %8 = load i32, i32* %p, align 4
- ret i32 %8
- }
- ; Function Attrs: noinline norecurse nounwind uwtable
- define i32 @main() #1 {
- entry:
- %retval = alloca i32, align 4
- store i32 0, i32* %retval, align 4
- %call = call i32 @"\01?pow@@YAJJI@Z"(i32 2, i32 3)
- %call1 = call i32 @"\01?pow@@YAJJI@Z"(i32 2, i32 5)
- %call2 = call i32 @"\01?pow@@YAJJI@Z"(i32 2, i32 10)
- ret i32 0
- }
- attributes #0 = { noinline nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
- attributes #1 = { noinline norecurse nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
- !llvm.module.flags = !{!0}
- !llvm.ident = !{!1}
- !0 = !{i32 1, !"PIC Level", i32 2}
- !1 = !{!"clang version 4.0.0 (tags/RELEASE_400/final)"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement