rjmccall added a comment. In D75423#1901407 <https://reviews.llvm.org/D75423#1901407>, @yaxunl wrote:
> In D75423#1901362 <https://reviews.llvm.org/D75423#1901362>, @rjmccall wrote: > > > Okay, then I have no problem taking a patch for this into IRGen. But I > > think it should be fine to do this by adding the invariant-load metadata > > when loading from an l-value instead of injecting invariant-groups into > > l-value emission. > > > The pointer to constant may be casted to a generic pointer then loaded. If we > only mark load from pointer to constant, we loses information. A lot of those conversions don't go through `EmitLValue`. Doing this at this level in `EmitLValue` both complicates the code and will introduce a lot of redundant intrinsic calls. If you need to do it, you should do it at the root where a pointer is being turned into an LValue. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75423/new/ https://reviews.llvm.org/D75423 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits