Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flang] fix optional pointer TARGET argument lowering in ASSOCIATED
The TARGET argument of ASSOCIATED has a special lowering to deal with POINTER and ALLOCATABLE optional actual arguments because they may be dynamically absent. The previous code was doing a ternary (mlir::SelectOp) to deal with this case, but generated invalid code for the unused argument (loading a nullptr fir.ref<fir.box>). This was not detected until D133779 was merged and modified how fir.load are lowered to LLVM for fir.box types. Replace the select by a proper if to prevent the fir.load from being reachable in context where it should not. Differential Revision: https://reviews.llvm.org/D134174
- Loading branch information
1 parent
613c429
commit b668de2
Showing
2 changed files
with
56 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters