File: debug-complex-1.fir

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (39 lines) | stat: -rw-r--r-- 1,937 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s

// check conversion of complex type of different size. Both fir and mlir
// variants are checked.

module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
  func.func @test1(%x : !fir.complex<4>) -> !fir.complex<8> {
  %1 = fir.convert %x : (!fir.complex<4>) -> !fir.complex<8>
  return %1 : !fir.complex<8>
  }loc(#loc1)
  func.func @test2(%x : !fir.complex<4>) -> complex<f64> {
  %1 = fir.convert %x : (!fir.complex<4>) -> complex<f64>
  return %1 : complex<f64>
  }loc(#loc2)
  func.func @test3(%x : !fir.complex<4>) -> !fir.complex<16> {
  %1 = fir.convert %x : (!fir.complex<4>) -> !fir.complex<16>
  return %1 : !fir.complex<16>
  }loc(#loc3)
  func.func @test4(%x : !fir.complex<4>) -> complex<f128> {
  %1 = fir.convert %x : (!fir.complex<4>) -> complex<f128>
  return %1 : complex<f128>
  }loc(#loc4)
}
#loc1 = loc("./simple.f90":2:1)
#loc2 = loc("./simple.f90":5:1)
#loc3 = loc("./simple.f90":8:1)
#loc4 = loc("./simple.f90":11:1)

// CHECK-DAG: #[[CMPX8:.*]] = #llvm.di_basic_type<tag = DW_TAG_base_type, name = "complex", sizeInBits = 128, encoding = DW_ATE_complex_float>
// CHECK-DAG: #[[CMPX4:.*]] = #llvm.di_basic_type<tag = DW_TAG_base_type, name = "complex", sizeInBits = 64, encoding = DW_ATE_complex_float>
// CHECK-DAG: #[[CMPX16:.*]] = #llvm.di_basic_type<tag = DW_TAG_base_type, name = "complex", sizeInBits = 256, encoding = DW_ATE_complex_float>

// CHECK-DAG: #[[TY1:.*]] = #llvm.di_subroutine_type<{{.*}}types = #[[CMPX8]], #[[CMPX4]]>
// CHECK-DAG: #[[TY2:.*]] = #llvm.di_subroutine_type<{{.*}}types = #[[CMPX16]], #[[CMPX4]]>

// CHECK-DAG: #llvm.di_subprogram<{{.*}}name = "test1"{{.*}}type = #[[TY1]]>
// CHECK-DAG: #llvm.di_subprogram<{{.*}}name = "test2"{{.*}}type = #[[TY1]]>
// CHECK-DAG: #llvm.di_subprogram<{{.*}}name = "test3"{{.*}}type = #[[TY2]]>
// CHECK-DAG: #llvm.di_subprogram<{{.*}}name = "test4"{{.*}}type = #[[TY2]]>