view gcc/testsuite/c-c++-common/fold-masked-cmp-3.c @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-fdump-tree-original" } */

void foo (int *p, int x)
{
  if ((x & 0xff) <= 7)
    *p = 0;
}

void bar (int *p, int x)
{
  if ((x & 0xff) < 8)
    *p = 0;
}

/* { dg-final { scan-tree-dump-times "(x & .*) == 0" 2 "original" } } */