aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/alpha/max-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/alpha/max-1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/alpha/max-1.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/alpha/max-1.c b/gcc-4.9/gcc/testsuite/gcc.target/alpha/max-1.c
new file mode 100644
index 000000000..3f86160f2
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/alpha/max-1.c
@@ -0,0 +1,27 @@
+/* Test that the MAX isa builtins compile. */
+/* { dg-do link } */
+/* { dg-options "-mcpu=pca56" } */
+
+void test_MAX (long x, long y)
+{
+ volatile long sink;
+
+ sink = __builtin_alpha_pklb (x);
+ sink = __builtin_alpha_pkwb (x);
+ sink = __builtin_alpha_unpkbl (x);
+ sink = __builtin_alpha_unpkbw (x);
+
+ sink = __builtin_alpha_minub8 (0, x);
+ sink = __builtin_alpha_minub8 (1, x);
+ sink = __builtin_alpha_minub8 (x, y);
+ sink = __builtin_alpha_minsb8 (x, y);
+ sink = __builtin_alpha_minuw4 (x, y);
+ sink = __builtin_alpha_minsw4 (x, y);
+ sink = __builtin_alpha_maxub8 (x, y);
+ sink = __builtin_alpha_maxsb8 (x, y);
+ sink = __builtin_alpha_maxuw4 (x, y);
+ sink = __builtin_alpha_maxsw4 (x, y);
+ sink = __builtin_alpha_perr (x, y);
+}
+
+int main() { return 0; }