summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/arm/negdi-2.c
blob: 96bbcab337e54cdb072fc11f19cf412b56b463a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile } */
/* { dg-require-effective-target arm32 } */
/* { dg-options "-O2" } */

signed long long zero_extendsidi_negsi (unsigned int x)
{
  return -x;
}
/*
Expected output:
	rsb	r0, r0, #0
	mov	r1, #0
*/
/* { dg-final { scan-assembler-times "rsb\\tr0, r0, #0" 1 { target { arm_nothumb } } } } */
/* { dg-final { scan-assembler-times "negs\\tr0, r0" 1 { target { ! arm_nothumb } } } } */
/* { dg-final { scan-assembler-times "mov" 1 } } */