Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / gcc / testsuite / gcc.target / mips / ext-2.c
1 /* Turn the truncate,zero_extend,lshiftrt sequence before the or into a
2    zero_extract.  The truncate is due to TARGET_PROMOTE_PROTOTYPES, the
3    zero_extend to PROMOTE_MODE.  */
4 /* { dg-do compile } */
5 /* { dg-options "isa_rev>=2 -mgp64 -mlong64" } */
6 /* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
7 /* { dg-final { scan-assembler "\tdext\t" } } */
8 /* { dg-final { scan-assembler-not "\tand" } } */
9 /* { dg-final { scan-assembler-not "\td?srl" } } */
10
11 NOMIPS16 void
12 f (unsigned char x, unsigned char *r)
13 {
14   *r = 0x50 | (x >> 4);
15 }