gcc/testsuite/gcc.dg/vect/pr116791.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-additional-options "-mavx2" { target avx2 } } */ |
| 3 | |
| 4 | struct nine_context { |
| 5 | unsigned tex_stage[8][33]; |
| 6 | }; |
| 7 | struct fvec4 { |
| 8 | float x[2]; |
| 9 | }; |
| 10 | void f(struct fvec4 *dst, struct nine_context *context) |
| 11 | { |
| 12 | unsigned s; |
| 13 | for (s = 0; s < 8; ++s) |
| 14 | { |
| 15 | float *rgba = &dst[s].x[0]; |
| 16 | unsigned color = context->tex_stage[s][0]; |
| 17 | rgba[0] = (float)((color >> 16) & 0xFF) / 0xFF; |
| 18 | rgba[1] = (float)((color >> 8) & 0xFF) / 0xFF; |
| 19 | } |
| 20 | } |