OLD | NEW |
1 ; 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 |
2 ; pooling of various float and double constants (including positive | 2 ; pooling of various float and double constants (including positive |
3 ; and negative NaN) within functions and across functions. Note that | 3 ; and negative NaN) within functions and across functions. Note that |
4 ; 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 |
5 ; the constant "cannot be represented as a decimal floating point | 5 ; the constant "cannot be represented as a decimal floating point |
6 ; number in a reasonable number of digits". See | 6 ; number in a reasonable number of digits". See |
7 ; http://llvm.org/docs/LangRef.html#simple-constants . | 7 ; http://llvm.org/docs/LangRef.html#simple-constants . |
8 | 8 |
9 ; RUN: %p2i --assemble --disassemble --filetype=obj --dis-flags=-s \ | 9 ; RUN: %p2i --assemble --disassemble --filetype=obj --dis-flags=-s \ |
10 ; RUN: -i %s --args -O2 --verbose none | FileCheck %s | 10 ; RUN: -i %s --args -O2 --verbose none -allow-externally-defined-symbols \ |
| 11 ; RUN: | FileCheck %s |
11 ; RUN: %p2i --assemble --disassemble --filetype=obj --dis-flags=-s \ | 12 ; RUN: %p2i --assemble --disassemble --filetype=obj --dis-flags=-s \ |
12 ; RUN: -i %s --args -Om1 --verbose none | FileCheck %s | 13 ; RUN: -i %s --args -Om1 --verbose none -allow-externally-defined-symbols \ |
| 14 ; RUN: | FileCheck %s |
13 | 15 |
14 ; RUN: %if --need allow_dump --command %p2i --assemble --disassemble \ | 16 ; RUN: %if --need allow_dump --command %p2i --assemble --disassemble \ |
15 ; RUN: --dis-flags=-s -i %s --args -O2 --verbose none \ | 17 ; RUN: --dis-flags=-s -i %s --args -O2 --verbose none \ |
| 18 ; RUN: -allow-externally-defined-symbols \ |
16 ; RUN: | %if --need allow_dump --command FileCheck %s | 19 ; RUN: | %if --need allow_dump --command FileCheck %s |
17 ; RUN: %if --need allow_dump --command %p2i --assemble --disassemble \ | 20 ; RUN: %if --need allow_dump --command %p2i --assemble --disassemble \ |
18 ; RUN: --dis-flags=-s -i %s --args -Om1 --verbose none \ | 21 ; RUN: --dis-flags=-s -i %s --args -Om1 --verbose none \ |
| 22 ; RUN: -allow-externally-defined-symbols \ |
19 ; RUN: | %if --need allow_dump --command FileCheck %s | 23 ; RUN: | %if --need allow_dump --command FileCheck %s |
20 | 24 |
21 @__init_array_start = internal constant [0 x i8] zeroinitializer, align 4 | 25 @__init_array_start = internal constant [0 x i8] zeroinitializer, align 4 |
22 @__fini_array_start = internal constant [0 x i8] zeroinitializer, align 4 | 26 @__fini_array_start = internal constant [0 x i8] zeroinitializer, align 4 |
23 @__tls_template_start = internal constant [0 x i8] zeroinitializer, align 8 | 27 @__tls_template_start = internal constant [0 x i8] zeroinitializer, align 8 |
24 @__tls_template_alignment = internal constant [4 x i8] c"\01\00\00\00", align 4 | 28 @__tls_template_alignment = internal constant [4 x i8] c"\01\00\00\00", align 4 |
25 | 29 |
26 define internal float @FpLookup1(i32 %Arg) { | 30 define internal float @FpLookup1(i32 %Arg) { |
27 entry: | 31 entry: |
28 switch i32 %Arg, label %return [ | 32 switch i32 %Arg, label %return [ |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 ; Check for float 0.5 | 552 ; Check for float 0.5 |
549 ; CHECK-LABEL: .rodata.cst4 | 553 ; CHECK-LABEL: .rodata.cst4 |
550 ; CHECK: 0000003f | 554 ; CHECK: 0000003f |
551 ; CHECK-NOT: 0000003f | 555 ; CHECK-NOT: 0000003f |
552 | 556 |
553 ; Check for double 0.5 | 557 ; Check for double 0.5 |
554 ; CHECK-LABEL: .rodata.cst8 | 558 ; CHECK-LABEL: .rodata.cst8 |
555 ; CHECK: 00000000 0000e03f | 559 ; CHECK: 00000000 0000e03f |
556 ; CHECK-NOT: 00000000 0000e03f | 560 ; CHECK-NOT: 00000000 0000e03f |
557 ; CHECK-LABEL: .text | 561 ; CHECK-LABEL: .text |
OLD | NEW |