OSDN Git Service

This test needs to use egrep.
[android-x86/external-llvm.git] / test / Transforms / InstCombine / fpcast.ll
1 ; Test some floating point casting cases
2 ; RUN: llvm-upgrade %s -o - | llvm-as | opt -instcombine | llvm-dis | notcast
3 ; RUN: llvm-upgrade %s -o - | llvm-as | opt -instcombine | llvm-dis | \
4 ; RUN:   egrep {ret i8 \(-1\)\|\(255\)}
5
6 sbyte %test1() {
7     %x = fptoui float 255.0 to sbyte 
8     ret sbyte %x
9 }
10
11 ubyte %test2() {
12     %x = fptosi float -1.0 to ubyte
13     ret ubyte %x
14 }