title: Compare IR operand with a constant in LLVM
body: <p>I have an IR which looks like this:</p>
  
  <pre><code>%5=icmp eq i32 %4,0
  </code></pre>
  
  <p>I want to check if the second operand of icmp instruction is 0 or something else. I made use of <code>getOperand(1)</code>, which returns the result in <code>Value *</code> format. How can I compare it with the constant 0?</p>