blob: 31cd47f6194fe621f5e93fb8dc32a7997b77c14e [file] [log] [blame]
Reid Spencer3da59db2006-11-27 01:05:10 +00001; Test some floating point casting cases
2; RUN: llvm-as %s -o - | opt -instcombine | llvm-dis | notcast
3; RUN: llvm-as %s -o - | opt -instcombine | llvm-dis | \
4; RUN: grep 'ret [us]byte \(-1\)\|\(255\)'
5
6sbyte %test() {
7 %x = fptoui float 255.0 to sbyte
8 ret sbyte %x
9}
10
11ubyte %test() {
12 %x = fptosi float -1.0 to ubyte
13 ret ubyte %x
14}