[PATCH] D151421: [KnownBits] Simplify shl. NFCI.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 25 07:31:16 PDT 2023


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/lib/Support/KnownBits.cpp:210-214
+    if (MinShiftAmount == BitWidth) {
+      // Always poison. Return zero because we don't like returning conflict.
+      Known.setAllZero();
+      return Known;
+    }
----------------
Seems like pulling this out of the `isUnknown()` branch would be cleaner, as it is not specific to unknown values.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151421



More information about the llvm-commits mailing list