d61273d7cd883f3ef1df5d7dae822c17c23df443
[oota-llvm.git] / test / Transforms / InstCombine / fpcast.ll
1 ; Test some floating point casting cases
2 ; RUN: opt < %s -instcombine -S | notcast
3 ; RUN: opt < %s -instcombine -S | \
4 ; RUN:   egrep {ret i8 \(-1\)\|\(255\)}
5
6 define i8 @test1() {
7         %x = fptoui float 2.550000e+02 to i8            ; <i8> [#uses=1]
8         ret i8 %x
9 }
10
11 define i8 @test2() {
12         %x = fptosi float -1.000000e+00 to i8           ; <i8> [#uses=1]
13         ret i8 %x
14 }
15