[all-commits] [llvm/llvm-project] 6cb759: [AArch64][GlobalISel] Mark some vector G_ABS cases...

Jessica Paquette via All-commits all-commits at lists.llvm.org
Wed Apr 21 18:11:20 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6cb7599078121f1e510b27170815f81f169c9554
      https://github.com/llvm/llvm-project/commit/6cb7599078121f1e510b27170815f81f169c9554
  Author: Jessica Paquette <jpaquette at apple.com>
  Date:   2021-04-21 (Wed, 21 Apr 2021)

  Changed paths:
    M llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
    M llvm/test/CodeGen/AArch64/GlobalISel/legalize-abs.mir
    A llvm/test/CodeGen/AArch64/GlobalISel/select-abs.mir

  Log Message:
  -----------
  [AArch64][GlobalISel] Mark some vector G_ABS cases as legal

Each of the cases marked as legal here have an imported pattern in
AArch64GenGlobalISel.inc. So, if we mark them as legal, we get selection for
free.

Technically this is only supposed to happen if we have NEON support. But, we
fall back if we don't have that in the legalizer right now. I suppose it'd be
better to have a FIXME so we can write the testcase when the time comes.

(Plus, it'd just fall back in selection if NEON isn't available, so it's not
*wrong*, I guess?)

This fixes some fallbacks in the test suite.

(Also use `isScalar` from LegalityPredicates.cpp while we're here just to tidy
things a little bit.)

Differential Revision: https://reviews.llvm.org/D100916




More information about the All-commits mailing list