[PATCH] D32785: [KnownBits] Add methods for determining if KnownBits is a constant value

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 3 05:57:03 PDT 2017


RKSimon added a comment.

> Unfortunately SimplifyDemandedBits needs to check if DemandedMask is a subset of the known bits so we can't use isConstant there. Maybe we need to add a method like areDemandedBitsConstant?

Would this be a KnowBits method or just a static helper wrapper inside InstCombineSimplifyDemanded.cpp ?



================
Comment at: lib/Analysis/ConstantFolding.cpp:708
+      return ConstantInt::get(Op0->getType(), Known0.getConstant());
     }
   }
----------------
braces


https://reviews.llvm.org/D32785





More information about the llvm-commits mailing list