aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-01-19 18:56:00 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-01-19 18:56:00 +0000
commit5c6fc1cab774244fba2746b84f2b86d71b897733 (patch)
tree215890b99cd0bc0c52f195876e8da5fd70629efb /test
parent30aa8b13c93211f68bb4efddd1e47817a1d107f1 (diff)
Similarly, analyze truncate through multiply.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123842 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Analysis/ScalarEvolution/fold.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Analysis/ScalarEvolution/fold.ll b/test/Analysis/ScalarEvolution/fold.ll
index f46c691f46..3c1b6ae0fe 100644
--- a/test/Analysis/ScalarEvolution/fold.ll
+++ b/test/Analysis/ScalarEvolution/fold.ll
@@ -14,3 +14,11 @@ define i8 @test2(i8 %x) {
; CHECK: (1 + %x)
ret i8 %C
}
+
+define i8 @test3(i8 %x) {
+ %A = zext i8 %x to i16
+ %B = mul i16 %A, 1027
+ %C = trunc i16 %B to i8
+; CHECK: (3 * %x)
+ ret i8 %C
+}