xref: /llvm-project/flang/test/Lower/Intrinsics/dprod.f90 (revision f35f863a88f83332bef9605ef4cfe4f05c066efb)
1! RUN: bbc -emit-fir -hlfir=false %s -o - | FileCheck %s
2
3! CHECK-LABEL: dprod_test
4subroutine dprod_test (x, y, z)
5  real :: x,y
6  double precision :: z
7  z = dprod(x,y)
8  ! CHECK-DAG: %[[x:.*]] = fir.load %arg0
9  ! CHECK-DAG: %[[y:.*]] = fir.load %arg1
10  ! CHECK-DAG: %[[a:.*]] = fir.convert %[[x]] : (f32) -> f64
11  ! CHECK-DAG: %[[b:.*]] = fir.convert %[[y]] : (f32) -> f64
12  ! CHECK: %[[res:.*]] = arith.mulf %[[a]], %[[b]]
13  ! CHECK: fir.store %[[res]] to %arg2
14end subroutine
15