[PATCH] D110867: X86InstrInfo: Support immediates that are +1/-1 different in optimizeCompareInstr

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 15 00:24:21 PDT 2021


foad added inline comments.


================
Comment at: llvm/lib/Target/X86/X86InstrInfo.cpp:4495
+      case X86::COND_L: // x <s (C + 1)  -->  x <=s C
+        if (ImmDelta != 1 || APInt(BitWidth, INT64_MIN) == CmpValue)
+          return false;
----------------
Surely you need `APInt::getSignedMinValue(BitWidth)`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110867/new/

https://reviews.llvm.org/D110867



More information about the llvm-commits mailing list