brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 87136b1 Raw
35 lines · plain
1; Prepare bitcode files.2; RUN: rm -rf %t && mkdir -p %t3; RUN: llvm-as %s -o %t/main.bc4; RUN: llvm-as %p/Inputs/libdevice-cuda-9.ll -o %t/libdevice.compute_35.10.bc5; RUN: llvm-as %p/Inputs/libdevice-cuda-10.ll -o %t/libdevice.10.bc6; RUN: llvm-as %p/Inputs/libdevice-cuda-11.ll -o %t/libdevice.11.10.bc7; RUN: llvm-as %p/Inputs/not-a-libdevice.ll -o %t/libdevice-with-wrong-info.bc8; RUN: llvm-as %p/Inputs/libdevice-with-wrong-dl.ll -o %t/libdevice-with-wrong-dl.bc9 10; No warnings expected when we link with libdevice variants11; RUN: llvm-link %t/main.bc %t/libdevice.compute_35.10.bc -S 2>&1 \12; RUN:  | FileCheck --check-prefixes COMMON,NOWARN %s13; RUN: llvm-link %t/main.bc %t/libdevice.10.bc -S 2>&1 \14; RUN:  | FileCheck --check-prefixes COMMON,NOWARN %s15; RUN: llvm-link %t/main.bc %t/libdevice.11.10.bc -S 2>&1 \16; RUN:  | FileCheck --check-prefixes COMMON,NOWARN %s17 18; But make sure we still issue warnings if we see unexpected triple or19; datalayout within a libdevice module.20; RUN: llvm-link %t/main.bc %t/libdevice-with-wrong-info.bc -S 2>&1 \21; RUN:  | FileCheck --check-prefixes COMMON,WARN-TRIPLE,WARN-DL %s22; RUN: llvm-link %t/main.bc %t/libdevice-with-wrong-dl.bc -S 2>&1 \23; RUN:  | FileCheck --check-prefixes COMMON,NOWARN,WARN-DL %s24 25 26target triple = "nvptx64-nvidia-cuda"27target datalayout = "e-i64:64-i128:128-v16:16-v32:32-n16:32:64"28 29; WARN-TRIPLE-DAG: warning: Linking two modules of different target triples:30; WARN-DL-DAG: warning: Linking two modules of different data layouts:31 32; NOWARN-NOT: warning:33; COMMON-DAG: target triple = "nvptx64-nvidia-cuda"34; NOWARN-NOT: warning:35