File: fir-int-conversion.fir

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (35 lines) | stat: -rw-r--r-- 1,152 bytes parent folder | download | duplicates (15)
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
// RUN: fir-opt --split-input-file --fir-to-llvm-ir %s | FileCheck --check-prefixes=COMMON,DEFAULT %s
// 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
// 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

// Test `!fir.integer<KIND>` conversion with and without kind-mapping string

func.func private @foo0(%arg0: !fir.int<1>)
// COMMON-LABEL: foo0
// DEFAULT-SAME: i8
// ALL-CUSTOM-SAME: i4
// SOME-CUSTOM-SAME: i8

func.func private @foo1(%arg0: !fir.int<2>)
// COMMON-LABEL: foo1
// DEFAULT-SAME: i16
// ALL-CUSTOM-SAME: i8
// SOME-CUSTOM-SAME: i1

func.func private @foo2(%arg0: !fir.int<4>)
// COMMON-LABEL: foo2
// DEFAULT-SAME: i32
// ALL-CUSTOM-SAME: i16
// SOME-CUSTOM-SAME: i8

func.func private @foo3(%arg0: !fir.int<8>)
// COMMON-LABEL: foo3
// DEFAULT-SAME: i64
// ALL-CUSTOM-SAME: i32
// SOME-CUSTOM-SAME: i64

func.func private @foo4(%arg0: !fir.int<16>)
// COMMON-LABEL: foo4
// DEFAULT-SAME: i128
// ALL-CUSTOM-SAME: i64
// SOME-CUSTOM-SAME: i32