Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Sep 21st, 2012  |  syntax: None  |  size: 0.89 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. ; Translated by the Edison Design Group C++/C front end (version 4.4.1)
  2. ; LLVM IR generated by the BoostPro Computing LLVM back end
  3. ; Fri Aug 17 14:00:22 2012
  4.  
  5. ; Source file information:
  6. ;
  7. ; ModuleID = '/Users/johnw/src/edg/test/stmk_return.c'
  8.  
  9. define i32 @main() {
  10. entry:
  11.   %retval = alloca i32, align 4
  12.   store i32 0, i32* %retval, align 4
  13.   %a = alloca i32, align 4
  14.   %0 = load i32* %a, align 4
  15.   %tobool = icmp ne i32 %0, 0
  16.   br i1 %tobool, label %if.then, label %if.end
  17.  
  18. if.then:                                          ; preds = %entry
  19.   store i32 1, i32* %retval, align 4
  20.   br label %return
  21.   store i32 10, i32* %a, align 4
  22.   br label %if.end
  23.  
  24. if.end:                                           ; preds = %if.then, %entry
  25.   store i32 0, i32* %retval, align 4
  26.   br label %return
  27.  
  28. return:                                           ; preds = %if.end, %if.then
  29.   %1 = load i32* %retval, align 4
  30.   ret i32 %1
  31. }