Skip to content

Commit

Permalink
[X86] Add test coverage for shuffle with freeze
Browse files Browse the repository at this point in the history
  • Loading branch information
RKSimon committed Oct 22, 2022
1 parent eff5406 commit 6a28fa3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions llvm/test/CodeGen/X86/freeze-vector.ll
Expand Up @@ -12,3 +12,15 @@ define <4 x i32> @freeze_insert_subvector(<8 x i32> %a0) nounwind {
%z = shufflevector <8 x i32> %y, <8 x i32> poison, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
ret <4 x i32> %z
}

define <4 x i32> @freeze_shufflevector(<4 x i32> %a0) nounwind {
; CHECK-LABEL: freeze_shufflevector:
; CHECK: # %bb.0:
; CHECK-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,2,1,0]
; CHECK-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,2,1,0]
; CHECK-NEXT: ret{{[l|q]}}
%x = shufflevector <4 x i32> %a0, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%y = freeze <4 x i32> %x
%z = shufflevector <4 x i32> %y, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
ret <4 x i32> %z
}

0 comments on commit 6a28fa3

Please sign in to comment.