summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2012-07-11 19:57:29 +0000
committerTom Stellard <thomas.stellard@amd.com>2012-07-11 19:57:29 +0000
commit96e7ab0a0ca664a2ff441fe1a2cd9fd74bab353c (patch)
tree08846de1d6d09b5fc3be9fe6dff6f3e3bf8f2cb5
parentee925820eb32fd5c5e21030dbafb84cb80c71d65 (diff)
run_tests: Add bit rotate tests
-rw-r--r--run_tests.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/run_tests.sh b/run_tests.sh
index 5819680..897ee67 100644
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -222,4 +222,17 @@ run_test "./loop loop_gt 10"
clear_memory 100
run_test "./loop loop_ge 10"
+###############################################################################
+#bit rotate left tests (not using the OpenCL C rotate builtin)
+###############################################################################
+
+#rotl(0x1, 1) = 0x2
+run_test "./math-int rotl 1 1 2"
+#rotl(0x1, 32) = 0x1
+run_test "./math-int rotl 1 32 1"
+#rotl(0xffffffff, 5) = 0xffffffff
+run_test "./math-int rotl -1 5 -1"
+#rotl(0x00001000, 23) = 0x8
+run_test "./math-int rotl 4096 23 8"
+
echo "$PASS passes, $FAIL fails"