[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 27 09:42:51 PDT 2023


================
@@ -984,7 +1041,7 @@ Value *InstCombinerImpl::SimplifyDemandedUseBits(Value *V, APInt DemandedMask,
 
   // If the client is only demanding bits that we know, return the known
   // constant.
-  if (DemandedMask.isSubsetOf(Known.Zero|Known.One))
+  if (MaySimplifyAsConstant && DemandedMask.isSubsetOf(Known.Zero | Known.One))
----------------
goldsteinn wrote:

Leaving as TODO + made just a pointer check.

https://github.com/llvm/llvm-project/pull/67166


More information about the cfe-commits mailing list