1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
|
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-dse2 -Wno-psabi" } */
typedef int v4si __attribute__((vector_size(4 * sizeof(int))));
/* Generic */
__attribute__((noipa)) int
t1 (int a, int b, int c)
{
return ((a ^ c) & b) | a;
}
__attribute__((noipa)) unsigned int
t2 (int a, unsigned int b, int c)
{
return ((a ^ c) & b) | a;
}
__attribute__((noipa)) unsigned long
t3 (unsigned long a, long b, unsigned long c)
{
return ((a ^ c) & b) | a;
}
__attribute__((noipa)) unsigned short
t4 (short a, unsigned short b, unsigned short c)
{
return (unsigned short) ((a ^ c) & b) | a;
}
__attribute__((noipa)) unsigned char
t5 (unsigned char a, signed char b, signed char c)
{
return ((a ^ c) & b) | a;
}
__attribute__((noipa)) long long
t6 (long long a, long long b, long long c)
{
return ((a ^ c) & (unsigned long long) b) | a;
}
/* Gimple */
__attribute__((noipa)) int
t7 (int a, int b, int c)
{
int t1 = a ^ c;
int t2 = t1 & b;
int t3 = t2 | a;
return t3;
}
__attribute__((noipa)) int
t8 (int a, unsigned int b, unsigned int c)
{
unsigned int t1 = a ^ c;
int t2 = t1 & b;
int t3 = t2 | a;
return t3;
}
__attribute__((noipa)) unsigned int
t9 (unsigned int a, unsigned int b, int c)
{
unsigned int t1 = a ^ c;
unsigned int t2 = t1 & b;
unsigned int t3 = t2 | a;
return t3;
}
__attribute__((noipa)) unsigned long
t10 (unsigned long a, long b, unsigned long c)
{
unsigned long t1 = a ^ c;
unsigned long t2 = t1 & b;
unsigned long t3 = t2 | a;
return t3;
}
__attribute__((noipa)) unsigned short
t11 (short a, unsigned short b, short c)
{
short t1 = a ^ c;
unsigned short t2 = t1 & b;
unsigned short t3 = t2 | a;
return t3;
}
__attribute__((noipa)) unsigned char
t12 (signed char a, unsigned char b, signed char c)
{
unsigned char t1 = a ^ c;
unsigned char t2 = t1 & b;
unsigned char t3 = t2 | a;
return t3;
}
__attribute__((noipa)) unsigned long long
t13 (unsigned long long a, long long b, unsigned long long c)
{
long long t1 = a ^ c;
long long t2 = t1 & b;
unsigned long long t3 = t2 | a;
return t3;
}
/* Vectors */
__attribute__((noipa)) v4si
t14 (v4si a, v4si b, v4si c)
{
return ((a ^ c) & b) | a;
}
__attribute__((noipa)) v4si
t15 (v4si a, v4si b, v4si c)
{
v4si t1 = a ^ c;
v4si t2 = t1 & b;
v4si t3 = t2 | a;
return t3;
}
/* { dg-final { scan-tree-dump-not " \\\^ " "dse2" } } */
/* { dg-final { scan-tree-dump-times " \\\| " 15 "dse2" } } */
/* { dg-final { scan-tree-dump-times " & " 15 "dse2" } } */
|