[LLVMdev] Unnamed temporaries

Judison judison at gmail.com
Fri Mar 11 02:48:28 PST 2011


Hi,

I hope this is the right place to ask it, sorry if I'm wrong...

My compiler is generating this code:

(line numbers included) (Please ignore the extra br label %b0 and the whole
b0)

...
  54  define i32 @std_lang__rest() {
  55    entry:
  56      %ret = alloca i32                        ; <i32*> int*
  57      %0 = icmp eq i32 4, 5                    ; <i1> boolean
  58      br i1 %0, label %b0_t, label %b0_f
  59    b0_t:
  60      %1 = add i32 5, 2                        ; <i32> int
  61      store i32 %1, i32* %ret
  62      br label %return
  63      br label %b0
  64    b0_f:
  65      store i32 5, i32* %ret
  66      br label %return
  67      br label %b0
  68    b0:
  69      store i32 0, i32* %ret
  70      br label %return
  71    return:
  72      %2 = load i32* %ret                      ; <i32> int
  73      ret i32 %2
  74  }
...


llvm-as std_lang.ll
llvm-as: std_lang.ll:72:5: error: instruction expected to be numbered '%4'
    %2 = load i32* %ret                      ; <i32> int
    ^

Why %4 ??? what I did wrong?

-- 
Judison
judison at gmail.com

"O ignorante que procura se instruir é como um sábio; o sábio que fala sem
discernimento se assemelha a um ignorante." Imam Ali (as)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110311/c97db470/attachment.html>


More information about the llvm-dev mailing list