summaryrefslogtreecommitdiffstats
path: root/llvm/test/Analysis/ScalarEvolution/strip-injective-zext.ll
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2018-06-14 17:13:35 +0000
committerJustin Lebar <jlebar@google.com>2018-06-14 17:13:35 +0000
commitb326904dba986560d5d27da8bd67b963a14079b3 (patch)
tree9cafa8bf4f971a89683f84890bc1882be66679cb /llvm/test/Analysis/ScalarEvolution/strip-injective-zext.ll
parent62a0747926cc4087bbfd9bf48ca0a9a19d1cdb7b (diff)
downloadbcm5719-llvm-b326904dba986560d5d27da8bd67b963a14079b3.tar.gz
bcm5719-llvm-b326904dba986560d5d27da8bd67b963a14079b3.zip
[SCEV] Simplify trunc-of-add/mul to add/mul-of-trunc under more circumstances.
Summary: Previously we would do this simplification only if it did not introduce any new truncs (excepting new truncs which replace other cast ops). This change weakens this condition: If the number of truncs stays the same, but we're able to transform trunc(X + Y) to X + trunc(Y), that's still simpler, and it may open up additional transformations. While we're here, also clean up some duplicated code. Reviewers: sanjoy Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D48160 llvm-svn: 334736
Diffstat (limited to 'llvm/test/Analysis/ScalarEvolution/strip-injective-zext.ll')
-rw-r--r--llvm/test/Analysis/ScalarEvolution/strip-injective-zext.ll2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/test/Analysis/ScalarEvolution/strip-injective-zext.ll b/llvm/test/Analysis/ScalarEvolution/strip-injective-zext.ll
index 661b48f6fe5..b618b71a358 100644
--- a/llvm/test/Analysis/ScalarEvolution/strip-injective-zext.ll
+++ b/llvm/test/Analysis/ScalarEvolution/strip-injective-zext.ll
@@ -9,7 +9,7 @@
; Check that the backedge taken count was actually computed:
; CHECK: Determining loop execution counts for: @f0
-; CHECK-NEXT: Loop %b2: backedge-taken count is (-1 * (trunc i32 (1 + %a1) to i2))
+; CHECK-NEXT: Loop %b2: backedge-taken count is (-1 + (-1 * (trunc i32 %a1 to i2)))
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64"
OpenPOWER on IntegriCloud