blob: 0afbb8cfadc5952d5b41d65353393b1f7d2166d1 [file] [log] [blame]
Dan Gohmanc8054d92009-09-09 00:09:15 +00001; RUN: llc < %s
Dan Gohman550c9af2008-08-14 20:04:46 +00002; PR2671
3
Nate Begemanc79f7312009-04-27 18:42:40 +00004define void @a(<2 x double>* %p, <2 x i8>* %q) {
Simon Pilgrim6a8e75c2015-07-03 08:02:12 +00005 %t = load <2 x double>, <2 x double>* %p
6 %r = fptosi <2 x double> %t to <2 x i8>
7 store <2 x i8> %r, <2 x i8>* %q
8 ret void
Nate Begemanc79f7312009-04-27 18:42:40 +00009}
10define void @b(<2 x double>* %p, <2 x i8>* %q) {
Simon Pilgrim6a8e75c2015-07-03 08:02:12 +000011 %t = load <2 x double>, <2 x double>* %p
12 %r = fptoui <2 x double> %t to <2 x i8>
13 store <2 x i8> %r, <2 x i8>* %q
14 ret void
Nate Begemanc79f7312009-04-27 18:42:40 +000015}
16define void @c(<2 x i8>* %p, <2 x double>* %q) {
Simon Pilgrim6a8e75c2015-07-03 08:02:12 +000017 %t = load <2 x i8>, <2 x i8>* %p
18 %r = sitofp <2 x i8> %t to <2 x double>
19 store <2 x double> %r, <2 x double>* %q
20 ret void
Nate Begemanc79f7312009-04-27 18:42:40 +000021}
22define void @d(<2 x i8>* %p, <2 x double>* %q) {
Simon Pilgrim6a8e75c2015-07-03 08:02:12 +000023 %t = load <2 x i8>, <2 x i8>* %p
24 %r = uitofp <2 x i8> %t to <2 x double>
25 store <2 x double> %r, <2 x double>* %q
26 ret void
Nate Begemanc79f7312009-04-27 18:42:40 +000027}
28define void @e(<2 x i8>* %p, <2 x i16>* %q) {
Simon Pilgrim6a8e75c2015-07-03 08:02:12 +000029 %t = load <2 x i8>, <2 x i8>* %p
30 %r = sext <2 x i8> %t to <2 x i16>
31 store <2 x i16> %r, <2 x i16>* %q
32 ret void
Nate Begemanc79f7312009-04-27 18:42:40 +000033}
34define void @f(<2 x i8>* %p, <2 x i16>* %q) {
Simon Pilgrim6a8e75c2015-07-03 08:02:12 +000035 %t = load <2 x i8>, <2 x i8>* %p
36 %r = zext <2 x i8> %t to <2 x i16>
37 store <2 x i16> %r, <2 x i16>* %q
38 ret void
Nate Begemanc79f7312009-04-27 18:42:40 +000039}
Dan Gohman550c9af2008-08-14 20:04:46 +000040define void @g(<2 x i16>* %p, <2 x i8>* %q) {
Simon Pilgrim6a8e75c2015-07-03 08:02:12 +000041 %t = load <2 x i16>, <2 x i16>* %p
42 %r = trunc <2 x i16> %t to <2 x i8>
43 store <2 x i8> %r, <2 x i8>* %q
44 ret void
Dan Gohman550c9af2008-08-14 20:04:46 +000045}