[flang][hlfir] use adaptor in associate bufferization
The associate operation checks if it is the only use of the hlfir.expr, and if so it can take ownership of the hlfir.expr instead of copying it (move semantics). If this check is done by accessing the associate operation's arguments directly (not through the AssociateOpAdaptor), the expression uses will contain some operations which have been deleted. These can include prior copies of the same associate operation, if that operation was cloned (e.g. to lower a hlfir.elemental into a fir.do_loop). Accessing the bufferized expression instead of the old hlfir.expr through the adaptor avoids this false positive. Differential Revision: https://reviews.llvm.org/D154715
Loading
Please sign in to comment