[llvm-commits] [llvm] r66508 - /llvm/trunk/lib/Target/X86/README.txt

Dan Gohman gohman at apple.com
Mon Mar 9 16:47:02 PDT 2009


Author: djg
Date: Mon Mar  9 18:47:02 2009
New Revision: 66508

URL: http://llvm.org/viewvc/llvm-project?rev=66508&view=rev
Log:
Add a note about EFLAGS optimization.

Modified:
    llvm/trunk/lib/Target/X86/README.txt

Modified: llvm/trunk/lib/Target/X86/README.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/README.txt?rev=66508&r1=66507&r2=66508&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/README.txt (original)
+++ llvm/trunk/lib/Target/X86/README.txt Mon Mar  9 18:47:02 2009
@@ -1819,6 +1819,21 @@
 
 //===---------------------------------------------------------------------===//
 
+Test instructions can be eliminated by using EFLAGS values from arithmetic
+instructions. This is currently not done for and, or, xor, neg, shl, sra,
+srl, shld, shrd, atomic ops, and others. It is also currently not done for
+read-modify-write instructions.
+
+The shift operators have the complication that when the shift count is
+zero, EFLAGS is not set, so they can only subsume a test instruction if
+the shift count is known to be non-zero.
+
+In read-modify-write instructions, the root node in the isel match is
+the store, and isel has no way for the use of the EFLAGS result of the
+arithmetic to be remapped to the new node.
+
+//===---------------------------------------------------------------------===//
+
 test/CodeGen/X86/2009-03-07-FPConstSelect.ll compiles to:
 
 _f:





More information about the llvm-commits mailing list