2015-11-24 05:33:58 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
2015-09-05 03:47:56 +08:00
|
|
|
; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+avx | FileCheck %s
|
2012-01-03 19:59:04 +08:00
|
|
|
|
2015-09-05 03:47:56 +08:00
|
|
|
; Avoid unnecessary vinsertf128
|
2012-01-03 19:59:04 +08:00
|
|
|
define <4 x i64> @test1(<4 x i64> %a) nounwind {
|
2015-09-05 03:47:56 +08:00
|
|
|
; CHECK-LABEL: test1:
|
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: vextractf128 $1, %ymm0, %xmm1
|
2016-01-17 06:30:20 +08:00
|
|
|
; CHECK-NEXT: vpunpckhqdq {{.*#+}} xmm0 = xmm0[1],xmm1[1]
|
2015-09-05 03:47:56 +08:00
|
|
|
; CHECK-NEXT: retl
|
2012-01-03 19:59:04 +08:00
|
|
|
%b = shufflevector <4 x i64> %a, <4 x i64> undef, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
|
|
|
|
ret <4 x i64>%b
|
2015-09-05 03:47:56 +08:00
|
|
|
}
|
2015-07-23 16:25:23 +08:00
|
|
|
|
|
|
|
define <8 x i16> @test2(<4 x i16>* %v) nounwind {
|
2015-09-05 03:47:56 +08:00
|
|
|
; CHECK-LABEL: test2:
|
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
|
2017-03-04 20:50:47 +08:00
|
|
|
; CHECK-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
|
2015-09-05 03:47:56 +08:00
|
|
|
; CHECK-NEXT: retl
|
2015-07-23 16:25:23 +08:00
|
|
|
%v9 = load <4 x i16>, <4 x i16> * %v, align 8
|
|
|
|
%v10 = shufflevector <4 x i16> %v9, <4 x i16> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef>
|
|
|
|
%v11 = shufflevector <8 x i16> <i16 undef, i16 undef, i16 undef, i16 undef, i16 0, i16 0, i16 0, i16 0>, <8 x i16> %v10, <8 x i32> <i32 8, i32 9, i32 10, i32 11, i32 4, i32 5, i32 6, i32 7>
|
|
|
|
ret <8 x i16> %v11
|
|
|
|
}
|