[all-commits] [llvm/llvm-project] f51e34: [AArch64] Select REV16 for zext(bswap(i16)) (#189576)

Valeriy Savchenko via All-commits all-commits at lists.llvm.org
Thu Apr 2 03:33:00 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f51e343ed5896c05af0feee3d27d37dca7e94c32
      https://github.com/llvm/llvm-project/commit/f51e343ed5896c05af0feee3d27d37dca7e94c32
  Author: Valeriy Savchenko <vsavchenko at apple.com>
  Date:   2026-04-02 (Thu, 02 Apr 2026)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/test/CodeGen/AArch64/bswap.ll
    M llvm/test/CodeGen/AArch64/memcmp.ll

  Log Message:
  -----------
  [AArch64] Select REV16 for zext(bswap(i16)) (#189576)

Extend the existing any_extend(bswap i16) -> rev16 combine to also
handle zero_extend. REV16 preserves a zero upper half, so for i16 loads
this saves one instruction: ldrh+rev+lsr#16 -> ldrh+rev16.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list