summaryrefslogtreecommitdiffstats
path: root/lib/Analysis/README.txt
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-04-23 01:55:05 +0000
committerDan Gohman <gohman@apple.com>2010-04-23 01:55:05 +0000
commitfafb890ee204d60456d0780ff55a149fa082eaea (patch)
tree3be1fcd844734fe3036a9393c946ceb1c76f4bce /lib/Analysis/README.txt
parentc6863989fc268ee0ff1469e4856e2e9404e67336 (diff)
downloadexternal_llvm-fafb890ee204d60456d0780ff55a149fa082eaea.zip
external_llvm-fafb890ee204d60456d0780ff55a149fa082eaea.tar.gz
external_llvm-fafb890ee204d60456d0780ff55a149fa082eaea.tar.bz2
Fix LSR to tolerate cases where ScalarEvolution initially
misses an opportunity to fold add operands, but folds them after LSR has separated them out. This fixes rdar://7886751. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102157 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/README.txt')
-rw-r--r--lib/Analysis/README.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Analysis/README.txt b/lib/Analysis/README.txt
index c401090..88ea9f1 100644
--- a/lib/Analysis/README.txt
+++ b/lib/Analysis/README.txt
@@ -16,3 +16,15 @@ In addition to being much more complicated, it involves i65 arithmetic,
which is very inefficient when expanded into code.
//===---------------------------------------------------------------------===//
+
+In test/CodeGen/X86/lsr-delayed-fold.ll,
+
+ScalarEvolution is forming this expression:
+
+((trunc i64 (-1 * %arg5) to i32) + (trunc i64 %arg5 to i32) + (-1 * (trunc i64 undef to i32)))
+
+This could be folded to
+
+(-1 * (trunc i64 undef to i32))
+
+//===---------------------------------------------------------------------===//