[flang-commits] [flang] [flang] Use alias analysis in lowering record assignments (PR #176483)
via flang-commits
flang-commits at lists.llvm.org
Wed Jan 28 08:19:46 PST 2026
================
@@ -1566,8 +1567,14 @@ void fir::factory::genRecordAssignment(fir::FirOpBuilder &builder,
mlir::isa<fir::BaseBoxType>(fir::getBase(rhs).getType());
auto recTy = mlir::dyn_cast<fir::RecordType>(baseTy);
assert(recTy && "must be a record type");
+
+ // Use alias analysis to guard the fast path.
+ fir::AliasAnalysis aa;
+ bool disjoint = aa.alias(fir::getBase(lhs), fir::getBase(rhs)) ==
----------------
MattPD wrote:
OK, done: Added `SEQUENCE` handling and updated tests accordingly.
https://github.com/llvm/llvm-project/pull/176483
More information about the flang-commits
mailing list