[clang] [llvm] Add length builtins and length HLSL function to DirectX Backend (PR #101256)
Joshua Batista via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 2 17:30:28 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 scalar types
+; CHECK: error: invalid intrinsic signature
+
+define noundef float @test_length_float(float noundef %p0) {
+entry:
+ %hlsl.length = call float @llvm.dx.length.f32(float %p0)
----------------
bob80905 wrote:
Ok, I've added tests for both a scalar input, and a vector with 1 element input.
https://github.com/llvm/llvm-project/pull/101256
More information about the cfe-commits
mailing list