1 ; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s
3 ; CHECK: %[[#extinst_id:]] = OpExtInstImport "OpenCL.std"
6 ; CHECK: %[[#]] = OpExtInst %[[#]] %[[#extinst_id]] ctz
9 define spir_func i32 @TestCtz(i32 %x) local_unnamed_addr {
11 %0 = tail call i32 @llvm.cttz.i32(i32 %x, i1 true)
16 ; CHECK: %[[#]] = OpExtInst %[[#]] %[[#extinst_id]] ctz
17 ; CHECK: OpFunctionEnd
19 define spir_func <4 x i32> @TestCtzVec(<4 x i32> %x) local_unnamed_addr {
21 %0 = tail call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %x, i1 true)
25 declare i32 @llvm.cttz.i32(i32, i1 immarg)
27 declare <4 x i32> @llvm.cttz.v4i32(<4 x i32>, i1 immarg)