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/SimplifyCFG/switch_create.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/SimplifyCFG/switch_create.ll')
-rw-r--r-- | test/Transforms/SimplifyCFG/switch_create.ll | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/test/Transforms/SimplifyCFG/switch_create.ll b/test/Transforms/SimplifyCFG/switch_create.ll new file mode 100644 index 0000000..2d72291 --- /dev/null +++ b/test/Transforms/SimplifyCFG/switch_create.ll @@ -0,0 +1,48 @@ +; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep br + +declare void %foo1() +declare void %foo2() + +void %test1(uint %V) { + %C1 = seteq uint %V, 4 + %C2 = seteq uint %V, 17 + %CN = or bool %C1, %C2 + br bool %CN, label %T, label %F +T: + call void %foo1() + ret void +F: + call void %foo2() + ret void +} + + +void %test2(int %V) { + %C1 = setne int %V, 4 + %C2 = setne int %V, 17 + %CN = and bool %C1, %C2 + br bool %CN, label %T, label %F +T: + call void %foo1() + ret void +F: + call void %foo2() + ret void +} + + +void %test3(int %V) { + %C1 = seteq int %V, 4 + br bool %C1, label %T, label %N +N: + %C2 = seteq int %V, 17 + br bool %C2, label %T, label %F +T: + call void %foo1() + ret void +F: + call void %foo2() + ret void +} + + |