llvm-6502/test/Transforms/InstCombine/fpcast.ll
Tanya Lattner 76806b6a43 Remove llvm-upgrade and update tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48103 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 08:16:40 +00:00

16 lines
432 B
LLVM

; 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: egrep {ret i8 \(-1\)\|\(255\)}
define i8 @test1() {
%x = fptoui float 2.550000e+02 to i8 ; <i8> [#uses=1]
ret i8 %x
}
define i8 @test2() {
%x = fptosi float -1.000000e+00 to i8 ; <i8> [#uses=1]
ret i8 %x
}