summaryrefslogtreecommitdiffstats
path: root/lib/Target/X86/README.txt
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-03-09 23:47:02 +0000
committerDan Gohman <gohman@apple.com>2009-03-09 23:47:02 +0000
commitad93e1e5fc407f460278990626b7b5577f1262bd (patch)
tree444571bc38d4bde75cfdf0b53741b294f33696de /lib/Target/X86/README.txt
parent412a4469746d468c46b7e7e4f1c77407dab0a1ce (diff)
downloadexternal_llvm-ad93e1e5fc407f460278990626b7b5577f1262bd.zip
external_llvm-ad93e1e5fc407f460278990626b7b5577f1262bd.tar.gz
external_llvm-ad93e1e5fc407f460278990626b7b5577f1262bd.tar.bz2
Add a note about EFLAGS optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66508 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/README.txt')
-rw-r--r--lib/Target/X86/README.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/Target/X86/README.txt b/lib/Target/X86/README.txt
index 5f28579..7713316 100644
--- a/lib/Target/X86/README.txt
+++ b/lib/Target/X86/README.txt
@@ -1819,6 +1819,21 @@ LBB1_1: ## bb1
//===---------------------------------------------------------------------===//
+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: