InstCombine: Combine (X+cst) < 0 --> X < -cst
This can happen pretty often in code that looks like: int foo = bar - 1; if (foo < 0) do stuff In this case, bar < 1 is an equivalent condition. This transform requires that the add instruction be annotated with nsw. llvm-svn: 221045
Loading
Please sign in to comment