gcc/testsuite/gcc.target/riscv/packh32.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -march=rv32gc_zbkb -mabi=ilp32" } */ |
| 3 | /* { dg-skip-if "" { *-*-* } { "-g" "-flto" "-O0" } } */ |
| 4 | |
| 5 | #include <stdint-gcc.h> |
| 6 | |
| 7 | int32_t foo1(int32_t rs1, int32_t rs2) |
| 8 | { |
| 9 | return (rs1 & 255) | ((rs2 & 255) << 8); |
| 10 | } |
| 11 | |
| 12 | /* { dg-final { scan-assembler-times "\\spackh\\s" 1 } } */ |
| 13 |