Debian Codegraph @

gcc/testsuite/gcc.target/riscv/pack64.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -march=rv64gc_zbkb -mabi=lp64" } */
3 /* { dg-skip-if "" { *-*-* } { "-g" "-flto" "-O0" } } */
4 #include <stdint-gcc.h>
5
6 uint64_t foo1(uint64_t rs1, uint64_t rs2)
7 {
8 return (rs1 << 32) | ((rs2 << 32) >> 32);
9 }
10
11 uint64_t foo2(uint64_t rs1, uint64_t rs2)
12 {
13 return (rs1 << 32) | (rs2 & 4294967295);
14 }
15
16 /* { dg-final { scan-assembler-times "\\spack\\s" 2 } } */
17