diff options
author | Dan Gohman <djg@cray.com> | 2007-07-18 16:29:46 +0000 |
---|---|---|
committer | Dan Gohman <djg@cray.com> | 2007-07-18 16:29:46 +0000 |
commit | f17a25c88b892d30c2b41ba7ecdfbdfb2b4be9cc (patch) | |
tree | ebb79ea1ee5e3bc1fdf38541a811a8b804f0679a /test/Transforms/InstCombine/apint-div2.ll | |
download | external_llvm-f17a25c88b892d30c2b41ba7ecdfbdfb2b4be9cc.zip external_llvm-f17a25c88b892d30c2b41ba7ecdfbdfb2b4be9cc.tar.gz external_llvm-f17a25c88b892d30c2b41ba7ecdfbdfb2b4be9cc.tar.bz2 |
It's not necessary to do rounding for alloca operations when the requested
alignment is equal to the stack alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40004 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/apint-div2.ll')
-rw-r--r-- | test/Transforms/InstCombine/apint-div2.ll | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/apint-div2.ll b/test/Transforms/InstCombine/apint-div2.ll new file mode 100644 index 0000000..2aa2c3a --- /dev/null +++ b/test/Transforms/InstCombine/apint-div2.ll @@ -0,0 +1,22 @@ +; This test makes sure that div instructions are properly eliminated. +; This test is for Integer BitWidth >= 64 && BitWidth <= 1024. +; +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep div + + +define i333 @test1(i333 %X) { + %Y = udiv i333 %X, 70368744177664 + ret i333 %Y +} + +define i499 @test2(i499 %X) { + %tmp.0 = shl i499 4096, 197 + %Y = udiv i499 %X, %tmp.0 + ret i499 %Y +} + +define i599 @test3(i599 %X, i1 %C) { + %V = select i1 %C, i599 70368744177664, i599 4096 + %R = udiv i599 %X, %V + ret i599 %R +} |