OLD | NEW |
1 ; RUN: %szdiff --llvm2ice=%llvm2ice %s | FileCheck --check-prefix=DUMP %s | |
2 | |
3 ; This is a smoke test for floating-point constant pooling. It tests | 1 ; This is a smoke test for floating-point constant pooling. It tests |
4 ; pooling of various float and double constants (including positive | 2 ; pooling of various float and double constants (including positive |
5 ; and negative NaN) within functions and across functions. Note that | 3 ; and negative NaN) within functions and across functions. Note that |
6 ; in LLVM bitcode, hex constants are used for an FP constant whenever | 4 ; in LLVM bitcode, hex constants are used for an FP constant whenever |
7 ; the constant "cannot be represented as a decimal floating point | 5 ; the constant "cannot be represented as a decimal floating point |
8 ; number in a reasonable number of digits". See | 6 ; number in a reasonable number of digits". See |
9 ; http://llvm.org/docs/LangRef.html#simple-constants . | 7 ; http://llvm.org/docs/LangRef.html#simple-constants . |
10 | 8 |
| 9 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s |
| 10 ; RUN: %szdiff --llvm2ice=%llvm2ice %s | FileCheck --check-prefix=DUMP %s |
| 11 |
11 @__init_array_start = internal constant [0 x i8] zeroinitializer, align 4 | 12 @__init_array_start = internal constant [0 x i8] zeroinitializer, align 4 |
12 @__fini_array_start = internal constant [0 x i8] zeroinitializer, align 4 | 13 @__fini_array_start = internal constant [0 x i8] zeroinitializer, align 4 |
13 @__tls_template_start = internal constant [0 x i8] zeroinitializer, align 8 | 14 @__tls_template_start = internal constant [0 x i8] zeroinitializer, align 8 |
14 @__tls_template_alignment = internal constant [4 x i8] c"\01\00\00\00", align 4 | 15 @__tls_template_alignment = internal constant [4 x i8] c"\01\00\00\00", align 4 |
15 | 16 |
16 define internal float @FpLookup1(i32 %Arg) { | 17 define internal float @FpLookup1(i32 %Arg) { |
17 entry: | 18 entry: |
18 switch i32 %Arg, label %return [ | 19 switch i32 %Arg, label %return [ |
19 i32 0, label %sw.bb | 20 i32 0, label %sw.bb |
20 i32 1, label %sw.bb1 | 21 i32 1, label %sw.bb1 |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 %add68 = fadd double %conv67, 0xFFF8000000000000 | 527 %add68 = fadd double %conv67, 0xFFF8000000000000 |
527 br label %return | 528 br label %return |
528 | 529 |
529 return: ; preds = %entry, %sw.bb65, %s
w.bb61, %sw.bb57, %sw.bb53, %sw.bb49, %sw.bb45, %sw.bb41, %sw.bb37, %sw.bb33, %s
w.bb29, %sw.bb25, %sw.bb21, %sw.bb17, %sw.bb13, %sw.bb9, %sw.bb5, %sw.bb1, %sw.b
b | 530 return: ; preds = %entry, %sw.bb65, %s
w.bb61, %sw.bb57, %sw.bb53, %sw.bb49, %sw.bb45, %sw.bb41, %sw.bb37, %sw.bb33, %s
w.bb29, %sw.bb25, %sw.bb21, %sw.bb17, %sw.bb13, %sw.bb9, %sw.bb5, %sw.bb1, %sw.b
b |
530 %retval.0 = phi double [ %add68, %sw.bb65 ], [ %add64, %sw.bb61 ], [ %add60, %
sw.bb57 ], [ %add56, %sw.bb53 ], [ %add52, %sw.bb49 ], [ %conv48, %sw.bb45 ], [
%conv44, %sw.bb41 ], [ %conv40, %sw.bb37 ], [ %conv36, %sw.bb33 ], [ %add32, %sw
.bb29 ], [ %add28, %sw.bb25 ], [ %add24, %sw.bb21 ], [ %add20, %sw.bb17 ], [ %ad
d16, %sw.bb13 ], [ %conv12, %sw.bb9 ], [ %conv8, %sw.bb5 ], [ %conv4, %sw.bb1 ],
[ %conv, %sw.bb ], [ 0.000000e+00, %entry ] | 531 %retval.0 = phi double [ %add68, %sw.bb65 ], [ %add64, %sw.bb61 ], [ %add60, %
sw.bb57 ], [ %add56, %sw.bb53 ], [ %add52, %sw.bb49 ], [ %conv48, %sw.bb45 ], [
%conv44, %sw.bb41 ], [ %conv40, %sw.bb37 ], [ %conv36, %sw.bb33 ], [ %add32, %sw
.bb29 ], [ %add28, %sw.bb25 ], [ %add24, %sw.bb21 ], [ %add20, %sw.bb17 ], [ %ad
d16, %sw.bb13 ], [ %conv12, %sw.bb9 ], [ %conv8, %sw.bb5 ], [ %conv4, %sw.bb1 ],
[ %conv, %sw.bb ], [ 0.000000e+00, %entry ] |
531 ret double %retval.0 | 532 ret double %retval.0 |
532 } | 533 } |
533 | 534 |
534 ; ERRORS-NOT: ICE translation error | 535 ; ERRORS-NOT: ICE translation error |
535 ; DUMP-NOT: SZ | 536 ; DUMP-NOT: SZ |
OLD | NEW |