[clang] [llvm] [HLSL] Implement the `faceforward` intrinsic (PR #135878)

Farzon Lotfi via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 17 11:37:55 PDT 2025


================
@@ -0,0 +1,35 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5
+
+// RUN: %clang_cc1 -O1 -triple spirv-pc-vulkan-compute %s -emit-llvm -o - | FileCheck %s
+
+typedef float float2 __attribute__((ext_vector_type(2)));
+typedef float float3 __attribute__((ext_vector_type(3)));
+typedef float float4 __attribute__((ext_vector_type(4)));
+
----------------
farzonl wrote:

if you want to do half testing you should be able to do this 
```cpp
typedef _Float16 half;
typedef half half2 __attribute__((ext_vector_type(2)));
```

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


More information about the llvm-commits mailing list