[clang] [Clang][OpenCL] Mark scalar loads from constant address space invariant (PR #218356)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 10 04:28:40 PDT 2026


================
@@ -166,12 +166,18 @@ static inline AlignmentSource getFieldAlignmentSource(AlignmentSource Source) {
 class LValueBaseInfo {
   AlignmentSource AlignSource;
 
+  // Whether loads from the base object's storage are invariant.
+  bool IsInvariant : 1;
----------------
arsenm wrote:

This shouldn't be in this patch. Why is this different from how isKnownNonNull is handled?

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


More information about the cfe-commits mailing list