[PATCH] D101074: [X86] Canonicalize SGT/UGT compares with constants to use SGE/UGE to reduce the number of EFLAGs reads. (PR48760)

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 24 04:59:00 PDT 2021


lebedev.ri added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:23481
+      const APInt &Op1Val = Op1C->getAPIntValue();
+      if (!Op1Val.isNullValue() && Op1Val.isSignedIntN(32)) {
+        // Ensure the constant+1 doesn't overflow.
----------------
Actually, what about: `-2147483649` is i33, incremented it is `-2147483648`, i32.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101074



More information about the llvm-commits mailing list