llvm/llvm-project

[AArch64][GlobalISel] ABD operations and combines

Open

#118,085 建立於 2024年11月29日

在 GitHub 查看
 (17 留言) (0 反應) (0 負責人)C++ (10,782 fork)batch import
backend:AArch64good first issuellvm:globaliselmissed-optimization

倉庫指標

Star
 (26,378 star)
PR 合併指標
 (平均合併 1天 2小時) (30 天內合併 1,000 個 PR)

描述

SDAG, via these nodes can pattern-recognise and optimise abd nodes. We should add the same operations for global isel.

  /// ABDS/ABDU - Absolute difference - Return the absolute difference between
  /// two numbers interpreted as signed/unsigned.
  /// i.e trunc(abs(sext(Op0) - sext(Op1))) becomes abds(Op0, Op1)
  ///  or trunc(abs(zext(Op0) - zext(Op1))) becomes abdu(Op0, Op1)
  ABDS,
  ABDU,

There are tests in, for example, llvm/test/CodeGen/AArch64/abd-combine.ll. https://godbolt.org/z/71PGjf486

貢獻者指南