gcc/testsuite/gcc.target/gcn/sram-ecc-1.c
raw| 1 | /* Ensure that explicit zero-entend instructions are present when compiling |
| 2 | for targets without sram-ecc enabled (in which sub-dword loads do not |
| 3 | zero the high bits of the target register). */ |
| 4 | |
| 5 | /* { dg-do compile } */ |
| 6 | /* { dg-options "-O2 -msram-ecc=off" } */ |
| 7 | |
| 8 | extern unsigned char c; |
| 9 | |
| 10 | unsigned int |
| 11 | f () |
| 12 | { |
| 13 | return c; |
| 14 | } |
| 15 | |
| 16 | /* { dg-final { scan-assembler "lshl.* 24" } } */ |
| 17 | /* { dg-final { scan-assembler "lshr.* 24" } } */ |