1 ; RUN: opt < %s -instcombine -S | not grep itofp
3 define i1 @test1(i8 %A) {
4 %B = sitofp i8 %A to double
5 %C = fcmp ult double %B, 128.0
8 define i1 @test2(i8 %A) {
9 %B = sitofp i8 %A to double
10 %C = fcmp ugt double %B, -128.1
14 define i1 @test3(i8 %A) {
15 %B = sitofp i8 %A to double
16 %C = fcmp ule double %B, 127.0
20 define i1 @test4(i8 %A) {
21 %B = sitofp i8 %A to double
22 %C = fcmp ult double %B, 127.0
26 define i32 @test5(i32 %A) {
27 %B = sitofp i32 %A to double
28 %C = fptosi double %B to i32
29 %D = uitofp i32 %C to double
30 %E = fptoui double %D to i32
34 define i32 @test6(i32 %A) {
35 %B = and i32 %A, 7 ; <i32> [#uses=1]
36 %C = and i32 %A, 32 ; <i32> [#uses=1]
37 %D = sitofp i32 %B to double ; <double> [#uses=1]
38 %E = sitofp i32 %C to double ; <double> [#uses=1]
39 %F = fadd double %D, %E ; <double> [#uses=1]
40 %G = fptosi double %F to i32 ; <i32> [#uses=1]
44 define i32 @test7(i32 %a) nounwind {
45 %b = sitofp i32 %a to double ; <double> [#uses=1]
46 %c = fptoui double %b to i32 ; <i32> [#uses=1]
50 define i32 @test8(i32 %a) nounwind {
51 %b = uitofp i32 %a to double ; <double> [#uses=1]
52 %c = fptosi double %b to i32 ; <i32> [#uses=1]