File: spirv-triple-with-version.ll

package info (click to toggle)
spirv-llvm-translator-15 15.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 14,028 kB
  • sloc: cpp: 43,715; lisp: 3,497; sh: 153; python: 43; makefile: 26
file content (19 lines) | stat: -rw-r--r-- 1,121 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
; RUN: llvm-as -opaque-pointers=0 %s -o %t.bc

; RUN: not llvm-spirv %t.bc -spirv-max-version=1.0 -o - -spirv-text 2>&1 | FileCheck %s --check-prefix=CHECK-INVALID
; RUN: not llvm-spirv %t.bc -spirv-max-version=1.1 -o - -spirv-text 2>&1 | FileCheck %s --check-prefix=CHECK-INVALID

; RUN: llvm-spirv %t.bc -o - -spirv-text | FileCheck %s --check-prefix=CHECK12
; RUN: llvm-spirv %t.bc -spirv-max-version=1.2 -o - -spirv-text | FileCheck %s --check-prefix=CHECK12
; RUN: llvm-spirv %t.bc -spirv-max-version=1.3 -o - -spirv-text | FileCheck %s --check-prefix=CHECK12
; RUN: llvm-spirv %t.bc -spirv-max-version=1.4 -o - -spirv-text | FileCheck %s --check-prefix=CHECK12

target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
target triple = "spirv64v1.2-unknown-unknown"

; This is a module with a SPIR-V subarch.  Ensure that the SPIR-V version specified as the subarch is taken into account by llvm-spirv.

; CHECK-INVALID: TripleMaxVersionIncompatible: Triple version and maximum version are incompatible.

; 66048 = 0x10200, i.e. version 1.2
; CHECK12: 119734787 66048