diff options
author | Chris Lattner <sabre@nondot.org> | 2009-12-31 08:33:49 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-12-31 08:33:49 +0000 |
commit | 4b67f55f7df3cf4197387222d6558b0ad02096ff (patch) | |
tree | 2bf5824e42c2e3aa1d091246d10dd77ff7400570 /test | |
parent | 22faaeb4af208b503015158e744b7631b1611325 (diff) | |
download | external_llvm-4b67f55f7df3cf4197387222d6558b0ad02096ff.zip external_llvm-4b67f55f7df3cf4197387222d6558b0ad02096ff.tar.gz external_llvm-4b67f55f7df3cf4197387222d6558b0ad02096ff.tar.bz2 |
simple fix for an incorrect factoring which causes a
miscompilation, PR5458.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92354 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/Reassociate/basictest.ll | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Transforms/Reassociate/basictest.ll b/test/Transforms/Reassociate/basictest.ll index c7d54af..d966254 100644 --- a/test/Transforms/Reassociate/basictest.ll +++ b/test/Transforms/Reassociate/basictest.ll @@ -133,3 +133,14 @@ define i32 @test8(i32 %X, i32 %Y, i32 %Z) { ; CHECK-NEXT: %C = sub i32 %Z, %A ; CHECK-NEXT: ret i32 %C } + + +; PR5458 +define i32 @test9(i32 %X) { + %Y = mul i32 %X, 47 + %Z = add i32 %Y, %Y + ret i32 %Z +; CHECK: @test9 +; CHECK-NEXT: %Z = mul i32 %X, 94 +; CHECK-NEXT: ret i32 %Z +} |