================
@@ -63,5 +63,7 @@ let TargetPrefix = "spv" in {
   def int_spv_frac : DefaultAttrsIntrinsic<[LLVMMatchType<0>], 
[llvm_anyfloat_ty]>;
   def int_spv_lerp : Intrinsic<[LLVMMatchType<0>], [llvm_anyfloat_ty, 
LLVMMatchType<0>,LLVMMatchType<0>], 
     [IntrNoMem, IntrWillReturn] >;
+  def int_spv_length : Intrinsic<[LLVMMatchType<0>], [llvm_anyfloat_ty, 
LLVMMatchType<0>,LLVMMatchType<0>], 
----------------
farzonl wrote:

this needs to also be `DefaultAttrsIntrinsic<[LLVMVectorElementType<0>], 
[llvm_anyfloat_ty]>;` like you have it on `int_dx_length`.  `LLVMMatchType<0>` 
will match `llvm_anyfloat_ty` which means it will make the expected return be a 
vector when length returns are scalars.  Also if you don't use 
`DefaultAttrsIntrinsic` you won't get all the  default behaviors of intrinsics. 

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

Reply via email to