llvm-project/flang/test
Jean Perier af40f99e2b [flang] Merge GEPs in substring fir.embox codegen
When computing the base addresses of an array slice to make a
descriptor, codegen generated two LLVM GEPs. The first to compute
the address of the base character element, and a second one to
compute the substring base inside that element.
The previous code did not care about getting the result of the first
GEP right: it used the base array LLVM type as the result type.
This used to work when opaque pointer were not enabled (the actual GEP
result type was probably applied in some later pass). But with opaque
pointers, the second GEP ends-up computing an offset of len*<LLVM array
type> instead of len*<character width>. A previous attempt to fix the
issue was done in D129079, but it does not cover the cases where the
array slice contains subcomponents before the substring
(e.g: array(:)%char_field(5:10)).

This patch fix the issue by computing the actual GEP result type in
codegen. There is also enough knowledge now so that a single GEP can be
generated instead of two.

Differential Revision: https://reviews.llvm.org/D129481
2022-07-12 09:27:51 +02:00
..
Driver [flang][test] Remove RUN COMMAND/EXPECTED OUTPUT/INPUT markers from other directories 2022-06-29 22:10:59 -07:00
Evaluate [flang] Cope with overflow in real MOD/MODULO 2022-07-06 17:31:11 -07:00
Examples [flang][test] Remove RUN COMMAND/EXPECTED OUTPUT/INPUT markers from other directories 2022-06-29 22:10:59 -07:00
Fir [flang] Merge GEPs in substring fir.embox codegen 2022-07-12 09:27:51 +02:00
Frontend [flang][test] Remove RUN COMMAND/EXPECTED OUTPUT/INPUT markers from other directories 2022-06-29 22:10:59 -07:00
Intrinsics [flang] Lower Fortran math intrinsic operations into MLIR ops or libm calls. 2022-06-28 13:32:19 -07:00
Lower [flang][OpenMP] Fix firstprivate bug 2022-07-11 09:01:15 -04:00
NonGtestUnit Use lit_config.substitute instead of foo % lit_config.params everywhere 2022-03-16 09:57:41 +01:00
Parser [flang][OpenMP] Added parser support for in_reduction clause 2022-06-06 14:55:27 +05:30
Preprocessing [flang] Support correct continuations for compiler directives 2022-05-27 13:45:37 +03:00
Runtime Reland "[flang] GET_COMMAND_ARGUMENT runtime implementation" 2021-09-28 12:34:07 +00:00
Semantics [flang] Add semantics test for image_status and add a check 2022-07-11 10:54:12 -07:00
Unit Use lit_config.substitute instead of foo % lit_config.params everywhere 2022-03-16 09:57:41 +01:00
CMakeLists.txt [flang][driver] Add support for generating executables 2022-04-25 12:00:23 +00:00
lit.cfg.py [flang][driver] Add support for consuming LLVM IR/BC files 2022-05-05 15:11:50 +00:00
lit.site.cfg.py.in Use lit_config.substitute instead of foo % lit_config.params everywhere 2022-03-16 09:57:41 +01:00