File: cuda-libdevice.ll

package info (click to toggle)
llvm-toolchain-17 1%3A17.0.6-22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,799,624 kB
  • sloc: cpp: 6,428,607; ansic: 1,383,196; asm: 793,408; python: 223,504; objc: 75,364; f90: 60,502; lisp: 33,869; pascal: 15,282; sh: 9,684; perl: 7,453; ml: 4,937; awk: 3,523; makefile: 2,889; javascript: 2,149; xml: 888; fortran: 619; cs: 573
file content (34 lines) | stat: -rw-r--r-- 1,643 bytes parent folder | download | duplicates (12)
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
; Prepare bitcode files.
; RUN: rm -rf %t && mkdir -p %t
; RUN: llvm-as %s -o %t/main.bc
; RUN: llvm-as %p/Inputs/libdevice-cuda-9.ll -o %t/libdevice.compute_35.10.bc
; RUN: llvm-as %p/Inputs/libdevice-cuda-10.ll -o %t/libdevice.10.bc
; RUN: llvm-as %p/Inputs/libdevice-cuda-11.ll -o %t/libdevice.11.10.bc
; RUN: llvm-as %p/Inputs/libdevice-cuda-9.ll -o %t/correct-libdevice-wrong-filename.bc
; RUN: llvm-as %p/Inputs/not-a-libdevice.ll -o %t/libdevice-with-wrong-info.bc

; No warnings expected when we link with libdevice variants
; RUN: llvm-link %t/main.bc %t/libdevice.compute_35.10.bc -S 2>&1 \
; RUN:  | FileCheck --check-prefixes COMMON,NOWARN %s
; RUN: llvm-link %t/main.bc %t/libdevice.10.bc -S 2>&1 \
; RUN:  | FileCheck --check-prefixes COMMON,NOWARN %s
; RUN: llvm-link %t/main.bc %t/libdevice.11.10.bc -S 2>&1 \
; RUN:  | FileCheck --check-prefixes COMMON,NOWARN %s

; But make sure we still issue warnings if we see unexpected filename, or
; unexpected triple or datalayout within a libdevice filename.
; RUN: llvm-link %t/main.bc %t/correct-libdevice-wrong-filename.bc -S 2>&1 \
; RUN:  | FileCheck --check-prefixes COMMON,WARN-TRIPLE %s
; RUN: llvm-link %t/main.bc %t/libdevice-with-wrong-info.bc -S 2>&1 \
; RUN:  | FileCheck --check-prefixes COMMON,WARN-TRIPLE,WARN-DL %s


target triple = "nvptx64-nvidia-cuda"
target datalayout = "e-i64:64-i128:128-v16:16-v32:32-n16:32:64"

; WARN-TRIPLE-DAG: warning: Linking two modules of different target triples:
; WARN-DL-DAG: warning: Linking two modules of different data layouts:

; NOWARN-NOT: warning:
; COMMON-DAG: target triple = "nvptx64-nvidia-cuda"
; NOWARN-NOT: warning: