Debian Codegraph @

gcc/testsuite/gcc.target/riscv/sat/sat_s_trunc-4-i64-to-i32.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_int32_t_fmt_4:
9 ** li\s+[atx][0-9]+,\s*-2147483648
10 ** xori\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 ** slt\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+
13 ** and\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+
14 ** addi\s+[atx][0-9]+,\s*[atx][0-9]+,\s*-1
15 ** neg\s+[atx][0-9]+,\s*[atx][0-9]+
16 ** srai\s+[atx][0-9]+,\s*[atx][0-9]+,\s*63
17 ** xor\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 ** and\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+
20 ** or\s+a0,\s*[atx][0-9]+,\s*[atx][0-9]+
21 ** sext\.w\s+a0,\s*a0
22 ** ret
23 */
24 DEF_SAT_S_TRUNC_FMT_4(int32_t, int64_t, INT32_MIN, INT32_MAX)
25
26 /* { dg-final { scan-tree-dump-times ".SAT_TRUNC " 1 "optimized" } } */