[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

Farzon Lotfi via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 31 11:29:51 PDT 2024


================
@@ -0,0 +1,10 @@
+; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s
+
+; DXIL operation length does not support double overload type
+; CHECK: LLVM ERROR: Invalid Overload
+
+define noundef double @test_length_double2(<2 x double> noundef %p0) {
+entry:
+  %hlsl.length = call double @llvm.dx.length.v2f32(<2 x double> %p0)
+  ret double %hlsl.length
+}
----------------
farzonl wrote:

add new line

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


More information about the cfe-commits mailing list