https://bugs.llvm.org/show_bug.cgi?id=41023

            Bug ID: 41023
           Summary: [AArch64] Use UQADD for vector UADDSAT etc
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: AArch64
          Assignee: unassignedb...@nondot.org
          Reporter: nikita....@gmail.com
                CC: arnaud.degrandmai...@arm.com,
                    llvm-bugs@lists.llvm.org, peter.sm...@linaro.org,
                    ties.st...@arm.com

AArch64 has uqadd, sqadd, uqsub and sqsub instructions for the legal vector
types. We should use them for uaddsat, saddsat, usubsat and ssubsat instead of
the fallback expansions.

I've tried implementing this myself, but couldn't figure out the right way to
do it. I initially thought we can just autoupgrade the aarch64.neon.uqadd etc
intrinsics to use the generic uadd.sat intrinsics instead and adjust the isel
patterns accordingly.

Unfortunately, this is complicated by the existence of the SIMD scalar variants
of these instructions. I'm assuming that it is preferable to use the fallback
expansion in the scalar case (e.g. adds+csinv) rather than using the SIMD
instruction with three register moves. On the other hand, we probably still
need to force the use of the SIMD instructions if the NEON intrinsics are used.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to