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
18 lines
527 B
LLVM
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 }
|