summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/440-maclhw-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/powerpc/440-maclhw-2.c')
-rw-r--r--gcc/testsuite/gcc.target/powerpc/440-maclhw-2.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/powerpc/440-maclhw-2.c b/gcc/testsuite/gcc.target/powerpc/440-maclhw-2.c
new file mode 100644
index 000000000..3e92d7ac8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/440-maclhw-2.c
@@ -0,0 +1,16 @@
+/* Test generation of maclhw. on 440. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-O2 -mcpu=440" } */
+
+/* { dg-final { scan-assembler "maclhw\\. " } } */
+
+int
+f(int a, int b, int c)
+{
+ a += (short)b * (short)c;
+ if (!a)
+ return 10;
+ return a;
+}