[all-commits] [llvm/llvm-project] 13f908: [flang] Fix one corner case in reshape intrinsic
PeixinQiao via All-commits
all-commits at lists.llvm.org
Thu Jun 30 08:54:41 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 13f9089ac92b1f800b6752d031c287781f215575
https://github.com/llvm/llvm-project/commit/13f9089ac92b1f800b6752d031c287781f215575
Author: Peixin Qiao <qiaopeixin at huawei.com>
Date: 2022-06-30 (Thu, 30 Jun 2022)
Changed paths:
M flang/include/flang/Optimizer/Builder/FIRBuilder.h
M flang/lib/Lower/ConvertExpr.cpp
M flang/lib/Optimizer/Builder/FIRBuilder.cpp
M flang/test/Lower/Intrinsics/reshape.f90
M flang/test/Lower/Intrinsics/size.f90
M flang/test/Lower/array-expression-slice-1.f90
M flang/test/Lower/array-temp.f90
M flang/test/Lower/call-by-value-attr.f90
M flang/test/Lower/components.f90
M flang/test/Lower/derived-allocatable-components.f90
M flang/test/Lower/derived-pointer-components.f90
M flang/test/Lower/io-item-list.f90
M flang/test/Lower/pointer-assignments.f90
M flang/test/Lower/pointer-initial-target.f90
M flang/test/Lower/structure-constructors.f90
Log Message:
-----------
[flang] Fix one corner case in reshape intrinsic
As Fortran 2018 16.9.163, the reshape is the only intrinsic which
requires the shape argument to be rank-one integer array and the SIZE
of it to be one constant expression. The current expression lowering
converts the shape expression with slice in intrinsic into one box value
with the box element type of unknown extent. However, the genReshape
requires the box element type to be constant size. So, convert the box
value into one with box element type of sequence of 1 x constant. This
corner case is found in cam4 in SPEC 2017
https://github.com/llvm/llvm-project/issues/56140.
Reviewed By: Jean Perier
Differential Revision: https://reviews.llvm.org/D128597
More information about the All-commits
mailing list