[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 1 06:20:14 PDT 2021


foad added inline comments.


================
Comment at: llvm/lib/Target/X86/X86InstrInfo.cpp:4494
+      case X86::COND_L: // x <s (C + 1)  -->  x <=s C
+        if (ImmDelta != 1 || CmpValue == INT64_MIN >> Shift)
+          return false;
----------------
Is it OK to use `INT64_MIN >> Shift` here? I think the standard says right shift of a negative value is implementation-defined.


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