1 ; RUN: llvm-as < %s | llc -march=c | \
2 ; RUN: grep __BITCAST | count 14
4 define i32 @test1(float %F) {
5 %X = bitcast float %F to i32 ; <i32> [#uses=1]
9 define float @test2(i32 %I) {
10 %X = bitcast i32 %I to float ; <float> [#uses=1]
14 define i64 @test3(double %D) {
15 %X = bitcast double %D to i64 ; <i64> [#uses=1]
19 define double @test4(i64 %L) {
20 %X = bitcast i64 %L to double ; <double> [#uses=1]
24 define double @test5(double %D) {
25 %X = bitcast double %D to double ; <double> [#uses=1]
26 %Y = add double %X, 2.000000e+00 ; <double> [#uses=1]
27 %Z = bitcast double %Y to i64 ; <i64> [#uses=1]
28 %res = bitcast i64 %Z to double ; <double> [#uses=1]
32 define float @test6(float %F) {
33 %X = bitcast float %F to float ; <float> [#uses=1]
34 %Y = add float %X, 2.000000e+00 ; <float> [#uses=1]
35 %Z = bitcast float %Y to i32 ; <i32> [#uses=1]
36 %res = bitcast i32 %Z to float ; <float> [#uses=1]
40 define i32 @main(i32 %argc, i8** %argv) {
41 %a = call i32 @test1( float 0x400921FB40000000 ) ; <i32> [#uses=2]
42 %b = call float @test2( i32 %a ) ; <float> [#uses=0]
43 %c = call i64 @test3( double 0x400921FB4D12D84A ) ; <i64> [#uses=1]
44 %d = call double @test4( i64 %c ) ; <double> [#uses=0]
45 %e = call double @test5( double 7.000000e+00 ) ; <double> [#uses=0]
46 %f = call float @test6( float 7.000000e+00 ) ; <float> [#uses=0]