[AArch64] Fix SVE testsuite failures for ILP32 (PR 83846)
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / csneg-1.c
blob4860d64c93535d9f0488b93b389e3980c7de9223
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
4 int
5 test_csneg32_condasn1(int w0,
6 int w1,
7 int w2,
8 int w3) {
9 int w4;
11 /* { dg-final { scan-assembler "csneg\tw\[0-9\]*.*ne" } } */
12 w4 = (w0 == w1) ? -w3 : w2;
13 return w4;
16 int
17 test_csneg32_condasn2(int w0,
18 int w1,
19 int w2,
20 int w3) {
21 int w4;
23 /* { dg-final { scan-assembler "csneg\tw\[0-9\]*.*eq" } } */
24 w4 = (w0 == w1) ? w3 : -w2;
25 return w4;
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;
35 /* { dg-final { scan-assembler "csneg\tx\[0-9\]*.*ne" } } */
36 x4 = (x0 == x1) ? -x3 : x2;
37 return x4;
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;
47 /* { dg-final { scan-assembler "csneg\tx\[0-9\]*.*eq" } } */
48 x4 = (x0 == x1) ? x3 : -x2;
49 return x4;
52 int test_csneg_cmp(int x)
54 /* { dg-final { scan-assembler "csneg\tw\[0-9\]" } } */
55 if (x > 3)
56 x = -x;
57 return x;
60 unsigned long long
61 test_csneg_uxtw (unsigned int a,
62 unsigned int b,
63 unsigned int c)
65 /* { dg-final { scan-assembler "csneg\tw\[0-9\]*.*ne" } } */
66 /* { dg-final { scan-assembler-not "uxtw\tw\[0-9\]*.*" } } */
67 unsigned int val;
68 val = a ? b: -c;
69 return val;