add a simple optimization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26062 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/X86/README.txt b/lib/Target/X86/README.txt
index 8481fa6..6ff1817 100644
--- a/lib/Target/X86/README.txt
+++ b/lib/Target/X86/README.txt
@@ -411,3 +411,19 @@
*target &= ~(1 << bit);
}
+//===---------------------------------------------------------------------===//
+
+Easy: Global addresses are not always allowed as immediates. For this:
+
+int dst = 0; int *ptr = 0;
+void foo() { ptr = &dst; }
+
+we get this:
+
+_foo:
+ movl $_dst, %eax
+ movl %eax, _ptr
+ ret
+
+When: "movl $_dst, _ptr" is sufficient.
+