diff options
author | Chris Lattner <sabre@nondot.org> | 2003-03-10 23:22:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-03-10 23:22:50 +0000 |
commit | 533741a76416f2201252d0210babc64b2a7c904a (patch) | |
tree | 7887457c163b005d808d31eb31b826dce489b80c /test/Transforms | |
parent | a27231acc08e20ba5e84f23eff9ae3ff7f13b99d (diff) | |
download | external_llvm-533741a76416f2201252d0210babc64b2a7c904a.zip external_llvm-533741a76416f2201252d0210babc64b2a7c904a.tar.gz external_llvm-533741a76416f2201252d0210babc64b2a7c904a.tar.bz2 |
Add testcases for negated multiplies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5739 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r-- | test/Transforms/InstCombine/sub.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/sub.ll b/test/Transforms/InstCombine/sub.ll index 0dd2b7d..184886c 100644 --- a/test/Transforms/InstCombine/sub.ll +++ b/test/Transforms/InstCombine/sub.ll @@ -59,3 +59,16 @@ int %test9(int %A) { ret int %C } +int %test10(int %A, int %B) { ; -A*-B == A*B + %C = sub int 0, %A + %D = sub int 0, %B + %E = mul int %C, %D + ret int %E +} + +int %test10(int %A) { ; -A *c1 == A * -c1 + %C = sub int 0, %A + %E = mul int %C, 7 + ret int %E +} + |