[all-commits] [llvm/llvm-project] 5b65db: [flang][hlfir] fix regression in inline elementals
Tom Eccles via All-commits
all-commits at lists.llvm.org
Thu May 25 04:03:15 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5b65dbd19756fc6522167d4c884d138907026254
https://github.com/llvm/llvm-project/commit/5b65dbd19756fc6522167d4c884d138907026254
Author: Tom Eccles <tom.eccles at arm.com>
Date: 2023-05-25 (Thu, 25 May 2023)
Changed paths:
M flang/lib/Optimizer/HLFIR/Transforms/InlineElementals.cpp
A flang/test/HLFIR/inline-elemental.f90
Log Message:
-----------
[flang][hlfir] fix regression in inline elementals
InlineElementals created a regression when inlining elemental
expressions where the type of the result of the hlfir.apply does not
match the hlfir.yield.
This patch ensures the pass doesn't match in these cases, fixing the
regression.
It isn't clear to me what the /right/ solution is:
- Is it actually valid for the hlfir.apply to have a different type
(even just different array bounds?). Should this be enforced in the
verifier?
- Inserting a convert if these types don't match doesn't work because
fir.convert doesn't know how to convert a hlfir.expr. Should this be
added?
Test case is from @vzakhari
Differential Revision: https://reviews.llvm.org/D151202
More information about the All-commits
mailing list