From f62ce370a48e1621af7934e668c215b8109cddb7 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Tue, 28 Oct 2008 00:47:49 +0000 Subject: Avoid putting a split past the end of the live range; always shrink wrap live interval in the barrier mbb. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58309 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/pre-split8.ll | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 test/CodeGen/X86/pre-split8.ll (limited to 'test/CodeGen/X86/pre-split8.ll') diff --git a/test/CodeGen/X86/pre-split8.ll b/test/CodeGen/X86/pre-split8.ll new file mode 100644 index 0000000..eb6d49f --- /dev/null +++ b/test/CodeGen/X86/pre-split8.ll @@ -0,0 +1,35 @@ +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -pre-alloc-split -stats |& \ +; RUN: grep {pre-alloc-split} | grep {Number of intervals split} | grep 1 + +@current_surfaces.b = external global i1 ; [#uses=1] + +declare double @asin(double) nounwind readonly + +declare double @tan(double) nounwind readonly + +define fastcc void @trace_line(i32 %line) nounwind { +entry: + %.b3 = load i1* @current_surfaces.b ; [#uses=1] + br i1 %.b3, label %bb, label %return + +bb: ; preds = %bb9.i, %entry + %.rle4 = phi double [ %7, %bb9.i ], [ 0.000000e+00, %entry ] ; [#uses=1] + %0 = load double* null, align 8 ; [#uses=3] + %1 = fcmp une double %0, 0.000000e+00 ; [#uses=1] + br i1 %1, label %bb9.i, label %bb13.i + +bb9.i: ; preds = %bb + %2 = sub double %.rle4, %0 ; [#uses=0] + %3 = tail call double @asin(double 0.000000e+00) nounwind readonly ; [#uses=0] + %4 = mul double 0.000000e+00, %0 ; [#uses=1] + %5 = tail call double @tan(double 0.000000e+00) nounwind readonly ; [#uses=0] + %6 = mul double %4, 0.000000e+00 ; [#uses=1] + %7 = add double %6, 0.000000e+00 ; [#uses=1] + br i1 false, label %return, label %bb + +bb13.i: ; preds = %bb + unreachable + +return: ; preds = %bb9.i, %entry + ret void +} -- cgit v1.1