Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
LLVM 2.34 KB | None | 0 0
  1. ; ModuleID = 'dp.c'
  2. target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
  3. target triple = "x86_64-pc-linux-gnu"
  4.  
  5. @.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
  6.  
  7. ; Function Attrs: nounwind uwtable
  8. define i32 @main() #0 {
  9.   %1 = alloca i32, align 4
  10.   %p = alloca i32*, align 8
  11.   %q = alloca i32*, align 8
  12.   store i32 0, i32* %1
  13.   %2 = call noalias i8* @malloc(i64 4) #3
  14.   %3 = bitcast i8* %2 to i32*
  15.   store i32* %3, i32** %p, align 8
  16.   %4 = load i32** %p, align 8
  17.   %5 = bitcast i32* %4 to i8*
  18.   call void @free(i8* %5) #3
  19.   %6 = call noalias i8* @malloc(i64 4) #3
  20.   %7 = bitcast i8* %6 to i32*
  21.   store i32* %7, i32** %q, align 8
  22.   %8 = load i32** %p, align 8
  23.   %9 = load i32** %q, align 8
  24.   %10 = icmp eq i32* %8, %9
  25.   br i1 %10, label %11, label %17
  26.  
  27. ; <label>:11                                      ; preds = %0
  28.   %12 = load i32** %q, align 8
  29.   store i32 10, i32* %12, align 4
  30.   %13 = load i32** %p, align 8
  31.   store i32 14, i32* %13, align 4
  32.   %14 = load i32** %q, align 8
  33.   %15 = load i32* %14, align 4
  34.   %16 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8]* @.str, i32 0, i32 0), i32 %15)
  35.   br label %17
  36.  
  37. ; <label>:17                                      ; preds = %11, %0
  38.   %18 = load i32* %1
  39.   ret i32 %18
  40. }
  41.  
  42. ; Function Attrs: nounwind
  43. declare noalias i8* @malloc(i64) #1
  44.  
  45. ; Function Attrs: nounwind
  46. declare void @free(i8*) #1
  47.  
  48. declare i32 @printf(i8*, ...) #2
  49.  
  50. attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
  51. attributes #1 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
  52. attributes #2 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
  53. attributes #3 = { nounwind }
  54.  
  55. !llvm.ident = !{!0}
  56.  
  57. !0 = metadata !{metadata !"Debian clang version 3.5.2-3 (tags/RELEASE_352/final) (based on LLVM 3.5.2)"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement