aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/PowerPC/select_lt0.ll
diff options
context:
space:
mode:
authorDan Gohman <djg@cray.com>2007-07-18 16:29:46 +0000
committerDan Gohman <djg@cray.com>2007-07-18 16:29:46 +0000
commitf17a25c88b892d30c2b41ba7ecdfbdfb2b4be9cc (patch)
treeebb79ea1ee5e3bc1fdf38541a811a8b804f0679a /test/CodeGen/PowerPC/select_lt0.ll
downloadexternal_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/CodeGen/PowerPC/select_lt0.ll')
-rw-r--r--test/CodeGen/PowerPC/select_lt0.ll51
1 files changed, 51 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/select_lt0.ll b/test/CodeGen/PowerPC/select_lt0.ll
new file mode 100644
index 0000000..bb5213f
--- /dev/null
+++ b/test/CodeGen/PowerPC/select_lt0.ll
@@ -0,0 +1,51 @@
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep cmp
+
+int %seli32_1(int %a) {
+entry:
+ %tmp.1 = setlt int %a, 0
+ %retval = select bool %tmp.1, int 5, int 0
+ ret int %retval
+}
+
+int %seli32_2(int %a, int %b) {
+entry:
+ %tmp.1 = setlt int %a, 0
+ %retval = select bool %tmp.1, int %b, int 0
+ ret int %retval
+}
+
+int %seli32_3(int %a, short %b) {
+entry:
+ %tmp.2 = cast short %b to int
+ %tmp.1 = setlt int %a, 0
+ %retval = select bool %tmp.1, int %tmp.2, int 0
+ ret int %retval
+}
+
+int %seli32_4(int %a, ushort %b) {
+entry:
+ %tmp.2 = cast ushort %b to int
+ %tmp.1 = setlt int %a, 0
+ %retval = select bool %tmp.1, int %tmp.2, int 0
+ ret int %retval
+}
+
+short %seli16_1(short %a) {
+entry:
+ %tmp.1 = setlt short %a, 0
+ %retval = select bool %tmp.1, short 7, short 0
+ ret short %retval
+}
+
+short %seli16_2(int %a, short %b) {
+ %tmp.1 = setlt int %a, 0
+ %retval = select bool %tmp.1, short %b, short 0
+ ret short %retval
+}
+
+int %seli32_a_a(int %a) {
+ %tmp = setlt int %a, 1
+ %min = select bool %tmp, int %a, int 0
+ ret int %min
+}
+