Fix for the following bug in AVX codegen for double-to-int conversions:
[oota-llvm.git] / test / CodeGen / X86 / avx-fp2int.ll
1 ; RUN: llc < %s -mtriple=i386-apple-darwin10 -mcpu=corei7-avx -mattr=+avx | FileCheck %s\r
2 \r
3 ;; Check that FP_TO_SINT and FP_TO_UINT generate convert with truncate\r
4 \r
5 ; CHECK: test1:\r
6 ; CHECK: vcvttpd2dqy\r
7 ; CHECK: ret\r
8 ; CHECK: test2:\r
9 ; CHECK: vcvttpd2dqy\r
10 ; CHECK: ret\r
11 \r
12 define <4 x i8> @test1(<4 x double> %d) {\r
13   %c = fptoui <4 x double> %d to <4 x i8>\r
14   ret <4 x i8> %c\r
15 }\r
16 define <4 x i8> @test2(<4 x double> %d) {\r
17   %c = fptosi <4 x double> %d to <4 x i8>\r
18   ret <4 x i8> %c\r
19 }\r