diff --git a/test/constexpr_phi.ll b/test/constexpr_phi.ll index f588198e47..a1842a678e 100644 --- a/test/constexpr_phi.ll +++ b/test/constexpr_phi.ll @@ -4,6 +4,10 @@ ; RUN: llvm-spirv -r %t.spv -o %t.r.bc ; RUN: llvm-dis %t.r.bc -o %t.r.ll ; RUN: FileCheck < %t.r.ll %s --check-prefix=CHECK-LLVM +; RUN: %if spirv-backend %{ llc -O0 -mtriple=spirv32-unknown-unknown -filetype=obj %s -o %t.llc.spv %} +; RUN: %if spirv-backend %{ llvm-spirv -r %t.llc.spv -o %t.llc.rev.bc %} +; RUN: %if spirv-backend %{ llvm-dis %t.llc.rev.bc -o %t.llc.rev.ll %} +; RUN: %if spirv-backend %{ FileCheck %s --check-prefix=CHECK-LLVM < %t.llc.rev.ll %} ; CHECK-SPIRV: Name [[#F:]] "_Z3runiiPi" diff --git a/test/local_var_keeps_external.ll b/test/local_var_keeps_external.ll index 48bb3017b8..a0f5b2a121 100644 --- a/test/local_var_keeps_external.ll +++ b/test/local_var_keeps_external.ll @@ -2,7 +2,10 @@ ; RUN: llvm-spirv -r %t.spv -o %t.rev.bc ; RUN: llvm-dis %t.rev.bc -o %t.rev.ll ; RUN: FileCheck < %t.rev.ll %s --check-prefix CHECK-LLVM -; FIXME: FILECHECK_FAIL during llvm-spirv -r in llc compilation flow +; RUN: %if spirv-backend %{ llc -O0 -mtriple=spirv64-unknown-unknown -filetype=obj %s -o %t.llc.spv %} +; RUN: %if spirv-backend %{ llvm-spirv -r %t.llc.spv -o %t.llc.rev.bc %} +; RUN: %if spirv-backend %{ llvm-dis %t.llc.rev.bc -o %t.llc.rev.ll %} +; RUN: %if spirv-backend %{ FileCheck %s --input-file %t.llc.rev.ll -check-prefix=CHECK-LLVM %} target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64-G1" target triple = "spir64-unknown-unknown" diff --git a/test/relationals.ll b/test/relationals.ll index 6c900659dc..f2ebcb86a0 100644 --- a/test/relationals.ll +++ b/test/relationals.ll @@ -4,6 +4,10 @@ ; RUN: spirv-val %t.spv ; RUN: llvm-spirv %t.spv -r --spirv-target-env=SPV-IR -o %t.rev.bc ; RUN: llvm-dis < %t.rev.bc | FileCheck %s --check-prefix=CHECK-SPV-LLVM +; RUN: %if spirv-backend %{ llc -O0 -mtriple=spirv32-unknown-unknown -filetype=obj %s -o %t.llc.spv %} +; RUN: %if spirv-backend %{ llvm-spirv -r --spirv-target-env=SPV-IR %t.llc.spv -o %t.llc.rev.bc %} +; RUN: %if spirv-backend %{ llvm-dis %t.llc.rev.bc -o %t.llc.rev.ll %} +; RUN: %if spirv-backend %{ FileCheck %s --check-prefix=CHECK-SPV-LLVM < %t.llc.rev.ll %} target datalayout = "e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024" target triple = "spir" diff --git a/test/transcoding/builtin_vars_arithmetics.ll b/test/transcoding/builtin_vars_arithmetics.ll index 766133f0c2..461b6361a3 100644 --- a/test/transcoding/builtin_vars_arithmetics.ll +++ b/test/transcoding/builtin_vars_arithmetics.ll @@ -9,6 +9,10 @@ ; Check that produced builtin-call-based SPV-IR is recognized by the translator ; RUN: llvm-spirv %t.rev.bc -spirv-text -o - | FileCheck %s --check-prefix=CHECK-SPIRV +; RUN: %if spirv-backend %{ llc -O0 -mtriple=spirv64-unknown-unknown -filetype=obj %s -o %t.llc.spv %} +; RUN: %if spirv-backend %{ llvm-spirv -r --spirv-target-env=SPV-IR %t.llc.spv -o %t.llc.rev.bc %} +; RUN: %if spirv-backend %{ llvm-dis %t.llc.rev.bc -o %t.llc.rev.ll %} +; RUN: %if spirv-backend %{ FileCheck %s --check-prefixes=CHECK-LLVM,CHECK-LLVM-SPV < %t.llc.rev.ll %} ; The IR was generated from the following source: ; #include diff --git a/test/transcoding/builtin_vars_opt.ll b/test/transcoding/builtin_vars_opt.ll index a5949d7d14..9b005ad357 100644 --- a/test/transcoding/builtin_vars_opt.ll +++ b/test/transcoding/builtin_vars_opt.ll @@ -9,6 +9,10 @@ ; Check that produced builtin-call-based SPV-IR is recognized by the translator ; RUN: llvm-spirv %t.rev.bc -spirv-text -o - | FileCheck %s --check-prefix=CHECK-SPIRV +; RUN: %if spirv-backend %{ llc -O0 -mtriple=spirv64-unknown-unknown -filetype=obj %s -o %t.llc.spv %} +; RUN: %if spirv-backend %{ llvm-spirv -r --spirv-target-env=SPV-IR %t.llc.spv -o %t.llc.rev.bc %} +; RUN: %if spirv-backend %{ llvm-dis %t.llc.rev.bc -o %t.llc.rev.ll %} +; RUN: %if spirv-backend %{ FileCheck %s --check-prefixes=CHECK-LLVM,CHECK-LLVM-SPV < %t.llc.rev.ll %} ; The IR was generated from the following source: ; #include diff --git a/test/transcoding/float16.ll b/test/transcoding/float16.ll index d09e7dc6c6..f0c04c4ec2 100644 --- a/test/transcoding/float16.ll +++ b/test/transcoding/float16.ll @@ -13,6 +13,10 @@ ; RUN: llvm-spirv %t.spv -to-text -o - | FileCheck %s --check-prefixes=CHECK-SPIRV,CHECK-SPIRV-EXT ; RUN: llvm-spirv -r %t.spv -o %t.rev.bc ; RUN: llvm-dis %t.rev.bc -o - | FileCheck %s --check-prefix=CHECK-LLVM +; RUN: %if spirv-backend %{ llc -O0 -mtriple=spirv64-unknown-unknown -filetype=obj %s -o %t.llc.spv %} +; RUN: %if spirv-backend %{ llvm-spirv -r %t.llc.spv -o %t.llc.rev.bc %} +; RUN: %if spirv-backend %{ llvm-dis %t.llc.rev.bc -o %t.llc.rev.ll %} +; RUN: %if spirv-backend %{ FileCheck %s --check-prefix=CHECK-LLVM < %t.llc.rev.ll %} source_filename = "math_builtin_float_half.cpp" target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64" @@ -32,8 +36,8 @@ target triple = "spirv64-unknown-unknown" ; CHECK-LLVM: %addr = alloca half ; CHECK-LLVM: %addr2 = alloca <2 x half> -; CHECK-LLVM: %res = call spir_func half @_Z5fractDhPDh(half 0xH39C4, ptr %addr) -; CHECK-LLVM: %res2 = call spir_func <2 x half> @_Z5fractDv2_DhPS_(<2 x half> , ptr %addr2) +; CHECK-LLVM: %{{[a-z0-9]+}} = call spir_func half @_Z5fractDhPDh(half 0xH39C4, ptr %addr) +; CHECK-LLVM: %{{[a-z0-9]+}} = call spir_func <2 x half> @_Z5fractDv2_DhPS_(<2 x half> , ptr %addr2) define spir_kernel void @test() { entry: diff --git a/test/transcoding/spirv-private-array-initialization.ll b/test/transcoding/spirv-private-array-initialization.ll index d696ae62e7..69bf3b562b 100644 --- a/test/transcoding/spirv-private-array-initialization.ll +++ b/test/transcoding/spirv-private-array-initialization.ll @@ -3,7 +3,10 @@ ; RUN: llvm-spirv %t.spv -to-text -o - | FileCheck %s --check-prefix=CHECK-SPIRV ; RUN: llvm-spirv -r %t.spv -o %t_4mspirv.bc ; RUN: llvm-dis %t_4mspirv.bc -o - | FileCheck %s --check-prefix=CHECK-LLVM -; FIXME: FILECHECK_FAIL during llvm-spirv -r in llc compilation flow +; RUN: %if spirv-backend %{ llc -O0 -mtriple=spirv32-unknown-unknown -filetype=obj %s -o %t.llc.spv %} +; RUN: %if spirv-backend %{ llvm-spirv -r %t.llc.spv -o %t.llc.rev.bc %} +; RUN: %if spirv-backend %{ llvm-dis %t.llc.rev.bc -o %t.llc.rev.ll %} +; RUN: %if spirv-backend %{ FileCheck %s --input-file %t.llc.rev.ll -check-prefix=CHECK-LLVM %} ; ; CHECK-SPIRV-DAG: TypeInt [[i32:[0-9]+]] 32 0 ; CHECK-SPIRV-DAG: Constant [[i32]] [[one:[0-9]+]] 1