[llvm] [Attributor] Propagate alignment through ptrmask (PR #150158)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 18 19:56:02 PDT 2025


================
@@ -5339,6 +5339,15 @@ struct AAPotentialConstantValues
     return nullptr;
   }
 
+  /// Return the minimum alignment of potential constants
+  Align getMinAlignment() const {
----------------
shiltian wrote:

I'm not sure if that's a good idea to call it an alignment in this case. What you are doing here is essentially doing cttz (except the last shift). I'd just make `AAPotentialConstantValues` to provide this information (min trailing zeros). Also, this is assumed values.

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


More information about the llvm-commits mailing list