llvm-project/flang/test/Lower/Intrinsics
Jean Perier b668de2de2 [flang] fix optional pointer TARGET argument lowering in ASSOCIATED
The TARGET argument of ASSOCIATED has a special lowering to deal with
POINTER and ALLOCATABLE optional actual arguments because they may be
dynamically absent. The previous code was doing a ternary
(mlir::SelectOp) to deal with this case, but generated invalid
code for the unused argument (loading a nullptr fir.ref<fir.box>). This
was not detected until D133779 was merged and modified how fir.load are
lowered to LLVM for fir.box types.

Replace the select by a proper if to prevent the fir.load from being
reachable in context where it should not.

Differential Revision: https://reviews.llvm.org/D134174
2022-09-20 10:16:58 +02:00
..
Todo [flang] Add specific TODO for the REDUCE instrinsic 2022-08-18 07:53:47 +02:00
abort.f90 [flang] Support extention intrinsic ABORT 2022-08-02 23:02:12 +08:00
abs.f90 [mlir][math] Rename math.abs -> math.absf 2022-08-08 11:04:58 -04:00
achar.f90 [flang] Update memcpy intrinsic mangling for opaque pointers 2022-06-02 12:11:13 +02:00
acos.f90 [flang] Replace more pgmath with libm. 2022-08-08 10:53:08 -07:00
acosh.f90 [flang] Replace more pgmath with libm. 2022-08-08 10:53:08 -07:00
adjustl.f90 [flang] Lower adjustl and adjustr intrinsics 2022-03-16 11:35:28 +01:00
adjustr.f90 [flang] Lower adjustl and adjustr intrinsics 2022-03-16 11:35:28 +01:00
aint.f90 [flang] Remove fp128 support for llvm.round and llvm.trunc 2022-07-26 20:21:51 +08:00
all.f90 [flang] Lower all intrinsic 2022-03-14 17:43:46 +01:00
anint.f90 [flang] Remove fp128 support for llvm.round and llvm.trunc 2022-07-26 20:21:51 +08:00
any.f90 [flang] Lower any intrinsic 2022-03-14 22:07:05 +01:00
asin.f90 [flang] Replace more pgmath with libm. 2022-08-08 10:53:08 -07:00
asinh.f90 [flang] Replace more pgmath with libm. 2022-08-08 10:53:08 -07:00
associated.f90 [flang] fix optional pointer TARGET argument lowering in ASSOCIATED 2022-09-20 10:16:58 +02:00
atanh.f90 [flang] Replace more pgmath with libm. 2022-08-08 10:53:08 -07:00
bessel_j0.f90 [flang] Replace more pgmath with libm. 2022-08-08 10:53:08 -07:00
bessel_j1.f90 [flang] Replace more pgmath with libm. 2022-08-08 10:53:08 -07:00
bessel_jn.f90 [flang] Replace more pgmath with libm. 2022-08-08 10:53:08 -07:00
bessel_y0.f90 [flang] Replace more pgmath with libm. 2022-08-08 10:53:08 -07:00
bessel_y1.f90 [flang] Replace more pgmath with libm. 2022-08-08 10:53:08 -07:00
bessel_yn.f90 [flang] Replace more pgmath with libm. 2022-08-08 10:53:08 -07:00
bge.f90 Bitwise comparison intrinsics 2022-07-19 16:41:04 +00:00
bgt.f90 Bitwise comparison intrinsics 2022-07-19 16:41:04 +00:00
ble.f90 Bitwise comparison intrinsics 2022-07-19 16:41:04 +00:00
blt.f90 Bitwise comparison intrinsics 2022-07-19 16:41:04 +00:00
btest.f90 [flang] Lower misc intrinsics 2022-03-17 13:21:53 +01:00
c_f_pointer.f90 [flang] Accept assumed shape arrays as SHAPE in C_F_POINTER 2022-09-06 14:46:24 +02:00
c_funloc.f90 [flang] Support lowering of intrinsic module procedure C_F_POINTER 2022-09-06 08:15:01 +08:00
c_loc.f90 [flang] Support lowering of intrinsic module procedure C_F_POINTER 2022-09-06 08:15:01 +08:00
ceiling.f90 [flang] Try to lower math intrinsics to math operations first. 2022-07-22 09:04:44 -07:00
cmplx.f90 [flang] Lower some numeric intrinsics 2022-03-17 17:19:29 +01:00
command_argument_count.f90 [flang] Lower command and environment intrinsics 2022-03-17 14:36:51 +01:00
conjg.f90 [flang] Lower some numeric intrinsics 2022-03-17 17:19:29 +01:00
count.f90 [flang] Lower count intrinsic 2022-03-16 14:41:03 +01:00
cpu_time.f90 [flang] Lower date_and_time and cpu_time intrinsics 2022-03-16 06:38:26 +01:00
date_and_time.f90 [flang] Lower date_and_time and cpu_time intrinsics 2022-03-16 06:38:26 +01:00
dble.f90 [flang] Lower some numeric intrinsics 2022-03-17 17:19:29 +01:00
dconjg.f90 [flang] Fix intrinsic interface for DIMAG/DCONJG 2022-04-14 21:34:00 +08:00
dim.f90 [flang][lowering] Add support for lowering the `dim` intrinsic 2022-03-15 16:27:45 +00:00
dimag.f90 [flang] Fix intrinsic interface for DIMAG/DCONJG 2022-04-14 21:34:00 +08:00
dot_product.f90 [flang] Generate DOT_PRODUCT runtime call based on the result type. 2022-08-31 15:20:12 -07:00
dprod.f90 [flang] Lower some numeric intrinsics 2022-03-17 17:19:29 +01:00
dreal.f90 [flang] Fix intrinsic interface for DIMAG/DCONJG 2022-04-14 21:34:00 +08:00
dshiftl.f90 [flang] Lower F08 shift intrinsics 2022-07-21 23:36:08 -06:00
dshiftr.f90 [flang] Lower F08 shift intrinsics 2022-07-21 23:36:08 -06:00
eoshift.f90 [flang] Lower shift intrinsics 2022-03-16 17:16:46 +01:00
erfc.f90 [flang] Replace more pgmath with libm. 2022-08-08 10:53:08 -07:00
exit-2.f90 [flang] Handle dynamically optional argument in EXIT 2022-04-08 15:51:44 +02:00
exit.f90 [flang] Lower exit intrinsic 2022-03-17 13:18:32 +01:00
exp.f90 [flang] Try to lower math intrinsics to math operations first. 2022-07-22 09:04:44 -07:00
exponent.f90 [flang] Lower numeric related instrinsics 2022-03-16 20:43:07 +01:00
floor.f90 [flang] Try to lower math intrinsics to math operations first. 2022-07-22 09:04:44 -07:00
fraction.f90 [flang] Lower numeric related instrinsics 2022-03-16 20:43:07 +01:00
gamma.f90 [flang] Replace more pgmath with libm. 2022-08-08 10:53:08 -07:00
get_command_argument-optional.f90 [flang] Single entry point for GET_COMMAND_ARGUMENT 2022-07-27 10:27:25 +00:00
get_command_argument.f90 [flang] Single entry point for GET_COMMAND_ARGUMENT 2022-07-27 10:27:25 +00:00
get_environment_variable-optional.f90 [flang] Lower optionals in GET_COMMAND_ARGUMENT and GET_ENVIRONMENT_VARIABLE 2022-04-11 09:33:49 +02:00
get_environment_variable.f90 [flang] Lower optionals in GET_COMMAND_ARGUMENT and GET_ENVIRONMENT_VARIABLE 2022-04-11 09:33:49 +02:00
iand.f90
ibclr.f90 [flang][lowering] Add support for lowering of the `ibclr` intrinsic 2022-03-16 17:05:01 +00:00
ibits.f90 [flang][lowering] Add support for lowering of the `ibits` intrinsic 2022-03-15 16:33:13 +00:00
ibset.f90 [flang][lowering] Add support for lowering of the `ibset` intrinsic 2022-03-16 10:33:19 +00:00
ichar.f90 [flang] Do not create arith.extui with same from/to type 2022-04-24 20:37:48 +02:00
ieee_is_finite.f90 [flang] Add lowering tests 2022-06-28 15:22:21 +02:00
ieee_operator_eq.f90 [flang] Add lowering tests 2022-06-28 15:22:21 +02:00
ieor.f90 [flang][lowering] Add support for lowering of the `ieor` intrinsic 2022-03-16 16:50:43 +00:00
index.f90 [flang][lowering] Add support for lowering of the `index` intrinsics 2022-03-17 12:04:11 +00:00
ior.f90 [flang][lowering] Add support for lowering of the `ior` intrinsic 2022-03-18 10:36:38 +00:00
ishft.f90 [flang] Lower shift intrinsics 2022-03-16 17:16:46 +01:00
ishftc.f90 [flang] Lower shift intrinsics 2022-03-16 17:16:46 +01:00
lbound.f90 [flang] Fix LBOUND with assumed size array and non constant DIM 2022-06-24 21:02:07 +02:00
leadz.f90 [flang] Lower F08 bit population count intrinsics 2022-07-21 23:09:05 -06:00
len.f90 [flang] Lower boxed procedure 2022-03-22 15:41:11 +01:00
len_trim.f90 [flang] Lower character related intrinsic 2022-03-15 22:16:47 +01:00
lge_lgt_lle_llt.f90 [flang] Lower character related intrinsic 2022-03-15 22:16:47 +01:00
log.f90 [flang] Try to lower math intrinsics to math operations first. 2022-07-22 09:04:44 -07:00
log_gamma.f90 [flang] Replace more pgmath with libm. 2022-08-08 10:53:08 -07:00
maskl.f90 [flang] Add an explicit condition for the BITS=0 case in the MASKL and MASKR intrinsics. 2022-08-08 10:33:49 -06:00
maskr.f90 [flang] Add an explicit condition for the BITS=0 case in the MASKL and MASKR intrinsics. 2022-08-08 10:33:49 -06:00
math-runtime-options.f90 [flang] Try to lower math intrinsics to math operations first. 2022-07-22 09:04:44 -07:00
matmul.f90 [flang] Compile-time checks for shape conformance on assignments 2022-08-18 14:52:38 -07:00
max.f90 [flang] Lower min|max intrinsics 2022-03-15 22:24:10 +01:00
maxloc.f90 [flang] Lower min|max intrinsics 2022-03-15 22:24:10 +01:00
maxval.f90 [flang] Lower min|max intrinsics 2022-03-15 22:24:10 +01:00
merge.f90 [flang][lowering] handle MERGE with different FSOURCE and TSOURCE types 2022-06-24 21:05:15 +02:00
merge_bits.f90 [flang] Lower F08 merge_bits intrinsic. 2022-07-21 10:42:25 -06:00
minloc.f90 [flang] Lower min|max intrinsics 2022-03-15 22:24:10 +01:00
minval.f90 [flang] Lower min|max intrinsics 2022-03-15 22:24:10 +01:00
missing-math-runtime.f90 [flang] Fix error message in test 2022-06-30 09:01:58 +02:00
mod.f90 [flang] Lower MOD to Fortran runtime call. 2022-08-05 12:53:37 -07:00
modulo.f90 [flang] Lower numeric related instrinsics 2022-03-16 20:43:07 +01:00
mvbits.f90 [flang] Lower mvbits intrinsic 2022-03-25 08:01:27 +01:00
nearest.f90 [flang] Lower misc intrinsics 2022-03-17 13:21:53 +01:00
nint.f90 [flang] Lower numeric related instrinsics 2022-03-16 20:43:07 +01:00
not.f90 [FileCheck] Catch missspelled directives. 2022-05-26 11:37:19 +01:00
pack.f90 [flang] Lower pack|unpack intrinsics 2022-03-16 21:12:46 +01:00
parity.f90 [flang] Lower F08 parity intrinsic 2022-08-24 08:00:30 -06:00
popcnt.f90 [flang] Lower F08 bit population count intrinsics 2022-07-21 23:09:05 -06:00
poppar.f90 [flang] Lower F08 bit population count intrinsics 2022-07-21 23:09:05 -06:00
present.f90 [flang] Lower present intrinsic 2022-03-17 13:19:40 +01:00
product.f90 [flang] Lower numeric related instrinsics 2022-03-16 20:43:07 +01:00
random.f90 [flang] Intrinsic RANDOM_SEED calls with dynamically absent/present arguments 2022-08-09 09:08:55 -07:00
real.f90 [flang] Fix float-number representation bug 2022-04-14 21:28:30 +08:00
repeat.f90 [flang] Keep fully qualified !fir.heap type for fir.freemem op 2022-03-31 21:37:21 +02:00
reshape.f90 [flang] Fix one corner case in reshape intrinsic 2022-06-30 23:52:44 +08:00
rrspacing.f90 [Flang] Lower the spacing, rrspacing intrinsics 2022-03-18 09:18:42 +00:00
scale.f90 [flang] Lower misc intrinsics 2022-03-17 13:21:53 +01:00
scan.f90 [flang] Lower character related intrinsics 2022-03-17 07:16:08 +01:00
selected_int_kind.f90 [flang] Support intrinsic `selected_int_kind` for variables 2022-07-26 00:33:27 +08:00
selected_real_kind.f90 [flang] Support lowering intrinsic `selected_real_kind` for variables 2022-07-25 19:36:14 +08:00
set_exponent.f90 [flang][lowering] Add lowering for the `set_exponent` intrinsic 2022-03-16 15:16:10 +00:00
shifta.f90 [flang] Handle special case for SHIFTA intrinsic 2022-09-01 16:28:08 +02:00
shiftl.f90 [flang] Lower F08 shift intrinsics 2022-07-21 23:36:08 -06:00
shiftr.f90 [flang] Lower F08 shift intrinsics 2022-07-21 23:36:08 -06:00
sign.f90 [flang] Try to lower math intrinsics to math operations first. 2022-07-22 09:04:44 -07:00
size.f90 [flang] Fix one corner case in reshape intrinsic 2022-06-30 23:52:44 +08:00
spacing.f90 [Flang] Lower the spacing, rrspacing intrinsics 2022-03-18 09:18:42 +00:00
spread.f90 [flang] Lower array related intrinsics 2022-03-17 07:21:44 +01:00
sum.f90 [flang] Lower sum intrinsic 2022-03-08 18:50:34 +01:00
system_clock.f90 [flang] system_clock intrinsic calls with dynamically optional arguments 2022-06-13 17:33:28 +02:00
trailz.f90 [flang] Lower F08 bit population count intrinsics 2022-07-21 23:09:05 -06:00
transfer.f90 [flang] Lower transfer instrinsic 2022-03-16 11:33:50 +01:00
transpose.f90 [flang] Propagate lowering options from driver. 2022-08-05 11:29:45 -07:00
transpose_opt.f90 [flang] Propagate lowering options from driver. 2022-08-05 11:29:45 -07:00
trim.f90 [flang] Keep fully qualified !fir.heap type for fir.freemem op 2022-03-31 21:37:21 +02:00
ubound.f90 [flang][lowering] Add support for lowering of the `{l|u}bound` intrinsics 2022-03-18 10:16:54 +00:00
ubound01.f90 [flang] Apply lower bounds correctly before runtime call to ubound 2022-08-31 13:25:16 +02:00
verify.f90 [flang] Lower character related intrinsics 2022-03-17 07:16:08 +01:00