title: LLVM IR less or equal compare with negation
body: <p>I want to make compare less or equal operation with two integers: op1 &lt;= -op2. But both operands can be minimal values (0x80...0), so 'neg' can produce poison values. If I used x86 asm, I would write:</p>
  
  <pre><code>add r8,r9
  jle SOME_LABEL
  </code></pre>
  
  <p>But in LLVM IR I can only write following construction:</p>
  
  <pre><code>%neg_op2 = sub i64 0, %op2
  %cmp_sle = icmp sle i64 %op1, %neg_op2
  </code></pre>
  
  <p>which will not work if op2 = MIN_VALUE. Of course I can add additional comparisons, but resulting x86 code would be much worse than add+jle. And precious performance will be lost.</p>
  
  <p>Is there any way to make LLVM perform the same operation by the cost of  add+jle? My target platform is x86, so I can sacrifice platform-independent features.</p>