1 /* { dg-do compile } */
2 /* { dg-options "-Os" } */
4 /* This testcase verifies that a uint8_t variable assigned from a wider variable
5 with the same range is held in a single register. VRP must not fold away the
6 conversion and use two regs to hold the uint16_t - widenings are ok only upto
7 word mode (1 byte for AVR).
10 unsigned int foo(const unsigned int wvalue
)
12 const unsigned char type
= (wvalue
>> 8);
13 unsigned int size
= 0;
22 /* { dg-final { scan-assembler "cpi r25,lo8\\(1\\)" } } */
23 /* { dg-final { scan-assembler-not "cpc r\\d+,__zero_reg__" } } */