diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2009-06-21 01:56:41 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2009-06-21 01:56:41 +0000 |
commit | 5a4c808cb653999a345422758417fdd90a81c94a (patch) | |
tree | d98d824b8a00c4d6c0a454f1e862f3d808822c1a /test | |
parent | 4f010583eebaa34dc290cf56effde4633ae3d8e3 (diff) | |
download | external_llvm-5a4c808cb653999a345422758417fdd90a81c94a.zip external_llvm-5a4c808cb653999a345422758417fdd90a81c94a.tar.gz external_llvm-5a4c808cb653999a345422758417fdd90a81c94a.tar.bz2 |
Expand this test to handle more cases (remainder and shifts) of zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73839 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/ConstProp/2009-06-20-constexpr-zero-lhs.ll | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Transforms/ConstProp/2009-06-20-constexpr-zero-lhs.ll b/test/Transforms/ConstProp/2009-06-20-constexpr-zero-lhs.ll new file mode 100644 index 0000000..3322605 --- /dev/null +++ b/test/Transforms/ConstProp/2009-06-20-constexpr-zero-lhs.ll @@ -0,0 +1,11 @@ +; RUN: llvm-as < %s | llvm-dis | not grep ptrtoint +; PR4424 +@G = external global i32 +@test1 = constant i32 sdiv (i32 0, i32 ptrtoint (i32* @G to i32)) +@test2 = constant i32 udiv (i32 0, i32 ptrtoint (i32* @G to i32)) +@test3 = constant i32 srem (i32 0, i32 ptrtoint (i32* @G to i32)) +@test4 = constant i32 urem (i32 0, i32 ptrtoint (i32* @G to i32)) +@test5 = constant i32 lshr (i32 0, i32 ptrtoint (i32* @G to i32)) +@test6 = constant i32 ashr (i32 0, i32 ptrtoint (i32* @G to i32)) +@test7 = constant i32 shl (i32 0, i32 ptrtoint (i32* @G to i32)) + |