2015-11-24 05:33:58 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
2017-06-21 21:17:14 +08:00
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse2 | FileCheck %s --check-prefix=SSE --check-prefix=SSE2
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+ssse3 | FileCheck %s --check-prefix=SSE --check-prefix=SSSE3
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse4.1 | FileCheck %s --check-prefix=SSE --check-prefix=SSE41
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck %s --check-prefix=AVX --check-prefix=AVX1
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2 | FileCheck %s --check-prefix=AVX --check-prefix=AVX2
|
2014-12-16 06:45:48 +08:00
|
|
|
|
|
|
|
define <4 x i32> @load_zmov_4i32_to_0zzz(<4 x i32> *%ptr) {
|
2015-07-13 01:40:49 +08:00
|
|
|
; SSE-LABEL: load_zmov_4i32_to_0zzz:
|
2017-12-05 01:18:51 +08:00
|
|
|
; SSE: # %bb.0: # %entry
|
2016-12-16 00:05:29 +08:00
|
|
|
; SSE-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
|
2015-07-13 01:40:49 +08:00
|
|
|
; SSE-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX-LABEL: load_zmov_4i32_to_0zzz:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX: # %bb.0: # %entry
|
2016-12-16 00:05:29 +08:00
|
|
|
; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
|
2015-07-13 01:40:49 +08:00
|
|
|
; AVX-NEXT: retq
|
2014-12-16 06:45:48 +08:00
|
|
|
entry:
|
2015-02-28 05:17:42 +08:00
|
|
|
%X = load <4 x i32>, <4 x i32>* %ptr
|
2014-12-16 06:45:48 +08:00
|
|
|
%Y = shufflevector <4 x i32> %X, <4 x i32> zeroinitializer, <4 x i32> <i32 0, i32 4, i32 4, i32 4>
|
|
|
|
ret <4 x i32>%Y
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x i64> @load_zmov_2i64_to_0z(<2 x i64> *%ptr) {
|
2015-07-13 01:40:49 +08:00
|
|
|
; SSE-LABEL: load_zmov_2i64_to_0z:
|
2017-12-05 01:18:51 +08:00
|
|
|
; SSE: # %bb.0: # %entry
|
2016-12-16 00:05:29 +08:00
|
|
|
; SSE-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
|
2015-07-13 01:40:49 +08:00
|
|
|
; SSE-NEXT: retq
|
|
|
|
;
|
|
|
|
; AVX-LABEL: load_zmov_2i64_to_0z:
|
2017-12-05 01:18:51 +08:00
|
|
|
; AVX: # %bb.0: # %entry
|
2016-12-16 00:05:29 +08:00
|
|
|
; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
|
2015-07-13 01:40:49 +08:00
|
|
|
; AVX-NEXT: retq
|
2014-12-16 06:45:48 +08:00
|
|
|
entry:
|
2015-02-28 05:17:42 +08:00
|
|
|
%X = load <2 x i64>, <2 x i64>* %ptr
|
2014-12-16 06:45:48 +08:00
|
|
|
%Y = shufflevector <2 x i64> %X, <2 x i64> zeroinitializer, <2 x i32> <i32 0, i32 2>
|
|
|
|
ret <2 x i64>%Y
|
|
|
|
}
|