Debian Codegraph @

gcc/testsuite/gcc.target/riscv/sat/sat_s_trunc-6-i32-to-i16.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_s_trunc_int32_t_to_int16_t_fmt_6:
9 ** li\s+[atx][0-9]+,\s*32768
10 ** addi\s+[atx][0-9]+,\s*[atx][0-9]+,\s*-1
11 ** slt\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+
12 ** li\s+[atx][0-9]+,\s*-32768
13 ** slt\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+
14 ** and\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+
15 ** addi\s+[atx][0-9]+,\s*[atx][0-9]+,\s*-1
16 ** neg\s+[atx][0-9]+,\s*[atx][0-9]+
17 ** srai\s+[atx][0-9]+,\s*[atx][0-9]+,\s*63
18 ** xor\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+
19 ** and\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+
20 ** and\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+
21 ** or\s+a0,\s*[atx][0-9]+,\s*[atx][0-9]+
22 ** slliw\s+a0,\s*a0,\s*16
23 ** sraiw\s+a0,\s*a0,\s*16
24 ** ret
25 */
26 DEF_SAT_S_TRUNC_FMT_6(int16_t, int32_t, INT16_MIN, INT16_MAX)
27
28 /* { dg-final { scan-tree-dump-times ".SAT_TRUNC " 1 "optimized" } } */