blob: eb6707480a84670fcba2f2c6627df63f0ed2fe0c [file] [edit]
; RUN: not opt -S -dxil-op-lower %s 2>&1 | FileCheck %s
; SampleIndex is only available to pixel shaders.
; CHECK: Cannot create SampleIndex operation: Invalid stage
target triple = "dxil-pc-shadermodel6.0-vertex"
define i32 @main() {
entry:
%0 = call i32 @llvm.dx.sample.index()
ret i32 %0
}