title: llc - expected value token error
body: <p>I'm getting this message when I try to llc my example.ll file:</p>
  
  <pre><code>llc: example.ll:12:29: error: expected value token
  %1 = icmp slt i1 %cmptmp, i16 0
                            ^
  </code></pre>
  
  <p>The example.ll file:</p>
  
  <pre><code>; ModuleID = 'modulle'
  
  define i16 @main() {
  entry:
    %x = alloca i16
    store i16 2, i16* %x
    br label %loop_condition
  
  loop_condition:                                   ; preds = %loop, %entry
    %0 = load i16, i16* %x
    %cmptmp = icmp sgt i16 %0, 1
    %1 = icmp slt i1 %cmptmp, i16 0
    br i1 %1, label %loop, label %while_continue
  
  loop:                                             ; preds = %loop_condition
    br label %loop_condition
  
  while_continue:                                   ; preds = %loop_condition
    ret i16 0
  }
  </code></pre>
  
  <p>When I remove <strong>i16</strong> everything works fine, but I don't know why LLVM insert that in my code. Does anybody know what's the problem?</p>
  
  <p><em>--- UPDATE ---</em></p>
  
  <p>The .ll output is from my toy compiler. This is the code for lines <em>11</em> and <em>12</em>:</p>
  
  <pre><code>Value *cond = llvm::CmpInst::Create(llvm::Instruction::ICmp, llvm::CmpInst::ICMP_SLT, binRelOpCond, llvm::ConstantInt::get(llvm::getGlobalContext(), llvm::APInt(16, 0, true)), "", codeGenContext.getBlock());
  </code></pre>
  
  <p>where <strong>binRelOpCond</strong> variable is:</p>
  
  <pre><code>CmpInst *compareRes = CmpInst::Create(Instruction::ICmp, CmpInst::ICMP_SGT, left, right, "cmptmp", codeGenContext.getBlock());
  </code></pre>
  
  <p>Thanks.</p>