[PATCH] D90479: [ValueTracking] ComputeKnownBits - minimum leading/trailing zero bits in LSHR/SHL (PR44526)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 30 07:14:29 PST 2020


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


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:1011-1012
     // the best folding opportunity.
     if (Known.hasConflict())
       Known.setAllZero();
     return;
----------------
spatel wrote:
> I'm not sure if it changes anything directly here, but we should revisit this conflict logic (similarly at the final block in the function) because we have a poison value in IR with D71126 (see also D92270).
TBH - I don't think we should be setting 'known bits' to arbitrary/poison numbers like this inside ValueTracking - poison handling should be inside the shift combines and we should just return 'unknown' here. 

Is this something that needs to be addressed before this patch do you think? I've just kept to the current behaviour here so far.


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