[llvm] a8949b1 - [X86] Add test coverage showing failure to concatenate matching rotate nodes
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 14 10:03:18 PDT 2025
Author: Simon Pilgrim
Date: 2025-03-14T17:02:46Z
New Revision: a8949b16e64f4787755a43b4fffed762ccb94b34
URL: https://github.com/llvm/llvm-project/commit/a8949b16e64f4787755a43b4fffed762ccb94b34
DIFF: https://github.com/llvm/llvm-project/commit/a8949b16e64f4787755a43b4fffed762ccb94b34.diff
LOG: [X86] Add test coverage showing failure to concatenate matching rotate nodes
Added:
Modified:
llvm/test/CodeGen/X86/vector-shuffle-combining-avx512bwvl.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/vector-shuffle-combining-avx512bwvl.ll b/llvm/test/CodeGen/X86/vector-shuffle-combining-avx512bwvl.ll
index 4125d78783719..b942af1dc87d9 100644
--- a/llvm/test/CodeGen/X86/vector-shuffle-combining-avx512bwvl.ll
+++ b/llvm/test/CodeGen/X86/vector-shuffle-combining-avx512bwvl.ll
@@ -98,6 +98,36 @@ define <16 x i8> @combine_shuffle_vrotli_v4i32(<4 x i32> %a0) {
}
declare <4 x i32> @llvm.fshl.v4i32(<4 x i32>, <4 x i32>, <4 x i32>)
+
+define <8 x i32> @concat_vrotli_v4i32(<4 x i32> %a0, <4 x i32> %a1) {
+; CHECK-LABEL: concat_vrotli_v4i32:
+; CHECK: # %bb.0:
+; CHECK-NEXT: vprold $3, %xmm0, %xmm0
+; CHECK-NEXT: vprold $3, %xmm1, %xmm1
+; CHECK-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm0
+; CHECK-NEXT: ret{{[l|q]}}
+ %r0 = tail call <4 x i32> @llvm.fshl.v4i32(<4 x i32> %a0, <4 x i32> %a0, <4 x i32> splat (i32 3))
+ %r1 = tail call <4 x i32> @llvm.fshl.v4i32(<4 x i32> %a1, <4 x i32> %a1, <4 x i32> splat (i32 3))
+ %shuffle = shufflevector <4 x i32> %r0, <4 x i32> %r1, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
+ ret <8 x i32> %shuffle
+}
+
+define <8 x i32> @concat_vrotlv_v4i32(<4 x i32> %a0, <4 x i32> %a1, <8 x i32> %a2) {
+; CHECK-LABEL: concat_vrotlv_v4i32:
+; CHECK: # %bb.0:
+; CHECK-NEXT: vextracti128 $1, %ymm2, %xmm3
+; CHECK-NEXT: vprolvd %xmm2, %xmm0, %xmm0
+; CHECK-NEXT: vprolvd %xmm3, %xmm1, %xmm1
+; CHECK-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm0
+; CHECK-NEXT: ret{{[l|q]}}
+ %lo = shufflevector <8 x i32> %a2, <8 x i32> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
+ %hi = shufflevector <8 x i32> %a2, <8 x i32> poison, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
+ %r0 = tail call <4 x i32> @llvm.fshl.v4i32(<4 x i32> %a0, <4 x i32> %a0, <4 x i32> %lo)
+ %r1 = tail call <4 x i32> @llvm.fshl.v4i32(<4 x i32> %a1, <4 x i32> %a1, <4 x i32> %hi)
+ %shuffle = shufflevector <4 x i32> %r0, <4 x i32> %r1, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
+ ret <8 x i32> %shuffle
+}
+
define void @PR46178(ptr %0) {
; X86-LABEL: PR46178:
; X86: # %bb.0:
@@ -174,11 +204,11 @@ define i64 @PR55050() {
; X86-NEXT: xorl %edx, %edx
; X86-NEXT: xorl %eax, %eax
; X86-NEXT: testb %dl, %dl
-; X86-NEXT: jne .LBB10_2
+; X86-NEXT: jne .LBB12_2
; X86-NEXT: # %bb.1: # %if
; X86-NEXT: xorl %eax, %eax
; X86-NEXT: xorl %edx, %edx
-; X86-NEXT: .LBB10_2: # %exit
+; X86-NEXT: .LBB12_2: # %exit
; X86-NEXT: retl
;
; X64-LABEL: PR55050:
More information about the llvm-commits
mailing list