summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/mips/octeon-exts-7.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/mips/octeon-exts-7.c')
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon-exts-7.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/mips/octeon-exts-7.c b/gcc/testsuite/gcc.target/mips/octeon-exts-7.c
new file mode 100644
index 000000000..04805d06d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/octeon-exts-7.c
@@ -0,0 +1,17 @@
+/* Remove the redundant sign-extension after the sign-extraction. */
+/* { dg-do compile } */
+/* { dg-options "-O -march=octeon -mgp64" } */
+/* { dg-final { scan-assembler-times "\texts\t" 1 } } */
+/* { dg-final { scan-assembler-not "sll|sra" } } */
+
+struct bar
+{
+ long long a:18;
+ long long b:14;
+};
+
+NOMIPS16 int
+f1 (struct bar *s)
+{
+ return s->b;
+}