Debian Codegraph @

gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-2-u32.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-march=rv64gc -mabi=lp64d -fdump-tree-optimized -fno-schedule-insns -fno-schedule-insns2" } */
3 /* { dg-final { check-function-bodies "**" "" } } */
4
5 #include "sat_arith.h"
6
7 /*
8 ** sat_u_trunc_uint16_t_to_uint8_t_fmt_2:
9 ** sltiu\s+[atx][0-9]+,\s*a0,\s*255
10 ** addi\s+[atx][0-9]+,\s*[atx][0-9]+,\s*-1
11 ** or\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+
12 ** andi\s+[atx][0-9]+,\s*[atx][0-9]+,\s*0xff
13 ** ret
14 */
15 DEF_SAT_U_TRUNC_FMT_2(uint8_t, uint16_t)
16
17 /* { dg-final { scan-tree-dump-times ".SAT_TRUNC " 1 "optimized" } } */