================ @@ -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 +} ---------------- bogner wrote:
Isn't it already an error? The intrinsic is defined in a way that requires a vector: ``` def int_dx_length : DefaultAttrsIntrinsic<[LLVMVectorElementType<0>], [llvm_anyfloat_ty]>; ``` That said I guess there is an argument that the crash on a vector of length 1 isn't ideal. Maybe we should make that an error as well. https://github.com/llvm/llvm-project/pull/101256 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits