xref: /minix3/external/bsd/llvm/dist/llvm/test/CodeGen/X86/avx-fp2int.ll (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc; RUN: llc < %s -mtriple=i386-apple-darwin10 -mcpu=corei7-avx -mattr=+avx | FileCheck %s
2*f4a2713aSLionel Sambuc
3*f4a2713aSLionel Sambuc;; Check that FP_TO_SINT and FP_TO_UINT generate convert with truncate
4*f4a2713aSLionel Sambuc
5*f4a2713aSLionel Sambuc; CHECK-LABEL: test1:
6*f4a2713aSLionel Sambuc; CHECK: vcvttpd2dqy
7*f4a2713aSLionel Sambuc; CHECK: ret
8*f4a2713aSLionel Sambuc; CHECK-LABEL: test2:
9*f4a2713aSLionel Sambuc; CHECK: vcvttpd2dqy
10*f4a2713aSLionel Sambuc; CHECK: ret
11*f4a2713aSLionel Sambuc
12*f4a2713aSLionel Sambucdefine <4 x i8> @test1(<4 x double> %d) {
13*f4a2713aSLionel Sambuc  %c = fptoui <4 x double> %d to <4 x i8>
14*f4a2713aSLionel Sambuc  ret <4 x i8> %c
15*f4a2713aSLionel Sambuc}
16*f4a2713aSLionel Sambucdefine <4 x i8> @test2(<4 x double> %d) {
17*f4a2713aSLionel Sambuc  %c = fptosi <4 x double> %d to <4 x i8>
18*f4a2713aSLionel Sambuc  ret <4 x i8> %c
19*f4a2713aSLionel Sambuc}
20