diff options
author | Chris Lattner <sabre@nondot.org> | 2006-10-22 21:40:12 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-10-22 21:40:12 +0000 |
commit | ecb8d0635638bbf1125c836152e2085e28bf13a8 (patch) | |
tree | 63bcb174398e8ac3df3d422fc147302b92c0e46e | |
parent | 92a8b71dc179d5ecad2208bf1ff02086cda47e6f (diff) |
this part implemented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31122 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/README.txt | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/lib/Target/X86/README.txt b/lib/Target/X86/README.txt index 84e1532284..956caff0c4 100644 --- a/lib/Target/X86/README.txt +++ b/lib/Target/X86/README.txt @@ -607,35 +607,6 @@ or eax, 2 cmp eax, 6 jz label -If we aren't going to do this, we should lower the switch better. We compile -the code to: - -_f: - movl 8(%esp), %eax - movl 4(%esp), %ecx - cmpl $6, %ecx - jl LBB1_4 #entry - jmp LBB1_3 #entry -LBB1_3: #entry - cmpl $6, %ecx - je LBB1_1 #bb - jmp LBB1_2 #UnifiedReturnBlock -LBB1_4: #entry - cmpl $4, %ecx - jne LBB1_2 #UnifiedReturnBlock -LBB1_1: #bb - incl %eax - ret -LBB1_2: #UnifiedReturnBlock - ret - -In the code above, the 'if' is turned into a 'switch' at the mid-level. It -looks like the 'lower to branches' mode could be improved a little here. In -particular, the fall-through to LBB1_3 doesn't need a branch. It would also be -nice to eliminate the redundant "cmp 6", maybe by lowering to a linear sequence -of compares if there are below a certain number of cases (instead of a binary -sequence)? - //===---------------------------------------------------------------------===// GCC's ix86_expand_int_movcc function (in i386.c) has a ton of interesting |