Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/trunc-1.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-march=rv64gcv_zvfh_zvl4096b -mabi=lp64d -O3 -mrvv-max-lmul=m8 -fdump-tree-optimized" } */
3
4 #include "def.h"
5
6 DEF_CONVERT (trunc, int16_t, int8_t, 4)
7 DEF_CONVERT (trunc, int16_t, int8_t, 16)
8 DEF_CONVERT (trunc, int16_t, int8_t, 32)
9 DEF_CONVERT (trunc, int16_t, int8_t, 64)
10 DEF_CONVERT (trunc, int16_t, int8_t, 128)
11 DEF_CONVERT (trunc, int16_t, int8_t, 256)
12 DEF_CONVERT (trunc, int16_t, int8_t, 512)
13 DEF_CONVERT (trunc, int16_t, int8_t, 1024)
14 DEF_CONVERT (trunc, int16_t, int8_t, 2048)
15
16 DEF_CONVERT (trunc, int32_t, int16_t, 4)
17 DEF_CONVERT (trunc, int32_t, int16_t, 16)
18 DEF_CONVERT (trunc, int32_t, int16_t, 32)
19 DEF_CONVERT (trunc, int32_t, int16_t, 64)
20 DEF_CONVERT (trunc, int32_t, int16_t, 128)
21 DEF_CONVERT (trunc, int32_t, int16_t, 256)
22 DEF_CONVERT (trunc, int32_t, int16_t, 512)
23 DEF_CONVERT (trunc, int32_t, int16_t, 1024)
24
25 DEF_CONVERT (trunc, int64_t, int32_t, 4)
26 DEF_CONVERT (trunc, int64_t, int32_t, 16)
27 DEF_CONVERT (trunc, int64_t, int32_t, 32)
28 DEF_CONVERT (trunc, int64_t, int32_t, 64)
29 DEF_CONVERT (trunc, int64_t, int32_t, 128)
30 DEF_CONVERT (trunc, int64_t, int32_t, 256)
31
32 DEF_CONVERT (trunc, uint16_t, uint8_t, 4)
33 DEF_CONVERT (trunc, uint16_t, uint8_t, 16)
34 DEF_CONVERT (trunc, uint16_t, uint8_t, 32)
35 DEF_CONVERT (trunc, uint16_t, uint8_t, 64)
36 DEF_CONVERT (trunc, uint16_t, uint8_t, 128)
37 DEF_CONVERT (trunc, uint16_t, uint8_t, 256)
38 DEF_CONVERT (trunc, uint16_t, uint8_t, 512)
39 DEF_CONVERT (trunc, uint16_t, uint8_t, 1024)
40 DEF_CONVERT (trunc, uint16_t, uint8_t, 2048)
41
42 DEF_CONVERT (trunc, uint32_t, uint16_t, 4)
43 DEF_CONVERT (trunc, uint32_t, uint16_t, 16)
44 DEF_CONVERT (trunc, uint32_t, uint16_t, 32)
45 DEF_CONVERT (trunc, uint32_t, uint16_t, 64)
46 DEF_CONVERT (trunc, uint32_t, uint16_t, 128)
47 DEF_CONVERT (trunc, uint32_t, uint16_t, 256)
48 DEF_CONVERT (trunc, uint32_t, uint16_t, 512)
49 DEF_CONVERT (trunc, uint32_t, uint16_t, 1024)
50
51 DEF_CONVERT (trunc, uint64_t, uint32_t, 4)
52 DEF_CONVERT (trunc, uint64_t, uint32_t, 16)
53 DEF_CONVERT (trunc, uint64_t, uint32_t, 32)
54 DEF_CONVERT (trunc, uint64_t, uint32_t, 64)
55 DEF_CONVERT (trunc, uint64_t, uint32_t, 128)
56 DEF_CONVERT (trunc, uint64_t, uint32_t, 256)
57
58 /* { dg-final { scan-assembler-times {vnsrl\.wi} 46 } } */
59 /* { dg-final { scan-assembler-not {csrr} } } */
60 /* { dg-final { scan-tree-dump-not "1,1" "optimized" } } */
61 /* { dg-final { scan-tree-dump-not "2,2" "optimized" } } */
62 /* { dg-final { scan-tree-dump-not "4,4" "optimized" } } */
63 /* { dg-final { scan-tree-dump-not "16,16" "optimized" } } */
64 /* { dg-final { scan-tree-dump-not "32,32" "optimized" } } */
65 /* { dg-final { scan-tree-dump-not "64,64" "optimized" } } */
66 /* { dg-final { scan-tree-dump-not "128,128" "optimized" } } */
67 /* { dg-final { scan-tree-dump-not "256,256" "optimized" } } */
68 /* { dg-final { scan-tree-dump-not "512,512" "optimized" } } */
69 /* { dg-final { scan-tree-dump-not "1024,1024" "optimized" } } */
70 /* { dg-final { scan-tree-dump-not "2048,2048" "optimized" } } */
71 /* { dg-final { scan-tree-dump-not "4096,4096" "optimized" } } */