================
@@ -0,0 +1,15 @@
+; RUN: llc -O0 -verify-machineinstrs -mtriple=spirv-unknown-vulkan %s -o - |
FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-vulkan %s -o -
-filetype=obj | spirv-val %}
+
+; CHECK-DAG: [[SET:%.*]] = OpExtInstImport "GLSL.std.450"
+; CHECK-DAG: [[FLOAT:%.*]] = OpTypeFloat 32
+; CHECK-DAG: [[FLOAT2:%.*]] = OpTypeVector [[FLOAT]] 2
+; CHECK-DAG: [[UINT:%.*]] = OpTypeInt 32 0
+
+; CHECK: [[P0:%.*]] = OpFunctionParameter [[FLOAT2]]
+; CHECK: [[PACK:%.*]] = OpExtInst [[UINT]] [[SET]] PackHalf2x16 [[P0]]
+; CHECK: OpReturnValue [[PACK]]
+define hidden spir_func noundef i32 @_Z9test_funcj(<2 x float> noundef %0)
local_unnamed_addr #0 {
----------------
tcorringham wrote:
As far as I'm aware there isn't a scalar case - the argument to packhalf2x16
can only be a 2 x float vector
https://github.com/llvm/llvm-project/pull/172469
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits