summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/mips/truncate-4.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/mips/truncate-4.c')
-rw-r--r--gcc/testsuite/gcc.target/mips/truncate-4.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/mips/truncate-4.c b/gcc/testsuite/gcc.target/mips/truncate-4.c
new file mode 100644
index 000000000..4c783681a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/truncate-4.c
@@ -0,0 +1,10 @@
+/* The and is performed in DI mode so there is no need for truncation. */
+/* { dg-options "-O -mgp64" } */
+/* { dg-final { scan-assembler-not "\tsll\t" } } */
+
+NOMIPS16 unsigned long long
+f (unsigned long long s)
+{
+ unsigned u = s & 0xfff;
+ return u;
+}