diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-10-29 08:39:34 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-10-29 08:39:34 +0000 |
commit | 54898938673d2a13ce31626ec34b2d4d314b2c81 (patch) | |
tree | cb6784071bfc3b10704032af0929077a5b7eb882 /test/CodeGen/X86 | |
parent | 23b10f5b64e594aa7c6b415805b563fed2a75874 (diff) | |
download | external_llvm-54898938673d2a13ce31626ec34b2d4d314b2c81.zip external_llvm-54898938673d2a13ce31626ec34b2d4d314b2c81.tar.gz external_llvm-54898938673d2a13ce31626ec34b2d4d314b2c81.tar.bz2 |
- More pre-split fixes: spill slot live interval computation bug; restore point bug.
- If a def is spilt, remember its spill index to allow its reuse.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58375 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86')
-rw-r--r-- | test/CodeGen/X86/pre-split10.ll | 51 | ||||
-rw-r--r-- | test/CodeGen/X86/pre-split3.ll | 2 |
2 files changed, 52 insertions, 1 deletions
diff --git a/test/CodeGen/X86/pre-split10.ll b/test/CodeGen/X86/pre-split10.ll new file mode 100644 index 0000000..c3e18c4 --- /dev/null +++ b/test/CodeGen/X86/pre-split10.ll @@ -0,0 +1,51 @@ +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -pre-alloc-split + +define i32 @main(i32 %argc, i8** %argv) nounwind { +entry: + br label %bb14.i + +bb14.i: ; preds = %bb14.i, %entry + %i8.0.reg2mem.0.i = phi i32 [ 0, %entry ], [ %0, %bb14.i ] ; <i32> [#uses=1] + %0 = add i32 %i8.0.reg2mem.0.i, 1 ; <i32> [#uses=2] + %1 = add double 0.000000e+00, 0.000000e+00 ; <double> [#uses=1] + %2 = add double 0.000000e+00, 0.000000e+00 ; <double> [#uses=1] + %3 = add double 0.000000e+00, 0.000000e+00 ; <double> [#uses=1] + %exitcond75.i = icmp eq i32 %0, 32 ; <i1> [#uses=1] + br i1 %exitcond75.i, label %bb24.i, label %bb14.i + +bb24.i: ; preds = %bb14.i + %4 = fdiv double 0.000000e+00, 0.000000e+00 ; <double> [#uses=1] + %5 = fdiv double %1, 0.000000e+00 ; <double> [#uses=1] + %6 = fdiv double %2, 0.000000e+00 ; <double> [#uses=1] + %7 = fdiv double %3, 0.000000e+00 ; <double> [#uses=1] + br label %bb31.i + +bb31.i: ; preds = %bb31.i, %bb24.i + %tmp.0.reg2mem.0.i = phi i32 [ 0, %bb24.i ], [ %indvar.next64.i, %bb31.i ] ; <i32> [#uses=1] + %indvar.next64.i = add i32 %tmp.0.reg2mem.0.i, 1 ; <i32> [#uses=2] + %exitcond65.i = icmp eq i32 %indvar.next64.i, 64 ; <i1> [#uses=1] + br i1 %exitcond65.i, label %bb33.i, label %bb31.i + +bb33.i: ; preds = %bb31.i + br label %bb35.preheader.i + +bb5.i.i: ; preds = %bb35.preheader.i + %8 = call double @floor(double 0.000000e+00) nounwind readnone ; <double> [#uses=0] + br label %bb7.i.i + +bb7.i.i: ; preds = %bb35.preheader.i, %bb5.i.i + br label %bb35.preheader.i + +bb35.preheader.i: ; preds = %bb7.i.i, %bb33.i + %9 = sub double 0.000000e+00, %4 ; <double> [#uses=1] + store double %9, double* null, align 8 + %10 = sub double 0.000000e+00, %5 ; <double> [#uses=1] + store double %10, double* null, align 8 + %11 = sub double 0.000000e+00, %6 ; <double> [#uses=1] + store double %11, double* null, align 8 + %12 = sub double 0.000000e+00, %7 ; <double> [#uses=1] + store double %12, double* null, align 8 + br i1 false, label %bb7.i.i, label %bb5.i.i +} + +declare double @floor(double) nounwind readnone diff --git a/test/CodeGen/X86/pre-split3.ll b/test/CodeGen/X86/pre-split3.ll index e762784..f34f144 100644 --- a/test/CodeGen/X86/pre-split3.ll +++ b/test/CodeGen/X86/pre-split3.ll @@ -1,5 +1,5 @@ ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -pre-alloc-split -stats |& \ -; RUN: grep {pre-alloc-split} | grep {Number of intervals split} | grep 2 +; RUN: grep {pre-alloc-split} | grep {Number of intervals split} | grep 1 define i32 @t(i32 %arg) { entry: |