2012-01-24 13:54:13 +00:00
|
|
|
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck %s
|
|
|
|
|
|
|
|
define <8 x i32> @zext_8i16_to_8i32(<8 x i16> %A) nounwind uwtable readnone ssp {
|
2013-07-18 22:47:09 +00:00
|
|
|
;CHECK-LABEL: zext_8i16_to_8i32:
|
2012-01-24 13:54:13 +00:00
|
|
|
;CHECK: vpunpckhwd
|
2012-02-12 15:05:31 +00:00
|
|
|
;CHECK: ret
|
2012-01-24 13:54:13 +00:00
|
|
|
|
|
|
|
%B = zext <8 x i16> %A to <8 x i32>
|
|
|
|
ret <8 x i32>%B
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i64> @zext_4i32_to_4i64(<4 x i32> %A) nounwind uwtable readnone ssp {
|
2013-07-18 22:47:09 +00:00
|
|
|
;CHECK-LABEL: zext_4i32_to_4i64:
|
2012-01-24 13:54:13 +00:00
|
|
|
;CHECK: vpunpckhdq
|
2012-02-12 15:05:31 +00:00
|
|
|
;CHECK: ret
|
2012-01-24 13:54:13 +00:00
|
|
|
|
|
|
|
%B = zext <4 x i32> %A to <4 x i64>
|
|
|
|
ret <4 x i64>%B
|
|
|
|
}
|
2012-02-12 15:05:31 +00:00
|
|
|
|
|
|
|
define <8 x i32> @zext_8i8_to_8i32(<8 x i8> %z) {
|
2013-07-18 22:47:09 +00:00
|
|
|
;CHECK-LABEL: zext_8i8_to_8i32:
|
2012-02-12 15:05:31 +00:00
|
|
|
;CHECK: vpunpckhwd
|
2012-12-28 05:45:24 +00:00
|
|
|
;CHECK: vpmovzxwd
|
2012-02-12 15:05:31 +00:00
|
|
|
;CHECK: vinsertf128
|
|
|
|
;CHECK: ret
|
|
|
|
%t = zext <8 x i8> %z to <8 x i32>
|
|
|
|
ret <8 x i32> %t
|
|
|
|
}
|
X86: Custom lower zext v16i8 to v16i16.
On sandy bridge (PR17654) we now get
vpxor %xmm1, %xmm1, %xmm1
vpunpckhbw %xmm1, %xmm0, %xmm2
vpunpcklbw %xmm1, %xmm0, %xmm0
vinsertf128 $1, %xmm2, %ymm0, %ymm0
On haswell it's a simple
vpmovzxbw %xmm0, %ymm0
There is a maze of duplicated and dead transforms and patterns in this
area. Remove the dead custom lowering of zext v8i16 to v8i32, that's
already handled by LowerAVXExtend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193262 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 19:19:04 +00:00
|
|
|
|
|
|
|
; PR17654
|
|
|
|
define <16 x i16> @zext_16i8_to_16i16(<16 x i8> %z) {
|
|
|
|
; CHECK-LABEL: zext_16i8_to_16i16:
|
|
|
|
; CHECK: vpxor
|
|
|
|
; CHECK: vpunpckhbw
|
|
|
|
; CHECK: vpunpcklbw
|
|
|
|
; CHECK: vinsertf128
|
|
|
|
; CHECK: ret
|
|
|
|
%t = zext <16 x i8> %z to <16 x i16>
|
|
|
|
ret <16 x i16> %t
|
|
|
|
}
|