diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2014-01-27 10:47:44 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2014-01-27 10:47:44 +0000 |
commit | 4bfa6fecc1348f120e463138d4fb435b40d7b650 (patch) | |
tree | 20ff3b0ecd75e4b21c1610a577975b71d04b78be /test | |
parent | f2282cac95e7849a86437e347921bc4cc28d403f (diff) | |
download | llvm-4bfa6fecc1348f120e463138d4fb435b40d7b650.tar.gz llvm-4bfa6fecc1348f120e463138d4fb435b40d7b650.tar.bz2 llvm-4bfa6fecc1348f120e463138d4fb435b40d7b650.tar.xz |
Fix crasher introduced in r200203 and caught by a libc++ buildbot. Don't assume that getMulExpr returns a SCEVMulExpr, it may have simplified it to something else!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200210 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Analysis/ScalarEvolution/fold.ll | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Analysis/ScalarEvolution/fold.ll b/test/Analysis/ScalarEvolution/fold.ll index 84b657050c..ab5742557b 100644 --- a/test/Analysis/ScalarEvolution/fold.ll +++ b/test/Analysis/ScalarEvolution/fold.ll @@ -77,3 +77,12 @@ define void @test5(i32 %i) { ; CHECK: --> (-2147483648 * (%i /u -2147483648)) ret void } + +define void @test6(i8 %x) { +; CHECK-LABEL: @test6 + %A = zext i8 %x to i16 + %B = shl nuw i16 %A, 8 + %C = and i16 %B, -2048 +; CHECK: --> (2048 * ((zext i8 %x to i16) /u 8)) + ret void +} |