Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Fir / fir-int-conversion.fir
blob700272bf13220cfc8eee19ae98d7470622983ebc
1 // RUN: fir-opt --split-input-file --fir-to-llvm-ir %s | FileCheck --check-prefixes=COMMON,DEFAULT %s
2 // RUN: fir-opt --kind-mapping="i1:4,i2:8,i4:16,i8:32,i16:64" --split-input-file --fir-to-llvm-ir %s | FileCheck --check-prefixes=COMMON,ALL-CUSTOM %s
3 // RUN: fir-opt --kind-mapping="i2:1,i4:8,i16:32" --split-input-file --fir-to-llvm-ir %s | FileCheck --check-prefixes=COMMON,SOME-CUSTOM %s
5 // Test `!fir.integer<KIND>` conversion with and without kind-mapping string
7 func.func private @foo0(%arg0: !fir.int<1>)
8 // COMMON-LABEL: foo0
9 // DEFAULT-SAME: i8
10 // ALL-CUSTOM-SAME: i4
11 // SOME-CUSTOM-SAME: i8
13 func.func private @foo1(%arg0: !fir.int<2>)
14 // COMMON-LABEL: foo1
15 // DEFAULT-SAME: i16
16 // ALL-CUSTOM-SAME: i8
17 // SOME-CUSTOM-SAME: i1
19 func.func private @foo2(%arg0: !fir.int<4>)
20 // COMMON-LABEL: foo2
21 // DEFAULT-SAME: i32
22 // ALL-CUSTOM-SAME: i16
23 // SOME-CUSTOM-SAME: i8
25 func.func private @foo3(%arg0: !fir.int<8>)
26 // COMMON-LABEL: foo3
27 // DEFAULT-SAME: i64
28 // ALL-CUSTOM-SAME: i32
29 // SOME-CUSTOM-SAME: i64
31 func.func private @foo4(%arg0: !fir.int<16>)
32 // COMMON-LABEL: foo4
33 // DEFAULT-SAME: i128
34 // ALL-CUSTOM-SAME: i64
35 // SOME-CUSTOM-SAME: i32