[PATCH] D64285: [InstCombine] Fold select (icmp sgt x, -1), lshr (X, Y), ashr (X, Y) to ashr (X, Y))

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 12 13:41:54 PDT 2019


xbolva00 marked an inline comment as done.
xbolva00 added inline comments.


================
Comment at: llvm/trunk/lib/Transforms/InstCombine/InstCombineSelect.cpp:547
+  Value *X, *Y;
+  unsigned Bitwidth = CmpRHS->getType()->getScalarSizeInBits();
+  if ((Pred != ICmpInst::ICMP_SGT ||
----------------
lebedev.ri wrote:
> So this returns `0` i guess?
> That is confusing..
Yeah, weird.

@spatel ?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D64285





More information about the llvm-commits mailing list