xref: /llvm-project/llvm/test/CodeGen/AArch64/shuffle-mask-legal.ll (revision e197c617a64c1deaa412f24c0e398569bec2f1c8)
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=aarch64-- | FileCheck %s
3
4; A shuffle mask with all undef elements is always legal.
5
6define <4 x i32> @PR41535(<2 x i32> %p1, <2 x i32> %p2) {
7; CHECK-LABEL: PR41535:
8; CHECK:       // %bb.0:
9; CHECK-NEXT:    ext v0.8b, v0.8b, v1.8b, #4
10; CHECK-NEXT:    mov v0.d[1], v0.d[0]
11; CHECK-NEXT:    ret
12  %cat1 = shufflevector <2 x i32> %p1, <2 x i32> undef, <4 x i32> <i32 undef, i32 1, i32 undef, i32 undef>
13  %cat2 = shufflevector <2 x i32> %p2, <2 x i32> undef, <4 x i32> <i32 0, i32 undef, i32 undef, i32 undef>
14  %r = shufflevector <4 x i32> %cat1, <4 x i32> %cat2, <4 x i32> <i32 undef, i32 undef, i32 1, i32 4>
15  ret <4 x i32> %r
16}
17