Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / gcc / testsuite / gcc.target / aarch64 / csneg-1.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
3
4 int
5 test_csneg32_condasn1(int w0,
6                       int w1,
7                       int w2,
8                       int w3) {
9   int w4;
10
11   /* { dg-final { scan-assembler "csneg\tw\[0-9\]*.*ne" } } */
12   w4 = (w0 == w1) ? -w3 : w2;
13   return w4;
14 }
15
16 int
17 test_csneg32_condasn2(int w0,
18                       int w1,
19                       int w2,
20                       int w3) {
21   int w4;
22
23   /* { dg-final { scan-assembler "csneg\tw\[0-9\]*.*eq" } } */
24   w4 = (w0 == w1) ? w3 : -w2;
25   return w4;
26 }
27
28 long long
29 test_csneg64_condasn1(long long x0,
30                       long long x1,
31                       long long x2,
32                       long long x3) {
33   long long x4;
34
35   /* { dg-final { scan-assembler "csneg\tx\[0-9\]*.*ne" } } */
36   x4 = (x0 == x1) ? -x3 : x2;
37   return x4;
38 }
39
40 long long
41 test_csneg64_condasn2(long long x0,
42                       long long x1,
43                       long long x2,
44                       long long x3) {
45   long long x4;
46
47   /* { dg-final { scan-assembler "csneg\tx\[0-9\]*.*eq" } } */
48   x4 = (x0 == x1) ? x3 : -x2;
49   return x4;
50 }