[PATCH] D31115: [InstCombine] Provide a way to calculate KnownZero/One for Add/Sub in SimplifyDemandedUseBits without recursing into ComputeKnownBits

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 18 00:17:08 PDT 2017


craig.topper created this revision.

SimplifyDemandedUseBits for Add/Sub already recursed down LHS and RHS for simplifying bits. If that didn't provide any simplifications we fall back to calling computeKnownBits which will recurse again. Instead just take the known bits for LHS and RHS we already have and call into a new function in ValueTracking that can calculate the known bits given the LHS/RHS bits.


https://reviews.llvm.org/D31115

Files:
  include/llvm/Analysis/ValueTracking.h
  lib/Analysis/ValueTracking.cpp
  lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31115.92247.patch
Type: text/x-patch
Size: 6557 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170318/2b81e96d/attachment.bin>


More information about the llvm-commits mailing list