summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2006-12-12 00:37:38 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2006-12-12 00:37:38 +0000
commit450856d01b27518e88c738ab588765879cb8b1b6 (patch)
treee6e68c5d8321883b62697f98212bfd9ce2b708f2 /test
parent22b36fb7ebc28e53e42edda099939523e871bcf5 (diff)
downloadllvm-450856d01b27518e88c738ab588765879cb8b1b6.tar.gz
llvm-450856d01b27518e88c738ab588765879cb8b1b6.tar.bz2
llvm-450856d01b27518e88c738ab588765879cb8b1b6.tar.xz
add mvn
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32454 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/ARM/mvn.ll55
1 files changed, 55 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/mvn.ll b/test/CodeGen/ARM/mvn.ll
new file mode 100644
index 0000000000..fc788b80fd
--- /dev/null
+++ b/test/CodeGen/ARM/mvn.ll
@@ -0,0 +1,55 @@
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep mvn | wc -l | grep 4
+
+;int %f1() {
+;entry:
+; ret int -1
+;}
+
+int %f2(int %a) {
+entry:
+ %tmpnot = xor int %a, -1 ; <int> [#uses=1]
+ ret int %tmpnot
+}
+
+;int %f3(int %a) {
+;entry:
+; %tmp1 = shl int %a, ubyte 2 ; <int> [#uses=1]
+; %tmp1not = xor int %tmp1, -1 ; <int> [#uses=1]
+; ret int %tmp1not
+;}
+
+int %f4(int %a, ubyte %b) {
+entry:
+ %tmp3 = shl int %a, ubyte %b ; <int> [#uses=1]
+ %tmp3not = xor int %tmp3, -1 ; <int> [#uses=1]
+ ret int %tmp3not
+}
+
+;uint %f5(uint %a) {
+;entry:
+; %tmp1 = lshr uint %a, ubyte 2 ; <uint> [#uses=1]
+; %tmp1not = xor uint %tmp1, 4294967295 ; <uint> [#uses=1]
+; ret uint %tmp1not
+;}
+
+uint %f6(uint %a, ubyte %b) {
+entry:
+ %tmp2 = lshr uint %a, ubyte %b ; <uint> [#uses=1]
+ %tmp2not = xor uint %tmp2, 4294967295 ; <uint> [#uses=1]
+ ret uint %tmp2not
+}
+
+;int %f7(int %a) {
+;entry:
+; %tmp1 = ashr int %a, ubyte 2 ; <int> [#uses=1]
+; %tmp1not = xor int %tmp1, -1 ; <int> [#uses=1]
+; ret int %tmp1not
+;}
+
+int %f8(int %a, ubyte %b) {
+entry:
+ %tmp3 = ashr int %a, ubyte %b ; <int> [#uses=1]
+ %tmp3not = xor int %tmp3, -1 ; <int> [#uses=1]
+ ret int %tmp3not
+}