llvm-6502/test/Transforms/InstCombine/fpcast.ll
2006-12-02 04:23:10 +00:00

15 lines
382 B
LLVM

; Test some floating point casting cases
; RUN: llvm-upgrade %s -o - | llvm-as | opt -instcombine | llvm-dis | notcast
; RUN: llvm-upgrade %s -o - | llvm-as | 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
}