Debian Codegraph @

gcc/testsuite/gcc.target/riscv/sat/sat_s_trunc-2-i64-to-i8.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_int64_t_to_int8_t_fmt_2:
9 ** slti\s+[atx][0-9]+,\s*[atx][0-9]+,\s*127
10 ** li\s+[atx][0-9]+,\s*-128
11 ** slt\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+
12 ** and\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+
13 ** addi\s+[atx][0-9]+,\s*[atx][0-9]+,\s*-1
14 ** neg\s+[atx][0-9]+,\s*[atx][0-9]+
15 ** srai\s+[atx][0-9]+,\s*[atx][0-9]+,\s*63
16 ** xori\s+[atx][0-9]+,\s*[atx][0-9]+,\s*127
17 ** and\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+
18 ** and\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+
19 ** or\s+a0,\s*[atx][0-9]+,\s*[atx][0-9]+
20 ** slliw\s+a0,\s*a0,\s*24
21 ** sraiw\s+a0,\s*a0,\s*24
22 ** ret
23 */
24 DEF_SAT_S_TRUNC_FMT_2(int8_t, int64_t, INT8_MIN, INT8_MAX)
25
26 /* { dg-final { scan-tree-dump-times ".SAT_TRUNC " 1 "optimized" } } */