[llvm] [AArch64] Optimize lowering of extending BUILD_VECTOR(EXTRACT_VECTOR_ELT()) (PR #212156)

Usman Nadeem via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 3 21:58:01 PDT 2026


================
@@ -281,7 +281,8 @@ define void @insert_vec_v16i8_uaddlv_from_v8i8(ptr %0) {
 ; CHECK-NEXT:    movi.2d v2, #0000000000000000
 ; CHECK-NEXT:    uaddlv.8b h1, v0
 ; CHECK-NEXT:    stp q0, q0, [x0, #32]
-; CHECK-NEXT:    mov.h v2[0], v1[0]
+; CHECK-NEXT:    mov.b v2[0], v1[0]
+; CHECK-NEXT:    zip1.8b v2, v2, v2
----------------
UsmanNadeem wrote:

It was a build vector with one scalar and rest constants. Instead of v4i16 build_vector which was transformed to -> extract+insert into constant BV, we were getting a v8i8 BV -> extract+insert into constant BV + extend + extract_subvec. Should be fixed in the latest iteration where I fold the unnecesary any_extend for the build_vector.

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


More information about the llvm-commits mailing list