[SLP] Make getSameOpcode support different instructions if they have same semantics...
[llvm-project.git] / flang / test / Lower / Intrinsics / real.f90
blobf1f728e1a203f0385962329b33fded9e0194af9a
1 ! RUN: bbc -emit-fir -hlfir=false %s -o - | FileCheck %s
3 ! Tests REAL lowering
4 subroutine test_real()
5 real(4) :: r4
6 real(8) :: r8
8 r4 = real(z'40', kind=4)
9 r8 = real(z'40', kind=8)
11 end subroutine
13 ! CHECK-LABEL: func @_QPtest_real() {
14 ! CHECK: %[[VAL_0:.*]] = fir.alloca f32 {bindc_name = "r4", uniq_name = "_QFtest_realEr4"}
15 ! CHECK: %[[VAL_1:.*]] = fir.alloca f64 {bindc_name = "r8", uniq_name = "_QFtest_realEr8"}
16 ! CHECK: %[[CST_0:.*]] = arith.constant 8.968310e-44 : f32
17 ! CHECK: fir.store %[[CST_0]] to %[[VAL_0]] : !fir.ref<f32>
18 ! CHECK: %[[CST_1:.*]] = arith.constant 3.162020e-322 : f64
19 ! CHECK: fir.store %[[CST_1]] to %[[VAL_1]] : !fir.ref<f64>
20 ! CHECK: return