1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/test/CodeGen/X86/2008-09-05-sinttofp-2xi32.ll
Eli Friedman fecea4b498 Fix for PR2687: Add patterns to match sint_to_fp and fp_to_sint for <2 x
i32>.  This is a little messy, but it works.

We should really get rid of the intrinsics, though, since they map
perfectly well to standard LLVM instructions.

llvm-svn: 55864
2008-09-05 23:07:03 +00:00

16 lines
405 B
LLVM

; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep cvttpd2pi | count 1
; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep cvtpi2pd | count 1
; PR2687
define <2 x double> @a(<2 x i32> %x) nounwind {
entry:
%y = sitofp <2 x i32> %x to <2 x double>
ret <2 x double> %y
}
define <2 x i32> @b(<2 x double> %x) nounwind {
entry:
%y = fptosi <2 x double> %x to <2 x i32>
ret <2 x i32> %y
}