| Index: tests_lit/llvm2ice_tests/reorder-pooled-constants.ll
|
| diff --git a/tests_lit/llvm2ice_tests/fpconst.pnacl.ll b/tests_lit/llvm2ice_tests/reorder-pooled-constants.ll
|
| similarity index 93%
|
| copy from tests_lit/llvm2ice_tests/fpconst.pnacl.ll
|
| copy to tests_lit/llvm2ice_tests/reorder-pooled-constants.ll
|
| index 80c6f9fbadc767a1fd7498b9a62d99641d203928..c754afdaa105a4bb0619582d3cb094cedc302335 100644
|
| --- a/tests_lit/llvm2ice_tests/fpconst.pnacl.ll
|
| +++ b/tests_lit/llvm2ice_tests/reorder-pooled-constants.ll
|
| @@ -1,22 +1,13 @@
|
| -; This is a smoke test for floating-point constant pooling. It tests
|
| -; pooling of various float and double constants (including positive
|
| -; and negative NaN) within functions and across functions. Note that
|
| -; in LLVM bitcode, hex constants are used for an FP constant whenever
|
| -; the constant "cannot be represented as a decimal floating point
|
| -; number in a reasonable number of digits". See
|
| -; http://llvm.org/docs/LangRef.html#simple-constants .
|
| +; This is a smoke test for reordering pooled constants.
|
| +; This option is only implemented for target X8632 for now.
|
|
|
| ; RUN: %p2i --assemble --disassemble --filetype=obj --dis-flags=-s \
|
| -; RUN: -i %s --args -O2 --verbose none | FileCheck %s
|
| -; RUN: %p2i --assemble --disassemble --filetype=obj --dis-flags=-s \
|
| -; RUN: -i %s --args -Om1 --verbose none | FileCheck %s
|
| +; RUN: --target x8632 -i %s --args -sz-seed=1 -O2 -reorder-pooled-constants \
|
| +; RUN: | FileCheck %s --check-prefix=X86O2
|
|
|
| -; RUN: %if --need allow_dump --command %p2i --assemble --disassemble \
|
| -; RUN: --dis-flags=-s -i %s --args -O2 --verbose none \
|
| -; RUN: | %if --need allow_dump --command FileCheck %s
|
| -; RUN: %if --need allow_dump --command %p2i --assemble --disassemble \
|
| -; RUN: --dis-flags=-s -i %s --args -Om1 --verbose none \
|
| -; RUN: | %if --need allow_dump --command FileCheck %s
|
| +; RUN: %p2i --assemble --disassemble --filetype=obj --dis-flags=-s \
|
| +; RUN: --target x8632 -i %s --args -sz-seed=1 -Om1 -reorder-pooled-constants \
|
| +; RUN: | FileCheck %s --check-prefix=X86OM1
|
|
|
| @__init_array_start = internal constant [0 x i8] zeroinitializer, align 4
|
| @__fini_array_start = internal constant [0 x i8] zeroinitializer, align 4
|
| @@ -541,17 +532,32 @@ return: ; preds = %entry, %sw.bb65, %s
|
| ret double %retval.0
|
| }
|
|
|
| -; The FP constant pool entries for each type are dumped in some
|
| -; implementation-dependent order. So for the purposes of lit, we just
|
| -; pick one value for each type, and make sure it appears exactly once.
|
| +; Make sure the constants in pools are shuffled.
|
| +
|
| +; Check for float pool
|
| +; X86O2-LABEL: .rodata.cst4
|
| +; X86O2: 00000040 0000c0ff 00000041 00000000
|
| +; X86O2: 0000003f 0000803f 00008040 0000c07f
|
| +; X86O2: 0000803e
|
| +
|
| +; Check for double pool
|
| +; X86O2-LABEL: .rodata.cst8
|
| +; X86O2: 55555555 5555d53f 00000000 0000f8ff
|
| +; X86O2: 00000000 0000f87f 00000000 0000e03f
|
| +; X86O2: 00000000 0000d03f 00000000 00000000
|
| +
|
| +; X86O2-LABEL: .text
|
| +
|
| +; Check for float pool
|
| +; X86OM1-LABEL: .rodata.cst4
|
| +; X86OM1: 0000803f 0000003f 00000040 0000c0ff
|
| +; X86OM1: 00000000 00008040 0000c07f 0000803e
|
| +; X86OM1: 00000041
|
|
|
| -; Check for float 0.5
|
| -; CHECK-LABEL: .rodata.cst4
|
| -; CHECK: 0000003f
|
| -; CHECK-NOT: 0000003f
|
| +; Check for double pool
|
| +; X86OM1-LABEL: .rodata.cst8
|
| +; X86OM1: 00000000 0000e03f 00000000 0000f87f
|
| +; X86OM1: 00000000 0000f8ff 00000000 0000d03f
|
| +; X86OM1: 00000000 00000000 55555555 5555d53f
|
|
|
| -; Check for double 0.5
|
| -; CHECK-LABEL: .rodata.cst8
|
| -; CHECK: 00000000 0000e03f
|
| -; CHECK-NOT: 00000000 0000e03f
|
| -; CHECK-LABEL: .text
|
| +; X86OM1-LABEL: .text
|
|
|