[PATCH] D90479: [WIP][ValueTracking] ComputeKnownBits - minimum leading/trailing zero bits in LSHR/SHL (PR44526)
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 30 11:13:04 PDT 2020
efriedma added inline comments.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:1302
computeKnownBitsFromShiftOperator(I, DemandedElts, Known, Known2, Depth, Q,
KZF, KOF);
break;
----------------
We could also do AShr... not really useful for known zeros, but maybe for known ones.
================
Comment at: llvm/test/Transforms/InstCombine/and2.ll:155
+; CHECK-NEXT: ret i8 [[SH]]
;
%sh = lshr i8 1, %x
----------------
RKSimon wrote:
> These tests look like they might even need to be scrapped? And we just limit the transform to Shl instead of logical shifts in general.
I suspect we might want to continue to favor icmp+zext over lshr.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90479/new/
https://reviews.llvm.org/D90479
More information about the llvm-commits
mailing list