================
@@ -87,7 +87,8 @@ class CGBuilderTy : public CGBuilderBaseTy {
     return Address(V, ElementTy,
                    Addr.getAlignment().alignmentAtOffset(
                        CharUnits::fromQuantity(Offset.getSExtValue())),
-                   IsInBounds ? Addr.isKnownNonNull() : NotKnownNonNull);
+                   IsInBounds ? Addr.isKnownNonNull() : NotKnownNonNull)
+        .setInvariant(Addr.isInvariant());
----------------
keshavvinayak01 wrote:

Looking at this again, this is not a good design. I should add a new 
constructor that uses the invariant fact. HLS will also need handling in 
https://github.com/llvm/llvm-project/blob/add398e7ed51e681d4107d215078bb5c04291916/clang/lib/CodeGen/CGHLSLRuntime.cpp#L2776

So it's better I fix this first.

https://github.com/llvm/llvm-project/pull/218356
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to