[clang] [llvm] Add length builtins and length HLSL function to DirectX Backend (PR #101256)
Joshua Batista via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 1 13:21:00 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
+}
----------------
bob80905 wrote:
I beleive it would. Is that a problem?
Also, I should note, the dot* intrinsics also expect vector arguments, and don't test for scalar inputs.
https://github.com/llvm/llvm-project/pull/101256
More information about the llvm-commits
mailing list