MIPS: Range check __builtin_mips_wrdsp / __builtin_mips_rddsp arguments against the upper/lower values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159911 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/builtins-mips-args.c b/test/CodeGen/builtins-mips-args.c
index 7dc7377..4bc6f24 100644
--- a/test/CodeGen/builtins-mips-args.c
+++ b/test/CodeGen/builtins-mips-args.c
@@ -6,4 +6,8 @@
   int a = 3;
   __builtin_mips_wrdsp(2052, a);  // expected-error{{argument to '__builtin_mips_wrdsp' must be a constant integer}}
   __builtin_mips_rddsp(a);        // expected-error{{argument to '__builtin_mips_rddsp' must be a constant integer}}
+  __builtin_mips_wrdsp(2052, -1); // expected-error{{argument should be a value from 0 to 63}}
+  __builtin_mips_rddsp(-1);       // expected-error{{argument should be a value from 0 to 63}}
+  __builtin_mips_wrdsp(2052, 64); // expected-error{{argument should be a value from 0 to 63}}
+  __builtin_mips_rddsp(64);       // expected-error{{argument should be a value from 0 to 63}}
 }