Skip to content

Commit

Permalink
Statically link spvgen into amdllpc (GPUOpen-Drivers#1774)
Browse files Browse the repository at this point in the history
* Add build option in amdllpc to link spvgen statically or dynamically
* Do not require spvgen for tests. spvgen_static is linked into amdllpc, so
  the shared spvgen library is not a dependency for the tests anymore.
* Update shaderdb tests
  • Loading branch information
Flakebi authored May 4, 2022
1 parent b2ab264 commit 38108d1
Show file tree
Hide file tree
Showing 1,156 changed files with 1,230 additions and 1,408 deletions.
14 changes: 9 additions & 5 deletions imported/spirv/spvgen.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,9 @@ void SH_IMPORT_EXPORT vfxPrintDoc(
}
#endif

static inline bool InitSpvGen(
const char* pSpvGenDir = nullptr)
{
return true;
}
bool InitSpvGen(const char* pSpvGenDir = nullptr);

void FinalizeSpvgen();

#else

Expand Down Expand Up @@ -391,6 +389,8 @@ DECL_EXPORT_FUNC(vfxPrintDoc);

bool SPVAPI InitSpvGen(const char* pSpvGenDir = nullptr);

void SPVAPI FinalizeSpvgen();

#endif

#ifdef SPVGEN_STATIC_LIB
Expand Down Expand Up @@ -553,6 +553,10 @@ bool SPVAPI InitSpvGen(
return success;
}

// =====================================================================================================================
// Finalize spvgen; Clean up resource
void SPVAPI FinalizeSpvgen() {}

#endif

#ifndef SH_EXPORTING
Expand Down
2 changes: 2 additions & 0 deletions llpc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,8 @@ add_executable(amdllpc tool/amdllpc.cpp)
add_dependencies(amdllpc llpc_standalone_compiler)
target_link_libraries(amdllpc PRIVATE llpc_standalone_compiler)
set_compiler_options(amdllpc ${LLPC_ENABLE_WERROR})
add_compile_definitions(amdllpc PRIVATE SH_EXPORTING)
target_link_libraries(amdllpc PRIVATE spvgen_static)

endif()
### Add Subdirectories #################################################################################################
Expand Down
1 change: 0 additions & 1 deletion llpc/context/llpcCompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
#include <unordered_set>

#ifdef LLPC_ENABLE_SPIRV_OPT
#define SPVGEN_STATIC_LIB 1
#include "spvgen.h"
#endif

Expand Down
2 changes: 1 addition & 1 deletion llpc/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ find_package(Python3 ${LLVM_MINIMUM_PYTHON_VERSION} REQUIRED
list(APPEND CMAKE_MODULE_PATH "${XGL_LLVM_BUILD_PATH}/lib/cmake/llvm")
include(LLVMConfig)

set(AMDLLPC_TEST_DEPS amdllpc spvgen FileCheck llvm-objdump llvm-readelf count not)
set(AMDLLPC_TEST_DEPS amdllpc FileCheck llvm-objdump llvm-readelf count not)

# required by lit.site.cfg.py.in.
set(AMDLLPC_TEST_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// BEGIN_SHADERTEST
/*
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST: .[[entry:[a-z0-9]+]]:
; SHADERTEST: %[[arr:[a-z0-9]+]] = alloca [5 x i32], align 4, addrspace(5)
Expand Down
2 changes: 1 addition & 1 deletion llpc/test/shaderdb/core/OOB_Check_Dependent_Load_lit.frag
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// BEGIN_SHADERTEST
/*
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST: .[[entry:[a-z0-9]+]]:
; SHADERTEST: %[[arr:[a-z0-9]+]] = alloca [5 x i32], align 4, addrspace(5)
Expand Down
2 changes: 1 addition & 1 deletion llpc/test/shaderdb/core/OOB_Check_Load_Array_Loop_lit.frag
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// BEGIN_SHADERTEST
/*
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST: .[[parent:[a-z0-9]+]]:
; SHADERTEST: %[[arr:[a-z0-9]+]] = alloca [2048 x <4 x float>], align 16, addrspace(5)
Expand Down
2 changes: 1 addition & 1 deletion llpc/test/shaderdb/core/OOB_Check_Load_Array_lit.frag
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// BEGIN_SHADERTEST
/*
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST: .[[entry:[a-z0-9]+]]:
; SHADERTEST: %[[arr:[a-z0-9]+]] = alloca [2048 x [2 x <4 x float>]], align 16, addrspace(5)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// BEGIN_SHADERTEST
/*
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST: .[[entry:[a-z0-9]+]]:
; SHADERTEST: %[[arr:[a-z0-9]+]] = alloca [5 x { <4 x float> }], align 16, addrspace(5)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// BEGIN_SHADERTEST
/*
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST: .[[entry:[a-z0-9]+]]:
; SHADERTEST: %[[mat:[a-z0-9]+]] = alloca [4 x <4 x float>], align 16, addrspace(5)
Expand Down
2 changes: 1 addition & 1 deletion llpc/test/shaderdb/core/OOB_Check_Load_Matrix_lit.frag
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// BEGIN_SHADERTEST
/*
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST: .[[entry:[a-z0-9]+]]:
; SHADERTEST: %[[arr:[a-z0-9]+]] = alloca [4 x <4 x float>], align 16, addrspace(5)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// BEGIN_SHADERTEST
/*
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST: .[[entry:[a-z0-9]+]]:
; SHADERTEST: %[[arr:[a-z0-9]+]] = alloca [5 x { [10 x <4 x float>], [12 x { [4 x <4 x float>] }] }], align 16, addrspace(5)
Expand Down
2 changes: 1 addition & 1 deletion llpc/test/shaderdb/core/OOB_Check_Load_Struct_lit.frag
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// BEGIN_SHADERTEST
/*
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST: .[[entry:[a-z0-9]+]]:
; SHADERTEST: %[[arr:[a-z0-9]+]] = alloca [5 x { [10 x <4 x float>], [12 x <4 x float>] }], align 16, addrspace(5)
Expand Down
2 changes: 1 addition & 1 deletion llpc/test/shaderdb/core/OOB_Check_Load_Vector_lit.frag
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// BEGIN_SHADERTEST
/*
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST: .[[entry:[a-z0-9]+]]:
; SHADERTEST: %[[arr:[a-z0-9]+]] = alloca <4 x float>, align 16, addrspace(5)
Expand Down
2 changes: 1 addition & 1 deletion llpc/test/shaderdb/core/OOB_Check_Multiple_Load_lit.frag
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// BEGIN_SHADERTEST
/*
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST: .[[entry:[a-z0-9]+]]:
; SHADERTEST: %[[arr:[a-z0-9]+]] = alloca <4 x float>, align 16, addrspace(5)
Expand Down
2 changes: 1 addition & 1 deletion llpc/test/shaderdb/core/OOB_Check_Optimization_lit.frag
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

// BEGIN_SHADERTEST
/*
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} final pipeline module info
; SHADERTEST: define dllexport amdgpu_ps { <4 x float> } @_amdgpu_ps_main
; SHADERTEST-NOT: phi
Expand Down
2 changes: 1 addition & 1 deletion llpc/test/shaderdb/core/OOB_Check_Store_Array_lit.frag
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// BEGIN_SHADERTEST
/*
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST: .[[entry:[a-z0-9]+]]:
; SHADERTEST: %[[arr:[a-z0-9]+]] = alloca [2048 x [2 x <4 x float>]], align 16, addrspace(5)
Expand Down
2 changes: 1 addition & 1 deletion llpc/test/shaderdb/core/OOB_Check_Store_Struct_lit.frag
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// BEGIN_SHADERTEST
/*
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s -enable-scratch-bounds-checks | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST: .[[entry:[a-z0-9]+]]:
; SHADERTEST: %[[arr:[a-z0-9]+]] = alloca [5 x { [10 x <4 x float>] }], align 16, addrspace(5)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void main()
}
// BEGIN_SHADERTEST
/*
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ void main()
}
// BEGIN_SHADERTEST
/*
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void main()
}
// BEGIN_SHADERTEST
/*
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results
; SHADERTEST: add i32 %{{[0-9]*}}, 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

; BEGIN_SHADERTEST
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s

; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST: getelementptr{{.*}}<{ [8 x [4 x float]], i32 }>, <{ [8 x [4 x float]], i32 }> addrspace({{.*}})* @{{.*}}, i32 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void main()
}
// BEGIN_SHADERTEST
/*
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results
; SHADERTEST: icmp eq i32 %{{[0-9]*}}, 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void main()

// BEGIN_SHADERTEST
/*
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results
; SHADERTEST: insertelement <4 x [4 x %{{[a-z0-9.]*}}] addrspace(7)*> undef, [4 x %{{[a-z0-9.]*}}] addrspace(7)* %{{[0-9]*}}, i{{32|64}} 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void main()
}
// BEGIN_SHADERTEST
/*
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results
; SHADERTEST: [[GEPVAR:%[^ ]+]] = getelementptr <{ [4 x double], i32 }>, <{ [4 x double], i32 }> addrspace(7)* {{%[^,]+}}, i64 0, i32 0, i64 %
Expand Down
2 changes: 1 addition & 1 deletion llpc/test/shaderdb/core/OpAll_TestBoolConst_lit.frag
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ void main()
}
// BEGIN_SHADERTEST
/*
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST: store <4 x i32> <i32 1, i32 0, i32 1, i32 0>,
Expand Down
2 changes: 1 addition & 1 deletion llpc/test/shaderdb/core/OpAll_TestBvec4_lit.frag
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ void main()
}
// BEGIN_SHADERTEST
/*
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST-COUNT-3: = and i1
Expand Down
2 changes: 1 addition & 1 deletion llpc/test/shaderdb/core/OpAny_TestBoolConst_lit.frag
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ void main()
}
// BEGIN_SHADERTEST
/*
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST: store <4 x i32> <i32 1, i32 0, i32 1, i32 0>,
Expand Down
2 changes: 1 addition & 1 deletion llpc/test/shaderdb/core/OpAny_TestBvec2_lit.frag
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ void main()
}
// BEGIN_SHADERTEST
/*
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST-COUNT-3: = or i1
Expand Down
2 changes: 1 addition & 1 deletion llpc/test/shaderdb/core/OpArrayLength_TestGeneral_lit.frag
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ void main()
}
// BEGIN_SHADERTEST
/*
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results
; SHADERTEST: call i32 {{.*}}@lgc.create.get.buffer.desc.length.i32(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results
; SHADERTEST: call i64 (...) @lgc.create.image.atomic.i64(i32 8
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results
; SHADERTEST: call i64 (...) @lgc.create.image.atomic.compare.swap.i64(i32 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; BEGIN_SHADERTEST
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results
; SHADERTEST: %[[RESULT:[0-9]*]] = call i32 @llvm.amdgcn.raw.buffer.atomic.cmpswap.i32(i32 %{{[0-9]*}}, i32 %[[COMPARE:[0-9]*]]
; SHADERTEST: %[[IS_EQUAL:[0-9]*]] = icmp eq i32 %[[RESULT]], %[[COMPARE]]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results
; SHADERTEST: call i64 (...) @lgc.create.image.atomic.i64(i32 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results
; SHADERTEST: call i64 (...) @lgc.create.image.atomic.i64(i32 2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results
; SHADERTEST: call i64 (...) @lgc.create.image.atomic.i64(i32 3, {{.*}}, i64 1)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; BEGIN_SHADERTEST
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s

; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results
; SHADERTEST; call i32 @lgc.buffer.atomic.idecrement.i32(<4 x i32> %{{[0-9]*}}, i32 24, i32 0, i1 false)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results
; SHADERTEST: call i64 (...) @lgc.create.image.atomic.i64(i32 2, {{.*}}, i64 1)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; BEGIN_SHADERTEST
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s

; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results
; SHADERTEST; store i32
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; BEGIN_SHADERTEST
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results
; SHADERTEST; call i32 @lgc.buffer.atomic.iincrement.i32(<4 x i32> %{{[0-9]*}}, i32 0, i32 0, i1 false)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results
; SHADERTEST: call i64 (...) @lgc.create.image.atomic.i64(i32 3
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results
; SHADERTEST: call i64 (...) @lgc.create.image.atomic.i64(i32 2, {{.*}}, i64 0)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

; BEGIN_SHADERTEST
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s

; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results
; SHADERTEST: %{{.*}} = load atomic i32, i32 addrspace({{.*}})* {{.*}} monotonic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results
; SHADERTEST: call i64 (...) @lgc.create.image.atomic.i64(i32 9
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results
; SHADERTEST: call i64 (...) @lgc.create.image.atomic.i64(i32 6
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: amdllpc -spvgen-dir=%spvgendir% -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; RUN: amdllpc -v %gfxip %s | FileCheck -check-prefix=SHADERTEST %s
; SHADERTEST-LABEL: {{^// LLPC}} SPIRV-to-LLVM translation results
; SHADERTEST-LABEL: {{^// LLPC}} SPIR-V lowering results
; SHADERTEST: call i64 (...) @lgc.create.image.atomic.i64(i32 4
Expand Down
Loading

0 comments on commit 38108d1

Please sign in to comment.