[llvm-commits] [llvm] r107569 - /llvm/trunk/lib/Target/README.txt
Eli Friedman
eli.friedman at gmail.com
Sat Jul 3 01:43:32 PDT 2010
Author: efriedma
Date: Sat Jul 3 03:43:32 2010
New Revision: 107569
URL: http://llvm.org/viewvc/llvm-project?rev=107569&view=rev
Log:
Minor amendment to switch-lowering improvement.
Modified:
llvm/trunk/lib/Target/README.txt
Modified: llvm/trunk/lib/Target/README.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/README.txt?rev=107569&r1=107568&r2=107569&view=diff
==============================================================================
--- llvm/trunk/lib/Target/README.txt (original)
+++ llvm/trunk/lib/Target/README.txt Sat Jul 3 03:43:32 2010
@@ -1918,9 +1918,17 @@
.LBB0_2:
ret
.LBB0_3:
- xorb %al, %al
- jmp foo at PLT # TAILCALL
+ jmp foo # TAILCALL
The movl+movl+btq+jb could be simplified to a cmpl+jne.
+Or, if we wanted to be really clever, we could simplify the whole thing to
+something like the following, which eliminates a branch:
+ xorl $1, %edi
+ cmpl $4, %edi
+ ja .LBB0_2
+ ret
+.LBB0_2:
+ jmp foo # TAILCALL
+
//===---------------------------------------------------------------------===//
More information about the llvm-commits
mailing list