[llvm] [AArch64] Select ADDHN instead of SHRN when possible (PR #225094)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 22 02:27:42 PDT 2026
================
@@ -1351,3 +1351,84 @@ define <4 x i32> @neg_narrow_i32(<4 x i64> %a) {
%vshrn_n = trunc nuw <4 x i64> %s to <4 x i32>
ret <4 x i32> %vshrn_n
}
+
+define <8 x i8> @addhn_shift_i8(ptr %a) nounwind {
+; CHECK-LABEL: addhn_shift_i8:
+; CHECK: // %bb.0:
+; CHECK-NEXT: ldr q0, [x0]
+; CHECK-NEXT: addhn v0.8b, v0.8h, v0.8h
+; CHECK-NEXT: ret
+ %1 = load <8 x i16>, ptr %a
----------------
KRM7 wrote:
Sure, I've updated the tests
https://github.com/llvm/llvm-project/pull/225094
More information about the llvm-commits
mailing list