[llvm-commits] [llvm] r132995 - in /llvm/trunk: lib/CodeGen/BranchFolding.cpp lib/CodeGen/BranchFolding.h test/CodeGen/X86/tail-threshold.ll
Chris Lattner
clattner at apple.com
Tue Jun 14 09:21:46 PDT 2011
On Jun 14, 2011, at 8:31 AM, Rafael Espindola wrote:
> Author: rafael
> Date: Tue Jun 14 10:31:54 2011
> New Revision: 132995
>
> URL: http://llvm.org/viewvc/llvm-project?rev=132995&view=rev
> Log:
> Add 132986 back, but avoid non-determinism if a bb address gets reused.
Hi Rafael,
Please check the structure of the generated machine code, not the -stats output, thanks!
-Chris
> +++ llvm/trunk/test/CodeGen/X86/tail-threshold.ll Tue Jun 14 10:31:54 2011
> @@ -0,0 +1,41 @@
> +; RUN: llc -march=x86-64 %s -stats -tail-merge-threshold 2 -o /dev/null |& FileCheck %s
> +
> +; Test that we still do some merging if a block has more than
> +; tail-merge-threshold predecessors.
> +
> +; CHECK: 2 branchfolding - Number of block tails merged
> +
> +declare void @bar()
> +
> +define void @foo(i32 %xxx) {
> +entry:
> + switch i32 %xxx, label %bb4 [
> + i32 0, label %bb0
> + i32 1, label %bb1
> + i32 2, label %bb2
> + i32 3, label %bb3
> + ]
> +
> +bb0:
> + call void @bar()
> + br label %bb5
> +
> +bb1:
> + call void @bar()
> + br label %bb5
> +
> +bb2:
> + call void @bar()
> + br label %bb5
> +
> +bb3:
> + call void @bar()
> + br label %bb5
> +
> +bb4:
> + call void @bar()
> + br label %bb5
> +
> +bb5:
> + ret void
> +}
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list