blob: a3aadde2bdd1cb0a10249f310b2980be2953daa0 [file] [log] [blame]
Matt Beaumont-Gay2b343702012-01-27 02:31:29 +00001; RUN: llc < %s -mtriple=i386-apple-darwin10 -mcpu=corei7-avx -mattr=+avx | FileCheck %s
2
3;; Check that FP_TO_SINT and FP_TO_UINT generate convert with truncate
4
5; CHECK: test1:
6; CHECK: vcvttpd2dqy
7; CHECK: ret
8; CHECK: test2:
9; CHECK: vcvttpd2dqy
10; CHECK: ret
11
12define <4 x i8> @test1(<4 x double> %d) {
13 %c = fptoui <4 x double> %d to <4 x i8>
14 ret <4 x i8> %c
15}
16define <4 x i8> @test2(<4 x double> %d) {
17 %c = fptosi <4 x double> %d to <4 x i8>
18 ret <4 x i8> %c
19}