[clang] [llvm] [HLSL] implement elementwise firstbithigh hlsl builtin (PR #111082)

Farzon Lotfi via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 23 17:23:48 PDT 2024


================
@@ -0,0 +1,107 @@
+; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o - -filetype=obj | spirv-val %}
+
+; CHECK: OpMemoryModel Logical GLSL450
+
+define noundef i32 @firstbituhigh_i32(i32 noundef %a) {
----------------
farzonl wrote:

This file has a bug
project/llvm/test/CodeGen/SPIRV/hlsl-intrinsics/firstbithigh.ll -o - -filetype=obj
error: line 54: Illegal number of components (1) for TypeVector
  %v1uint = OpTypeVector %uint 1


https://github.com/llvm/llvm-project/pull/111082


More information about the cfe-commits mailing list