Vincent Lejeune | fd49dac | 2013-03-11 18:15:06 +0000 | [diff] [blame^] | 1 | ;RUN: llc < %s -march=r600 -mcpu=cayman -stress-sched -verify-misched |
| 2 | |
| 3 | define void @main() { |
| 4 | main_body: |
| 5 | %0 = load <4 x float> addrspace(9)* null |
| 6 | %1 = extractelement <4 x float> %0, i32 3 |
| 7 | %2 = fptosi float %1 to i32 |
| 8 | %3 = bitcast i32 %2 to float |
| 9 | %4 = bitcast float %3 to i32 |
| 10 | %5 = sdiv i32 %4, 4 |
| 11 | %6 = bitcast i32 %5 to float |
| 12 | %7 = bitcast float %6 to i32 |
| 13 | %8 = mul i32 %7, 4 |
| 14 | %9 = bitcast i32 %8 to float |
| 15 | %10 = bitcast float %9 to i32 |
| 16 | %11 = sub i32 0, %10 |
| 17 | %12 = bitcast i32 %11 to float |
| 18 | %13 = bitcast float %3 to i32 |
| 19 | %14 = bitcast float %12 to i32 |
| 20 | %15 = add i32 %13, %14 |
| 21 | %16 = bitcast i32 %15 to float |
| 22 | %17 = load <4 x float> addrspace(9)* null |
| 23 | %18 = extractelement <4 x float> %17, i32 0 |
| 24 | %19 = load <4 x float> addrspace(9)* null |
| 25 | %20 = extractelement <4 x float> %19, i32 1 |
| 26 | %21 = load <4 x float> addrspace(9)* null |
| 27 | %22 = extractelement <4 x float> %21, i32 2 |
| 28 | br label %LOOP |
| 29 | |
| 30 | LOOP: ; preds = %IF31, %main_body |
| 31 | %temp12.0 = phi float [ 0.000000e+00, %main_body ], [ %47, %IF31 ] |
| 32 | %temp6.0 = phi float [ %22, %main_body ], [ %temp6.1, %IF31 ] |
| 33 | %temp5.0 = phi float [ %20, %main_body ], [ %temp5.1, %IF31 ] |
| 34 | %temp4.0 = phi float [ %18, %main_body ], [ %temp4.1, %IF31 ] |
| 35 | %23 = bitcast float %temp12.0 to i32 |
| 36 | %24 = bitcast float %6 to i32 |
| 37 | %25 = icmp sge i32 %23, %24 |
| 38 | %26 = sext i1 %25 to i32 |
| 39 | %27 = bitcast i32 %26 to float |
| 40 | %28 = bitcast float %27 to i32 |
| 41 | %29 = icmp ne i32 %28, 0 |
| 42 | br i1 %29, label %IF, label %LOOP29 |
| 43 | |
| 44 | IF: ; preds = %LOOP |
| 45 | %30 = call float @llvm.AMDIL.clamp.(float %temp4.0, float 0.000000e+00, float 1.000000e+00) |
| 46 | %31 = call float @llvm.AMDIL.clamp.(float %temp5.0, float 0.000000e+00, float 1.000000e+00) |
| 47 | %32 = call float @llvm.AMDIL.clamp.(float %temp6.0, float 0.000000e+00, float 1.000000e+00) |
| 48 | %33 = call float @llvm.AMDIL.clamp.(float 1.000000e+00, float 0.000000e+00, float 1.000000e+00) |
| 49 | %34 = insertelement <4 x float> undef, float %30, i32 0 |
| 50 | %35 = insertelement <4 x float> %34, float %31, i32 1 |
| 51 | %36 = insertelement <4 x float> %35, float %32, i32 2 |
| 52 | %37 = insertelement <4 x float> %36, float %33, i32 3 |
| 53 | call void @llvm.R600.store.swizzle(<4 x float> %37, i32 0, i32 0) |
| 54 | ret void |
| 55 | |
| 56 | LOOP29: ; preds = %LOOP, %ENDIF30 |
| 57 | %temp6.1 = phi float [ %temp4.1, %ENDIF30 ], [ %temp6.0, %LOOP ] |
| 58 | %temp5.1 = phi float [ %temp6.1, %ENDIF30 ], [ %temp5.0, %LOOP ] |
| 59 | %temp4.1 = phi float [ %temp5.1, %ENDIF30 ], [ %temp4.0, %LOOP ] |
| 60 | %temp20.0 = phi float [ %50, %ENDIF30 ], [ 0.000000e+00, %LOOP ] |
| 61 | %38 = bitcast float %temp20.0 to i32 |
| 62 | %39 = bitcast float %16 to i32 |
| 63 | %40 = icmp sge i32 %38, %39 |
| 64 | %41 = sext i1 %40 to i32 |
| 65 | %42 = bitcast i32 %41 to float |
| 66 | %43 = bitcast float %42 to i32 |
| 67 | %44 = icmp ne i32 %43, 0 |
| 68 | br i1 %44, label %IF31, label %ENDIF30 |
| 69 | |
| 70 | IF31: ; preds = %LOOP29 |
| 71 | %45 = bitcast float %temp12.0 to i32 |
| 72 | %46 = add i32 %45, 1 |
| 73 | %47 = bitcast i32 %46 to float |
| 74 | br label %LOOP |
| 75 | |
| 76 | ENDIF30: ; preds = %LOOP29 |
| 77 | %48 = bitcast float %temp20.0 to i32 |
| 78 | %49 = add i32 %48, 1 |
| 79 | %50 = bitcast i32 %49 to float |
| 80 | br label %LOOP29 |
| 81 | } |
| 82 | |
| 83 | declare float @llvm.AMDIL.clamp.(float, float, float) #0 |
| 84 | |
| 85 | declare void @llvm.R600.store.swizzle(<4 x float>, i32, i32) |
| 86 | |
| 87 | attributes #0 = { readnone } |