https://llvm.org/bugs/show_bug.cgi?id=31024
Bug ID: 31024 Summary: [X86] Unnecessary register moves Product: libraries Version: trunk Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: Backend: X86 Assignee: unassignedb...@nondot.org Reporter: llvm-...@redking.me.uk CC: llvm-bugs@lists.llvm.org Classification: Unclassified define <8 x i64> @sext_16i8_to_8i64(<16 x i8> %A) nounwind uwtable readnone ssp { entry: %B = shufflevector <16 x i8> %A, <16 x i8> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7> %C = sext <8 x i8> %B to <8 x i64> ret <8 x i64> %C } llc -mtriple=x86_64-unknown-unknown -mattr=+avx2 sext_16i8_to_8i64: vpmovsxbq %xmm0, %ymm2 vpshufd {{.*#+}} xmm0 = xmm0[1,1,2,3] vpmovsxbq %xmm0, %ymm1 vmovdqa %ymm2, %ymm0 retq This could avoid the register move: sext_16i8_to_8i64: vpshufd {{.*#+}} xmm1 = xmm0[1,1,2,3] vpmovsxbq %xmm0, %ymm0 vpmovsxbq %xmm1, %ymm1 retq Reg-reg moves are almost free but its still better to avoid them if we can. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs