[llvm] [AArch64][CodeGen] Fold tbx(splat(0), table, idxs) to tbl(table, idxs) (PR #214146)

Benjamin Maxwell via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 5 01:33:22 PDT 2026


================
@@ -0,0 +1,11 @@
+; RUN: llc -mtriple=aarch64 -mattr=+neon < %s | FileCheck %s
+
+define <16 x i8> @test_zero_splat(<16 x i8> %tbl, <16 x i8> %idx) {
+; CHECK-LABEL: test_zero_splat:
+; CHECK: tbl
+; CHECK: ret
+  %res = call <16 x i8> @llvm.aarch64.neon.tbx1.v16i8(<16 x i8> zeroinitializer, <16 x i8> %tbl, <16 x i8> %idx)
----------------
MacDue wrote:

You should check all the tbx intrinsic variants you've added folds for. 

https://github.com/llvm/llvm-project/pull/214146


More information about the llvm-commits mailing list