[PATCH] D12799: [ValueTracking] Teach isKnownNonZero a new trick
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 15:13:55 PDT 2015
reames added inline comments.
================
Comment at: lib/Analysis/ValueTracking.cpp:1841
@@ +1840,3 @@
+ // Are all the bits to be shifted out known zero?
+ if (KnownZero.countTrailingOnes() >= ShiftVal)
+ return isKnownNonZero(X, DL, Depth, Q);
----------------
Shouldn't this be countTrailingZeros?
================
Comment at: test/Analysis/ValueTracking/knownzero-shift.ll:10
@@ +9,3 @@
+ %x = icmp eq i8 %A, 0
+ %y = select i1 %x, i8 6, i8 7 ; ... and should return i8 7.
+ ; CHECK: ret i8 7
----------------
You could just return the i1 directly.
Repository:
rL LLVM
http://reviews.llvm.org/D12799
More information about the llvm-commits
mailing list