Matt Beaumont-Gay | 1e8d720 | 2012-02-02 19:00:49 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck %s |
| 2 | |
| 3 | define <4 x i32> @trunc_64_32(<4 x i64> %A) nounwind uwtable readnone ssp{ |
Cameron McInally | 791ae99 | 2014-03-05 19:41:16 +0000 | [diff] [blame] | 4 | ; CHECK-LABEL: trunc_64_32 |
| 5 | ; CHECK: shufps |
| 6 | ; CHECK-NOT: pshufd |
| 7 | ; CHECK-NOT: movlhps |
Matt Beaumont-Gay | 1e8d720 | 2012-02-02 19:00:49 +0000 | [diff] [blame] | 8 | %B = trunc <4 x i64> %A to <4 x i32> |
| 9 | ret <4 x i32>%B |
| 10 | } |
| 11 | define <8 x i16> @trunc_32_16(<8 x i32> %A) nounwind uwtable readnone ssp{ |
Cameron McInally | 791ae99 | 2014-03-05 19:41:16 +0000 | [diff] [blame] | 12 | ; CHECK-LABEL: trunc_32_16 |
Matt Beaumont-Gay | 1e8d720 | 2012-02-02 19:00:49 +0000 | [diff] [blame] | 13 | ; CHECK: pshufb |
| 14 | %B = trunc <8 x i32> %A to <8 x i16> |
| 15 | ret <8 x i16>%B |
| 16 | } |
Benjamin Kramer | 0ccab2d | 2013-10-23 21:06:07 +0000 | [diff] [blame] | 17 | define <16 x i8> @trunc_16_8(<16 x i16> %A) nounwind uwtable readnone ssp{ |
| 18 | ; CHECK-LABEL: trunc_16_8 |
| 19 | ; CHECK: pshufb |
| 20 | %B = trunc <16 x i16> %A to <16 x i8> |
| 21 | ret <16 x i8> %B |
| 22 | } |