blob: 31cd47f6194fe621f5e93fb8dc32a7997b77c14e [file] [log] [blame]
; Test some floating point casting cases
; RUN: llvm-as %s -o - | opt -instcombine | llvm-dis | notcast
; RUN: llvm-as %s -o - | opt -instcombine | llvm-dis | \
; RUN: grep 'ret [us]byte \(-1\)\|\(255\)'
sbyte %test() {
%x = fptoui float 255.0 to sbyte
ret sbyte %x
}
ubyte %test() {
%x = fptosi float -1.0 to ubyte
ret ubyte %x
}