[all-commits] [llvm/llvm-project] 9fd105: [AArch64][CodeGen] Fold tbx(splat(0), table, idxs)...

Durgesh Nandan Mohanty via All-commits all-commits at lists.llvm.org
Thu Aug 6 07:50:59 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9fd1052125a393b8aa16fa3e8411168332b22610
      https://github.com/llvm/llvm-project/commit/9fd1052125a393b8aa16fa3e8411168332b22610
  Author: Durgesh Nandan Mohanty <durgeshnandanmohanty at gmail.com>
  Date:   2026-08-06 (Thu, 06 Aug 2026)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    A llvm/test/CodeGen/AArch64/test_tbx.ll

  Log Message:
  -----------
  [AArch64][CodeGen] Fold tbx(splat(0), table, idxs) to tbl(table, idxs) (#214268)

When the destination/background vector of a TBX instruction is a splat
of zero, the operation is equivalent to a TBL instruction. TBL
implicitly zeroes out any elements where the index is out of bounds,
matching the behavior of TBX with a zero background vector.

This patch adds a DAG combine to optimize this case, reducing
instruction latency and register pressure.

Fixes #214077



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