return 0;
}
-/* { dg-final { scan-tree-dump-times "BIT_FIELD_REF" 8 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "BIT_FIELD_REF" 8 "optimized" { target { ! { avr-*-* pru-*-* } } } } } */
/* { dg-final { scan-assembler-not "cmpb" { target { i*86-*-* || x86_64-*-* } } } } */
/* { dg-final { scan-assembler-times "cmpl" 8 { target { i*86-*-* || x86_64-*-* } } } } */
/* { dg-final { scan-assembler-times "cmpw" 8 { target { powerpc*-*-* || rs6000-*-* } } } } */
/* { dg-do run } */
/* { dg-options "-O -fdump-tree-ifcombine-details" } */
-/* Check that we don't get confused by multiple conversions. */
+/* Check that we don't get confused by multiple conversions. Conceivably, we
+ could combine both tests using b, but the current logic won't do that. */
__attribute__((noipa))
int f(int *a,int *d)
/* Check that tests for sign-extension bits are handled correctly. */
struct s {
- short a;
- short b;
- unsigned short c;
- unsigned short d;
-} __attribute__ ((aligned (8)));
+ signed char a;
+ signed char b;
+ unsigned char c;
+ unsigned char d;
+} __attribute__ ((aligned (4)));
struct s p = { -1, 0, 0, 0 };
struct s q = { 0, -1, 0, 0 };
struct s r = { 1, 1, 0, 0 };
-const long long mask = 1ll << (sizeof (long long) * __CHAR_BIT__ - 5);
+const long mask = 1l << (sizeof (long) * __CHAR_BIT__ - 5);
int fp ()
{
}
int main () {
- /* Unlikely, but play safe. */
- if (sizeof (long long) == sizeof (short))
- return 0;
if (fp () < 0
|| fq () < 0
|| fr () > 0)
/* We test .b after other fields instead of right after .a to give field
merging a chance, otherwise the masked compares with zero are combined by
other ifcombine logic. The .c test is discarded by earlier optimizers. */
-/* { dg-final { scan-tree-dump-times "optimizing" 6 "ifcombine" } } */
+/* { dg-final { scan-tree-dump-times "optimizing" 6 "ifcombine" { target { ! { avr-*-* pru-*-* } } } } } */
}
int main () {
+ if (sizeof (short) != 2)
+ return 0;
f ();
return 0;
}
-/* { dg-final { scan-tree-dump-times "optimizing two comparisons" 2 "ifcombine" } } */
+/* { dg-final { scan-tree-dump-times "optimizing two comparisons" 2 "ifcombine" { target { ! { avr-*-* pru-*-* } } } } } */