[clang] [llvm] [X86][AVX10.2] Support AVX10.2-CONVERT new instructions. (PR #101600)

Freddy Ye via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 18 19:21:42 PDT 2024


================
@@ -847,6 +847,91 @@ def X86vcvttp2iubs : SDNode<"X86ISD::CVTTP2IUBS",  SDTFloatToInt>;
 def X86vcvttp2ibsSAE : SDNode<"X86ISD::CVTTP2IBS_SAE", SDTFloatToInt>;
 def X86vcvttp2iubsSAE : SDNode<"X86ISD::CVTTP2IUBS_SAE", SDTFloatToInt>;
 
+def SDTAVX10CONVERT_I82F16 : SDTypeProfile<1, 2, [
+  SDTCVecEltisVT<0, i8>, SDTCVecEltisVT<1, f16>, SDTCisSameAs<1, 2>
+]>;
+
+def SDTAVX10CONVERT_F16I8 : SDTypeProfile<1, 1, [
+  SDTCVecEltisVT<0, f16>, SDTCVecEltisVT<1, i8>
+]>;
+
+def SDTAVX10CONVERT_I8F16 : SDTypeProfile<1, 1, [
+  SDTCVecEltisVT<0, i8>, SDTCVecEltisVT<1, f16>
+]>;
+
+def SDTAVX10CONVERT_I8F16_MASK : SDTypeProfile<1, 3, [
+  SDTCVecEltisVT<0, i8>, SDTCVecEltisVT<1, f16>,
+  SDTCisSameAs<0, 2>, SDTCVecEltisVT<3, i1>,
+  SDTCisSameNumEltsAs<1, 3>
+]>;
+
+def SDTAVX10CONVERT_2I8F16 : SDTypeProfile<1, 2, [
+  SDTCVecEltisVT<0, i8>, SDTCVecEltisVT<1, i8>, SDTCVecEltisVT<2, f16>
+]>;
+
+def SDTAVX10CONVERT_2I8F16_MASK : SDTypeProfile<1, 4, [
+  SDTCVecEltisVT<0, i8>, SDTCisSameAs<0, 1>,
+  SDTCVecEltisVT<2, f16>, SDTCisSameAs<0, 3>, SDTCVecEltisVT<4, i1>,
+  SDTCisSameNumEltsAs<2, 4>
+]>;
+
+def X86vcvt2ps2phx : SDNode<"X86ISD::VCVT2PS2PHX",
+                     SDTypeProfile<1, 2, [SDTCVecEltisVT<0, f16>,
+                                           SDTCVecEltisVT<1, f32>,
+                                           SDTCisSameAs<1,2>]>>;
+def X86vcvt2ps2phxRnd : SDNode<"X86ISD::VCVT2PS2PHX_RND",
+                        SDTypeProfile<1, 3, [SDTCVecEltisVT<0, f16>,
+                                            SDTCVecEltisVT<1, f32>,
+                                            SDTCisSameAs<1,2>,
+                                            SDTCisVT<3, i32>]>>;
----------------
FreddyLeaf wrote:

[4a5a207](https://github.com/llvm/llvm-project/pull/101600/commits/4a5a2077bf72fe6d13dbf3bf4226817db7aa808a)

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


More information about the cfe-commits mailing list