summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/mips/dsp-no-lhx.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/mips/dsp-no-lhx.c')
-rw-r--r--gcc/testsuite/gcc.target/mips/dsp-no-lhx.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/mips/dsp-no-lhx.c b/gcc/testsuite/gcc.target/mips/dsp-no-lhx.c
new file mode 100644
index 000000000..a37c42f1a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/dsp-no-lhx.c
@@ -0,0 +1,10 @@
+/* Test MIPS32 DSP LHX instruction */
+/* { dg-do compile } */
+/* { dg-options "-mgp32 -mdsp -O2" } */
+
+/* { dg-final { scan-assembler-not "\tlhx\t" } } */
+
+NOMIPS16 unsigned short test (unsigned short *a, int index)
+{
+ return a[index];
+}