summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/mips/truncate-5.c
blob: 046ef80c453497442612a0e54471f3d1c5c0b627 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* If we AND in DI mode (i.e. replace the order of TRUNCATE and AND) then we
   can remove the TRUNCATE.  */
/* { dg-options "-O -mgp64" } */
/* { dg-final { scan-assembler-not "\tsll\t\[^\n\]*,0" } } */

struct s
{
  unsigned a:5;
};

f (struct s *s, unsigned long long a)
{
  s->a = a & 0x3;
}