Not all SPIR-V extensions are allows in every environment. When we use the `-spirv-ext=all` option, the backend currently believes that all extensions can be used. This commit filters out the extensions on the command line to remove those that are not known to be allowed for the current environment. Alternatives considered: I considered modifying the SPIRVExtensionsParser::parse to use a different list of extensions for "all" depending on the target triple. However that does not work because the target triple is not available, and cannot be made available in a reasonable way. Fixes #147717 --------- Co-authored-by: Victor Lomuller <victor@codeplay.com>
16 lines
563 B
LLVM
16 lines
563 B
LLVM
; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv1.6-vulkan1.3-compute --spirv-ext=all %s -o - | FileCheck %s
|
|
; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv1.6-vulkan1.3-compute --spirv-ext=all %s -o - -filetype=obj | spirv-val --target-env vulkan1.3 %}
|
|
|
|
; CHECK-NOT: OpExtension "SPV_KHR_no_integer_wrap_decoration"
|
|
|
|
define internal void @foo(i32 %i) local_unnamed_addr {
|
|
%sub.i = sub nsw i32 0, %i
|
|
ret void
|
|
}
|
|
|
|
define internal void @main() local_unnamed_addr #0 {
|
|
entry:
|
|
ret void
|
|
}
|
|
|
|
attributes #0 = { "hlsl.numthreads"="1,1,1" "hlsl.shader"="compute" } |