aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/Alpha
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2005-07-22 21:53:35 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2005-07-22 21:53:35 +0000
commit4b429fcf25b96a4c191420ca715057c0d9686ef3 (patch)
tree38609f21be8fd890ca8ddcab3fcbeae692cffa85 /test/CodeGen/Alpha
parent38396f8a93da22579c635ece948ce5d35014d738 (diff)
downloadexternal_llvm-4b429fcf25b96a4c191420ca715057c0d9686ef3.zip
external_llvm-4b429fcf25b96a4c191420ca715057c0d9686ef3.tar.gz
external_llvm-4b429fcf25b96a4c191420ca715057c0d9686ef3.tar.bz2
make sure we always handle small negatives well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22503 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Alpha')
-rw-r--r--test/CodeGen/Alpha/i32_sub_1.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/Alpha/i32_sub_1.ll b/test/CodeGen/Alpha/i32_sub_1.ll
new file mode 100644
index 0000000..ea6ab92
--- /dev/null
+++ b/test/CodeGen/Alpha/i32_sub_1.ll
@@ -0,0 +1,10 @@
+; Make sure this testcase codegens to the ctpop instruction
+; RUN: llvm-as < %s | llc -march=alpha | grep -i 'subl $16,1,$0'
+
+implementation ; Functions:
+
+int %foo(int %x) {
+entry:
+ %tmp.1 = add int %x, -1 ; <int> [#uses=1]
+ ret int %tmp.1
+}