Files
clang-p2996/llvm/test/CodeGen/SPIRV/optnone.ll
Paulo Matos 8f3b87fc14 [SPIRV] Add support for SPV_INTEL_optnone
Adds support for SPV_INTEL_optnone.

Currently still in draft form but I wanted to open this revision
to ask some questions.

Differential Revision: https://reviews.llvm.org/D156297
2023-08-01 12:53:54 +02:00

18 lines
527 B
LLVM

;; Check that optnone is correctly ignored when extension is not enabled
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV
; CHECK-SPIRV: OpCapability OptNoneINTEL
; CHECK-SPIRV: OpExtension "SPV_INTEL_optnone"
;; Per SPIR-V spec:
;; FunctionControlDontInlineMask = 0x2 (2)
; CHECK-SPIRV: %[[#]] = OpFunction %[[#]] DontInline
; Function Attrs: nounwind optnone noinline
define spir_func void @_Z3foov() #0 {
entry:
ret void
}
attributes #0 = { nounwind optnone noinline }