[all-commits] [llvm/llvm-project] 58c57e: [AArch64][GlobalISel] Prefer mov for s32->s64 G_ZEXT

Jessica Paquette via All-commits all-commits at lists.llvm.org
Tue May 18 10:00:38 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 58c57e1b5f5fbc489b95f3b3a387451632c60eea
      https://github.com/llvm/llvm-project/commit/58c57e1b5f5fbc489b95f3b3a387451632c60eea
  Author: Jessica Paquette <jpaquette at apple.com>
  Date:   2021-05-18 (Tue, 18 May 2021)

  Changed paths:
    M llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
    M llvm/test/CodeGen/AArch64/GlobalISel/opt-fold-ext-tbz-tbnz.mir
    M llvm/test/CodeGen/AArch64/GlobalISel/select-cmp.mir
    M llvm/test/CodeGen/AArch64/GlobalISel/select-int-ext.mir
    M llvm/test/CodeGen/AArch64/GlobalISel/select-redundant-zext.mir
    M llvm/test/CodeGen/AArch64/arm64-rev.ll

  Log Message:
  -----------
  [AArch64][GlobalISel] Prefer mov for s32->s64 G_ZEXT

We can use an ORRWrs (mov) + SUBREG_TO_REG rather than a UBFX for G_ZEXT on
s32->s64.

This closer matches what SDAG does, and is likely more power efficient etc.

(Also fixed up arm64-rev.ll which had a fallback check line which was entirely
useless.)

Simple example: https://godbolt.org/z/h1jKKdx5c

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




More information about the All-commits mailing list