[all-commits] [llvm/llvm-project] cbb49d: [flang][fir] fix ABI bug 116844 (#118121)
jeanPerier via All-commits
all-commits at lists.llvm.org
Mon Dec 2 05:45:35 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: cbb49d4be676a251ca140db92aa2788dd5514569
https://github.com/llvm/llvm-project/commit/cbb49d4be676a251ca140db92aa2788dd5514569
Author: jeanPerier <jperier at nvidia.com>
Date: 2024-12-02 (Mon, 02 Dec 2024)
Changed paths:
M flang/include/flang/Optimizer/CodeGen/Target.h
M flang/lib/Optimizer/CodeGen/Target.cpp
M flang/lib/Optimizer/CodeGen/TargetRewrite.cpp
M flang/test/Fir/target-rewrite-boxchar.fir
M flang/test/Fir/target.fir
Log Message:
-----------
[flang][fir] fix ABI bug 116844 (#118121)
Fix issue #116844.
The issue came from a look-up on the func.func for the sret attribute
when lowering fir.call with character arguments. This was broken because
the func.func may or may not have been rewritten when dealing with the
fir.call, but the lookup assumed it had not been rewritten yet. If the
func.func was rewritten and the result moved to a sret argument, the
call was lowered as if the character was meant to be the result, leading
to bad call code and an assert.
It turns out that the whole logic is actually useless since fir.boxchar
are never lowered as sret arguments, instead, lowering directly breaks
the character result into the first two `fir.ref<>, i64` arguments. So,
the sret case was actually never used, except in this bug.
Hence, instead of fixing the logic (probably by looking for argument
attributes on the call itself), just remove this logic that brings
unnecessary complexity.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list