[llvm] [DAG] Support saturated truncate (PR #99418)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 21 03:15:56 PDT 2024
================
@@ -5343,9 +5343,13 @@ def VImm8000: PatLeaf<(AArch64mvni_msl (i32 127), (i32 264))>;
// trunc(umin(X, 255)) -> UQXTRN v8i8
def : Pat<(v8i8 (trunc (umin (v8i16 V128:$Vn), (v8i16 VImmFF)))),
(UQXTNv8i8 V128:$Vn)>;
+def : Pat<(v8i8 (truncusat (v8i16 V128:$Vn))),
----------------
ParkHanbum wrote:
@topperc I tested this by implementing additional code to support `fp_to_[su]int_sat`. As a result, if `LegalOperations` is unchecked, the associated Pattern can be deleted.
Should we continue to check `LegalOperations`? I can not sure because I'm not a veteran.
https://github.com/llvm/llvm-project/pull/99418
More information about the llvm-commits
mailing list