[all-commits] [llvm/llvm-project] 6db45c: [flang][hlfir] Fixed actual argument type for pass...
Slava Zakharin via All-commits
all-commits at lists.llvm.org
Fri Apr 28 09:06:28 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6db45cc4bc279370b93fc6ef58d0cb87dd7f552f
https://github.com/llvm/llvm-project/commit/6db45cc4bc279370b93fc6ef58d0cb87dd7f552f
Author: Slava Zakharin <szakharin at nvidia.com>
Date: 2023-04-28 (Fri, 28 Apr 2023)
Changed paths:
M flang/lib/Lower/ConvertCall.cpp
A flang/test/HLFIR/call_with_poly_dummy.f90
Log Message:
-----------
[flang][hlfir] Fixed actual argument type for passing to poly dummy.
The `none` type cannot be used for creating AssociateOp for the actual
argument. I think it should be always okay to compute the storage
data type based on the actual argument expression.
Commit: 8df5913250d55883feb8fa46a838c93a77c2e291
https://github.com/llvm/llvm-project/commit/8df5913250d55883feb8fa46a838c93a77c2e291
Author: Slava Zakharin <szakharin at nvidia.com>
Date: 2023-04-28 (Fri, 28 Apr 2023)
Changed paths:
M flang/lib/Lower/ConvertVariable.cpp
M flang/lib/Optimizer/Builder/Character.cpp
A flang/test/HLFIR/char_assign.fir
M flang/test/Lower/HLFIR/calls-character-singleton-result.f90
M flang/test/Lower/HLFIR/convert-variable.f90
M flang/test/Lower/HLFIR/implicit-call-mismatch.f90
M flang/test/Lower/HLFIR/substrings.f90
M flang/test/Lower/Intrinsics/achar.f90
M flang/test/Lower/Intrinsics/get_command_argument.f90
M flang/test/Lower/Intrinsics/get_environment_variable.f90
M flang/test/Lower/Intrinsics/ichar.f90
M flang/test/Lower/Intrinsics/merge.f90
M flang/test/Lower/OpenMP/parallel-lastprivate-clause-scalar.f90
M flang/test/Lower/array-elemental-calls-char.f90
M flang/test/Lower/call-by-value.f90
M flang/test/Lower/call-parenthesized-arg.f90
M flang/test/Lower/character-substrings.f90
M flang/test/Lower/dummy-argument-optional.f90
M flang/test/Lower/forall/scalar-substring.f90
M flang/test/Lower/implicit-call-mismatch.f90
M flang/test/Lower/statement-function.f90
Log Message:
-----------
[flang][hlfir] Fixed length-one assignment.
Assignment from a character dummy argument to a length-one character
variable resulted in illegal fir.convert:
%0 = fir.load %unboxed_dummy : !fir.ref<!fir.char<1,?>>
%1 = fir.convert %0 : (!fir.char<1,?>) -> !fir.char<1>
fir.store %1 to %local : !fir.ref<!fir.char<1>>
This change fixes the length-one assignment code to use proper casts.
For character dummy arguments with constant length we will now also
type cast the unboxed reference to the character type with constant length
during the lowering:
fir.convert %x : (!fir.ref<!fir.char<1,?>>) -> !fir.ref<!fir.char<1,8>>
I also adjusted the length-one assignment recognition so that in case
of same-length assignment we recognize length-one from either LHS or RHS
data types.
Reviewed By: jeanPerier
Differential Revision: https://reviews.llvm.org/D149382
Compare: https://github.com/llvm/llvm-project/compare/797594a0438f...8df5913250d5
More information about the All-commits
mailing list