annotate llvm/test/CodeGen/AMDGPU/saddsat.ll @ 236:c4bab56944e8 llvm-original

LLVM 16
author kono
date Wed, 09 Nov 2022 17:45:10 +0900
parents 79ff65ed7e25
children 1f2b6ac9f198
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 ; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=tahiti < %s | FileCheck --check-prefix=GFX6 %s
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 ; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=fiji < %s | FileCheck --check-prefix=GFX8 %s
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 ; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx900 < %s | FileCheck --check-prefix=GFX9 %s
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
5 ; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx1010 < %s | FileCheck --check-prefixes=GFX10PLUS,GFX10 %s
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
6 ; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx1100 -amdgpu-enable-delay-alu=0 < %s | FileCheck --check-prefixes=GFX10PLUS,GFX11 %s
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 define i8 @v_saddsat_i8(i8 %lhs, i8 %rhs) {
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 ; GFX6-LABEL: v_saddsat_i8:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 ; GFX6: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 ; GFX6-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 ; GFX6-NEXT: v_bfe_i32 v1, v1, 0, 8
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 ; GFX6-NEXT: v_bfe_i32 v0, v0, 0, 8
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 ; GFX6-NEXT: v_add_i32_e32 v0, vcc, v0, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 ; GFX6-NEXT: v_min_i32_e32 v0, 0x7f, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 ; GFX6-NEXT: v_max_i32_e32 v0, 0xffffff80, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 ; GFX6-NEXT: s_setpc_b64 s[30:31]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 ;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 ; GFX8-LABEL: v_saddsat_i8:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 ; GFX8: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 ; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 ; GFX8-NEXT: v_add_u16_sdwa v0, sext(v0), sext(v1) dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:BYTE_0 src1_sel:BYTE_0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 ; GFX8-NEXT: v_min_i16_e32 v0, 0x7f, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 ; GFX8-NEXT: v_max_i16_e32 v0, 0xff80, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 ; GFX8-NEXT: s_setpc_b64 s[30:31]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 ;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 ; GFX9-LABEL: v_saddsat_i8:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 ; GFX9: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 ; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 ; GFX9-NEXT: v_lshlrev_b16_e32 v1, 8, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 ; GFX9-NEXT: v_lshlrev_b16_e32 v0, 8, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 ; GFX9-NEXT: v_add_i16 v0, v0, v1 clamp
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 ; GFX9-NEXT: v_ashrrev_i16_e32 v0, 8, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 ; GFX9-NEXT: s_setpc_b64 s[30:31]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 ;
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
36 ; GFX10PLUS-LABEL: v_saddsat_i8:
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
37 ; GFX10PLUS: ; %bb.0:
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
38 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
39 ; GFX10PLUS-NEXT: s_waitcnt_vscnt null, 0x0
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
40 ; GFX10PLUS-NEXT: v_lshlrev_b16 v1, 8, v1
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
41 ; GFX10PLUS-NEXT: v_lshlrev_b16 v0, 8, v0
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
42 ; GFX10PLUS-NEXT: v_add_nc_i16 v0, v0, v1 clamp
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
43 ; GFX10PLUS-NEXT: v_ashrrev_i16 v0, 8, v0
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
44 ; GFX10PLUS-NEXT: s_setpc_b64 s[30:31]
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 %result = call i8 @llvm.sadd.sat.i8(i8 %lhs, i8 %rhs)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 ret i8 %result
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 }
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
48
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 define i16 @v_saddsat_i16(i16 %lhs, i16 %rhs) {
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 ; GFX6-LABEL: v_saddsat_i16:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 ; GFX6: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 ; GFX6-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 ; GFX6-NEXT: v_bfe_i32 v1, v1, 0, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 ; GFX6-NEXT: v_bfe_i32 v0, v0, 0, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 ; GFX6-NEXT: v_add_i32_e32 v0, vcc, v0, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 ; GFX6-NEXT: v_min_i32_e32 v0, 0x7fff, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 ; GFX6-NEXT: v_max_i32_e32 v0, 0xffff8000, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 ; GFX6-NEXT: s_setpc_b64 s[30:31]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 ;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 ; GFX8-LABEL: v_saddsat_i16:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 ; GFX8: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 ; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
63 ; GFX8-NEXT: v_cmp_gt_i16_e32 vcc, 0, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 ; GFX8-NEXT: v_add_u16_e32 v1, v0, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 ; GFX8-NEXT: v_cmp_lt_i16_e64 s[4:5], v1, v0
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
66 ; GFX8-NEXT: v_ashrrev_i16_e32 v0, 15, v1
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
67 ; GFX8-NEXT: v_xor_b32_e32 v0, 0xffff8000, v0
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 ; GFX8-NEXT: s_xor_b64 vcc, vcc, s[4:5]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 ; GFX8-NEXT: v_cndmask_b32_e32 v0, v1, v0, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 ; GFX8-NEXT: s_setpc_b64 s[30:31]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 ;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 ; GFX9-LABEL: v_saddsat_i16:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 ; GFX9: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 ; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
75 ; GFX9-NEXT: v_add_i16 v0, v0, v1 clamp
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 ; GFX9-NEXT: s_setpc_b64 s[30:31]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 ;
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
78 ; GFX10PLUS-LABEL: v_saddsat_i16:
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
79 ; GFX10PLUS: ; %bb.0:
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
80 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
81 ; GFX10PLUS-NEXT: s_waitcnt_vscnt null, 0x0
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
82 ; GFX10PLUS-NEXT: v_add_nc_i16 v0, v0, v1 clamp
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
83 ; GFX10PLUS-NEXT: s_setpc_b64 s[30:31]
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 %result = call i16 @llvm.sadd.sat.i16(i16 %lhs, i16 %rhs)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
85 ret i16 %result
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 }
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
87
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
88 define i32 @v_saddsat_i32(i32 %lhs, i32 %rhs) {
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 ; GFX6-LABEL: v_saddsat_i32:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
90 ; GFX6: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
91 ; GFX6-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
92 ; GFX6-NEXT: v_cmp_gt_i32_e32 vcc, 0, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
93 ; GFX6-NEXT: v_add_i32_e64 v1, s[4:5], v0, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
94 ; GFX6-NEXT: v_cmp_lt_i32_e64 s[4:5], v1, v0
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
95 ; GFX6-NEXT: v_ashrrev_i32_e32 v0, 31, v1
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
96 ; GFX6-NEXT: v_xor_b32_e32 v0, 0x80000000, v0
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
97 ; GFX6-NEXT: s_xor_b64 vcc, vcc, s[4:5]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
98 ; GFX6-NEXT: v_cndmask_b32_e32 v0, v1, v0, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
99 ; GFX6-NEXT: s_setpc_b64 s[30:31]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
100 ;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
101 ; GFX8-LABEL: v_saddsat_i32:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
102 ; GFX8: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
103 ; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
104 ; GFX8-NEXT: v_cmp_gt_i32_e32 vcc, 0, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
105 ; GFX8-NEXT: v_add_u32_e64 v1, s[4:5], v0, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
106 ; GFX8-NEXT: v_cmp_lt_i32_e64 s[4:5], v1, v0
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
107 ; GFX8-NEXT: v_ashrrev_i32_e32 v0, 31, v1
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
108 ; GFX8-NEXT: v_xor_b32_e32 v0, 0x80000000, v0
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
109 ; GFX8-NEXT: s_xor_b64 vcc, vcc, s[4:5]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
110 ; GFX8-NEXT: v_cndmask_b32_e32 v0, v1, v0, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
111 ; GFX8-NEXT: s_setpc_b64 s[30:31]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
112 ;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
113 ; GFX9-LABEL: v_saddsat_i32:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
114 ; GFX9: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
115 ; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
116 ; GFX9-NEXT: v_add_i32 v0, v0, v1 clamp
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
117 ; GFX9-NEXT: s_setpc_b64 s[30:31]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
118 ;
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
119 ; GFX10PLUS-LABEL: v_saddsat_i32:
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
120 ; GFX10PLUS: ; %bb.0:
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
121 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
122 ; GFX10PLUS-NEXT: s_waitcnt_vscnt null, 0x0
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
123 ; GFX10PLUS-NEXT: v_add_nc_i32 v0, v0, v1 clamp
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
124 ; GFX10PLUS-NEXT: s_setpc_b64 s[30:31]
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
125 %result = call i32 @llvm.sadd.sat.i32(i32 %lhs, i32 %rhs)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
126 ret i32 %result
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
127 }
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
128
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
129 define <2 x i16> @v_saddsat_v2i16(<2 x i16> %lhs, <2 x i16> %rhs) {
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
130 ; GFX6-LABEL: v_saddsat_v2i16:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
131 ; GFX6: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
132 ; GFX6-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
133 ; GFX6-NEXT: v_bfe_i32 v2, v2, 0, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
134 ; GFX6-NEXT: v_bfe_i32 v0, v0, 0, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
135 ; GFX6-NEXT: v_bfe_i32 v3, v3, 0, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
136 ; GFX6-NEXT: v_bfe_i32 v1, v1, 0, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
137 ; GFX6-NEXT: v_add_i32_e32 v1, vcc, v1, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
138 ; GFX6-NEXT: v_add_i32_e32 v0, vcc, v0, v2
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
139 ; GFX6-NEXT: v_min_i32_e32 v1, 0x7fff, v1
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
140 ; GFX6-NEXT: v_min_i32_e32 v0, 0x7fff, v0
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
141 ; GFX6-NEXT: v_max_i32_e32 v1, 0xffff8000, v1
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
142 ; GFX6-NEXT: v_max_i32_e32 v0, 0xffff8000, v0
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
143 ; GFX6-NEXT: v_lshlrev_b32_e32 v3, 16, v1
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
144 ; GFX6-NEXT: v_and_b32_e32 v0, 0xffff, v0
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
145 ; GFX6-NEXT: v_or_b32_e32 v0, v0, v3
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
146 ; GFX6-NEXT: v_and_b32_e32 v1, 0xffff, v1
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
147 ; GFX6-NEXT: s_setpc_b64 s[30:31]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
148 ;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
149 ; GFX8-LABEL: v_saddsat_v2i16:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
150 ; GFX8: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
151 ; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
152 ; GFX8-NEXT: v_lshrrev_b32_e32 v2, 16, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
153 ; GFX8-NEXT: v_lshrrev_b32_e32 v3, 16, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
154 ; GFX8-NEXT: v_add_u16_e32 v4, v3, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
155 ; GFX8-NEXT: v_cmp_lt_i16_e32 vcc, v4, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
156 ; GFX8-NEXT: v_cmp_gt_i16_e64 s[4:5], 0, v2
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
157 ; GFX8-NEXT: v_ashrrev_i16_e32 v2, 15, v4
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
158 ; GFX8-NEXT: v_xor_b32_e32 v2, 0xffff8000, v2
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
159 ; GFX8-NEXT: s_xor_b64 vcc, s[4:5], vcc
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
160 ; GFX8-NEXT: v_cndmask_b32_e32 v2, v4, v2, vcc
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
161 ; GFX8-NEXT: v_cmp_gt_i16_e32 vcc, 0, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
162 ; GFX8-NEXT: v_add_u16_e32 v1, v0, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
163 ; GFX8-NEXT: v_cmp_lt_i16_e64 s[4:5], v1, v0
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
164 ; GFX8-NEXT: v_ashrrev_i16_e32 v0, 15, v1
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
165 ; GFX8-NEXT: v_xor_b32_e32 v0, 0xffff8000, v0
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
166 ; GFX8-NEXT: s_xor_b64 vcc, vcc, s[4:5]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
167 ; GFX8-NEXT: v_lshlrev_b32_e32 v2, 16, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
168 ; GFX8-NEXT: v_cndmask_b32_e32 v0, v1, v0, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
169 ; GFX8-NEXT: v_or_b32_sdwa v0, v0, v2 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:WORD_0 src1_sel:DWORD
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
170 ; GFX8-NEXT: s_setpc_b64 s[30:31]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
171 ;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
172 ; GFX9-LABEL: v_saddsat_v2i16:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
173 ; GFX9: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
174 ; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
175 ; GFX9-NEXT: v_pk_add_i16 v0, v0, v1 clamp
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
176 ; GFX9-NEXT: s_setpc_b64 s[30:31]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
177 ;
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
178 ; GFX10PLUS-LABEL: v_saddsat_v2i16:
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
179 ; GFX10PLUS: ; %bb.0:
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
180 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
181 ; GFX10PLUS-NEXT: s_waitcnt_vscnt null, 0x0
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
182 ; GFX10PLUS-NEXT: v_pk_add_i16 v0, v0, v1 clamp
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
183 ; GFX10PLUS-NEXT: s_setpc_b64 s[30:31]
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
184 %result = call <2 x i16> @llvm.sadd.sat.v2i16(<2 x i16> %lhs, <2 x i16> %rhs)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
185 ret <2 x i16> %result
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
186 }
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
187
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
188 define <3 x i16> @v_saddsat_v3i16(<3 x i16> %lhs, <3 x i16> %rhs) {
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
189 ; GFX6-LABEL: v_saddsat_v3i16:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
190 ; GFX6: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
191 ; GFX6-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
192 ; GFX6-NEXT: v_bfe_i32 v3, v3, 0, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
193 ; GFX6-NEXT: v_bfe_i32 v0, v0, 0, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
194 ; GFX6-NEXT: v_bfe_i32 v4, v4, 0, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
195 ; GFX6-NEXT: v_bfe_i32 v1, v1, 0, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
196 ; GFX6-NEXT: v_bfe_i32 v5, v5, 0, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
197 ; GFX6-NEXT: v_bfe_i32 v2, v2, 0, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
198 ; GFX6-NEXT: v_add_i32_e32 v1, vcc, v1, v4
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
199 ; GFX6-NEXT: v_add_i32_e32 v0, vcc, v0, v3
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
200 ; GFX6-NEXT: v_min_i32_e32 v1, 0x7fff, v1
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
201 ; GFX6-NEXT: v_min_i32_e32 v0, 0x7fff, v0
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
202 ; GFX6-NEXT: v_add_i32_e32 v2, vcc, v2, v5
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
203 ; GFX6-NEXT: v_max_i32_e32 v1, 0xffff8000, v1
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
204 ; GFX6-NEXT: v_max_i32_e32 v0, 0xffff8000, v0
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
205 ; GFX6-NEXT: v_min_i32_e32 v2, 0x7fff, v2
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
206 ; GFX6-NEXT: v_lshlrev_b32_e32 v1, 16, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
207 ; GFX6-NEXT: v_and_b32_e32 v0, 0xffff, v0
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
208 ; GFX6-NEXT: v_max_i32_e32 v3, 0xffff8000, v2
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
209 ; GFX6-NEXT: v_or_b32_e32 v0, v0, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
210 ; GFX6-NEXT: v_or_b32_e32 v2, 0xffff0000, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
211 ; GFX6-NEXT: v_alignbit_b32 v1, v3, v1, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
212 ; GFX6-NEXT: s_setpc_b64 s[30:31]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
213 ;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
214 ; GFX8-LABEL: v_saddsat_v3i16:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
215 ; GFX8: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
216 ; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
217 ; GFX8-NEXT: v_lshrrev_b32_e32 v4, 16, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
218 ; GFX8-NEXT: v_lshrrev_b32_e32 v5, 16, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
219 ; GFX8-NEXT: v_add_u16_e32 v6, v5, v4
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
220 ; GFX8-NEXT: v_cmp_lt_i16_e32 vcc, v6, v5
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
221 ; GFX8-NEXT: v_cmp_gt_i16_e64 s[4:5], 0, v4
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
222 ; GFX8-NEXT: v_ashrrev_i16_e32 v4, 15, v6
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
223 ; GFX8-NEXT: v_xor_b32_e32 v4, 0xffff8000, v4
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
224 ; GFX8-NEXT: s_xor_b64 vcc, s[4:5], vcc
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
225 ; GFX8-NEXT: v_cndmask_b32_e32 v4, v6, v4, vcc
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
226 ; GFX8-NEXT: v_cmp_gt_i16_e32 vcc, 0, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
227 ; GFX8-NEXT: v_add_u16_e32 v3, v1, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
228 ; GFX8-NEXT: v_cmp_lt_i16_e64 s[4:5], v3, v1
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
229 ; GFX8-NEXT: v_ashrrev_i16_e32 v1, 15, v3
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
230 ; GFX8-NEXT: v_xor_b32_e32 v1, 0xffff8000, v1
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
231 ; GFX8-NEXT: s_xor_b64 vcc, vcc, s[4:5]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
232 ; GFX8-NEXT: v_cndmask_b32_e32 v1, v3, v1, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
233 ; GFX8-NEXT: v_cmp_gt_i16_e32 vcc, 0, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
234 ; GFX8-NEXT: v_add_u16_e32 v2, v0, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
235 ; GFX8-NEXT: v_cmp_lt_i16_e64 s[4:5], v2, v0
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
236 ; GFX8-NEXT: v_ashrrev_i16_e32 v0, 15, v2
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
237 ; GFX8-NEXT: v_xor_b32_e32 v0, 0xffff8000, v0
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
238 ; GFX8-NEXT: s_xor_b64 vcc, vcc, s[4:5]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
239 ; GFX8-NEXT: v_cndmask_b32_e32 v0, v2, v0, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
240 ; GFX8-NEXT: v_lshlrev_b32_e32 v2, 16, v4
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
241 ; GFX8-NEXT: v_or_b32_sdwa v0, v0, v2 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:WORD_0 src1_sel:DWORD
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
242 ; GFX8-NEXT: s_setpc_b64 s[30:31]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
243 ;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
244 ; GFX9-LABEL: v_saddsat_v3i16:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
245 ; GFX9: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
246 ; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
247 ; GFX9-NEXT: v_pk_add_i16 v1, v1, v3 clamp
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
248 ; GFX9-NEXT: v_pk_add_i16 v0, v0, v2 clamp
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
249 ; GFX9-NEXT: s_setpc_b64 s[30:31]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
250 ;
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
251 ; GFX10PLUS-LABEL: v_saddsat_v3i16:
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
252 ; GFX10PLUS: ; %bb.0:
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
253 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
254 ; GFX10PLUS-NEXT: s_waitcnt_vscnt null, 0x0
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
255 ; GFX10PLUS-NEXT: v_pk_add_i16 v0, v0, v2 clamp
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
256 ; GFX10PLUS-NEXT: v_pk_add_i16 v1, v1, v3 clamp
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
257 ; GFX10PLUS-NEXT: s_setpc_b64 s[30:31]
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
258 %result = call <3 x i16> @llvm.sadd.sat.v3i16(<3 x i16> %lhs, <3 x i16> %rhs)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
259 ret <3 x i16> %result
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
260 }
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
261
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
262 define <2 x float> @v_saddsat_v4i16(<4 x i16> %lhs, <4 x i16> %rhs) {
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
263 ; GFX6-LABEL: v_saddsat_v4i16:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
264 ; GFX6: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
265 ; GFX6-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
266 ; GFX6-NEXT: v_bfe_i32 v4, v4, 0, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
267 ; GFX6-NEXT: v_bfe_i32 v0, v0, 0, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
268 ; GFX6-NEXT: v_bfe_i32 v5, v5, 0, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
269 ; GFX6-NEXT: v_bfe_i32 v1, v1, 0, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
270 ; GFX6-NEXT: v_add_i32_e32 v1, vcc, v1, v5
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
271 ; GFX6-NEXT: v_add_i32_e32 v0, vcc, v0, v4
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
272 ; GFX6-NEXT: v_min_i32_e32 v1, 0x7fff, v1
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
273 ; GFX6-NEXT: v_min_i32_e32 v0, 0x7fff, v0
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
274 ; GFX6-NEXT: v_max_i32_e32 v1, 0xffff8000, v1
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
275 ; GFX6-NEXT: v_max_i32_e32 v0, 0xffff8000, v0
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
276 ; GFX6-NEXT: v_bfe_i32 v6, v6, 0, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
277 ; GFX6-NEXT: v_bfe_i32 v2, v2, 0, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
278 ; GFX6-NEXT: v_bfe_i32 v7, v7, 0, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
279 ; GFX6-NEXT: v_bfe_i32 v3, v3, 0, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
280 ; GFX6-NEXT: v_lshlrev_b32_e32 v1, 16, v1
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
281 ; GFX6-NEXT: v_and_b32_e32 v0, 0xffff, v0
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
282 ; GFX6-NEXT: v_or_b32_e32 v0, v0, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
283 ; GFX6-NEXT: v_add_i32_e32 v1, vcc, v3, v7
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
284 ; GFX6-NEXT: v_add_i32_e32 v2, vcc, v2, v6
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
285 ; GFX6-NEXT: v_min_i32_e32 v1, 0x7fff, v1
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
286 ; GFX6-NEXT: v_min_i32_e32 v2, 0x7fff, v2
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
287 ; GFX6-NEXT: v_max_i32_e32 v1, 0xffff8000, v1
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
288 ; GFX6-NEXT: v_max_i32_e32 v2, 0xffff8000, v2
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
289 ; GFX6-NEXT: v_lshlrev_b32_e32 v1, 16, v1
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
290 ; GFX6-NEXT: v_and_b32_e32 v2, 0xffff, v2
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
291 ; GFX6-NEXT: v_or_b32_e32 v1, v2, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
292 ; GFX6-NEXT: s_setpc_b64 s[30:31]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
293 ;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
294 ; GFX8-LABEL: v_saddsat_v4i16:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
295 ; GFX8: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
296 ; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
297 ; GFX8-NEXT: v_lshrrev_b32_e32 v4, 16, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
298 ; GFX8-NEXT: v_lshrrev_b32_e32 v5, 16, v0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
299 ; GFX8-NEXT: v_add_u16_e32 v6, v5, v4
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
300 ; GFX8-NEXT: v_cmp_lt_i16_e32 vcc, v6, v5
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
301 ; GFX8-NEXT: v_cmp_gt_i16_e64 s[4:5], 0, v4
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
302 ; GFX8-NEXT: v_ashrrev_i16_e32 v4, 15, v6
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
303 ; GFX8-NEXT: v_xor_b32_e32 v4, 0xffff8000, v4
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
304 ; GFX8-NEXT: s_xor_b64 vcc, s[4:5], vcc
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
305 ; GFX8-NEXT: v_cndmask_b32_e32 v4, v6, v4, vcc
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
306 ; GFX8-NEXT: v_cmp_gt_i16_e32 vcc, 0, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
307 ; GFX8-NEXT: v_add_u16_e32 v2, v0, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
308 ; GFX8-NEXT: v_cmp_lt_i16_e64 s[4:5], v2, v0
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
309 ; GFX8-NEXT: v_ashrrev_i16_e32 v0, 15, v2
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
310 ; GFX8-NEXT: v_xor_b32_e32 v0, 0xffff8000, v0
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
311 ; GFX8-NEXT: s_xor_b64 vcc, vcc, s[4:5]
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
312 ; GFX8-NEXT: v_lshlrev_b32_e32 v4, 16, v4
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
313 ; GFX8-NEXT: v_cndmask_b32_e32 v0, v2, v0, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
314 ; GFX8-NEXT: v_or_b32_sdwa v0, v0, v4 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:WORD_0 src1_sel:DWORD
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
315 ; GFX8-NEXT: v_lshrrev_b32_e32 v2, 16, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
316 ; GFX8-NEXT: v_lshrrev_b32_e32 v4, 16, v1
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
317 ; GFX8-NEXT: v_add_u16_e32 v5, v4, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
318 ; GFX8-NEXT: v_cmp_lt_i16_e32 vcc, v5, v4
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
319 ; GFX8-NEXT: v_cmp_gt_i16_e64 s[4:5], 0, v2
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
320 ; GFX8-NEXT: v_ashrrev_i16_e32 v2, 15, v5
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
321 ; GFX8-NEXT: v_xor_b32_e32 v2, 0xffff8000, v2
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
322 ; GFX8-NEXT: s_xor_b64 vcc, s[4:5], vcc
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
323 ; GFX8-NEXT: v_cndmask_b32_e32 v2, v5, v2, vcc
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
324 ; GFX8-NEXT: v_cmp_gt_i16_e32 vcc, 0, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
325 ; GFX8-NEXT: v_add_u16_e32 v3, v1, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
326 ; GFX8-NEXT: v_cmp_lt_i16_e64 s[4:5], v3, v1
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
327 ; GFX8-NEXT: v_ashrrev_i16_e32 v1, 15, v3
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
328 ; GFX8-NEXT: v_xor_b32_e32 v1, 0xffff8000, v1
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
329 ; GFX8-NEXT: s_xor_b64 vcc, vcc, s[4:5]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
330 ; GFX8-NEXT: v_lshlrev_b32_e32 v2, 16, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
331 ; GFX8-NEXT: v_cndmask_b32_e32 v1, v3, v1, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
332 ; GFX8-NEXT: v_or_b32_sdwa v1, v1, v2 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:WORD_0 src1_sel:DWORD
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
333 ; GFX8-NEXT: s_setpc_b64 s[30:31]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
334 ;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
335 ; GFX9-LABEL: v_saddsat_v4i16:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
336 ; GFX9: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
337 ; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
338 ; GFX9-NEXT: v_pk_add_i16 v0, v0, v2 clamp
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
339 ; GFX9-NEXT: v_pk_add_i16 v1, v1, v3 clamp
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
340 ; GFX9-NEXT: s_setpc_b64 s[30:31]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
341 ;
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
342 ; GFX10PLUS-LABEL: v_saddsat_v4i16:
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
343 ; GFX10PLUS: ; %bb.0:
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
344 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
345 ; GFX10PLUS-NEXT: s_waitcnt_vscnt null, 0x0
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
346 ; GFX10PLUS-NEXT: v_pk_add_i16 v0, v0, v2 clamp
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
347 ; GFX10PLUS-NEXT: v_pk_add_i16 v1, v1, v3 clamp
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
348 ; GFX10PLUS-NEXT: s_setpc_b64 s[30:31]
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
349 %result = call <4 x i16> @llvm.sadd.sat.v4i16(<4 x i16> %lhs, <4 x i16> %rhs)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
350 %cast = bitcast <4 x i16> %result to <2 x float>
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
351 ret <2 x float> %cast
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
352 }
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
353
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
354 define <2 x i32> @v_saddsat_v2i32(<2 x i32> %lhs, <2 x i32> %rhs) {
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
355 ; GFX6-LABEL: v_saddsat_v2i32:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
356 ; GFX6: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
357 ; GFX6-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
358 ; GFX6-NEXT: v_cmp_gt_i32_e32 vcc, 0, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
359 ; GFX6-NEXT: v_add_i32_e64 v2, s[4:5], v0, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
360 ; GFX6-NEXT: v_cmp_lt_i32_e64 s[4:5], v2, v0
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
361 ; GFX6-NEXT: v_ashrrev_i32_e32 v0, 31, v2
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
362 ; GFX6-NEXT: v_xor_b32_e32 v0, 0x80000000, v0
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
363 ; GFX6-NEXT: s_xor_b64 vcc, vcc, s[4:5]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
364 ; GFX6-NEXT: v_cndmask_b32_e32 v0, v2, v0, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
365 ; GFX6-NEXT: v_add_i32_e64 v2, s[4:5], v1, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
366 ; GFX6-NEXT: v_cmp_gt_i32_e32 vcc, 0, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
367 ; GFX6-NEXT: v_cmp_lt_i32_e64 s[4:5], v2, v1
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
368 ; GFX6-NEXT: v_ashrrev_i32_e32 v1, 31, v2
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
369 ; GFX6-NEXT: v_xor_b32_e32 v1, 0x80000000, v1
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
370 ; GFX6-NEXT: s_xor_b64 vcc, vcc, s[4:5]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
371 ; GFX6-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
372 ; GFX6-NEXT: s_setpc_b64 s[30:31]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
373 ;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
374 ; GFX8-LABEL: v_saddsat_v2i32:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
375 ; GFX8: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
376 ; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
377 ; GFX8-NEXT: v_cmp_gt_i32_e32 vcc, 0, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
378 ; GFX8-NEXT: v_add_u32_e64 v2, s[4:5], v0, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
379 ; GFX8-NEXT: v_cmp_lt_i32_e64 s[4:5], v2, v0
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
380 ; GFX8-NEXT: v_ashrrev_i32_e32 v0, 31, v2
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
381 ; GFX8-NEXT: v_xor_b32_e32 v0, 0x80000000, v0
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
382 ; GFX8-NEXT: s_xor_b64 vcc, vcc, s[4:5]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
383 ; GFX8-NEXT: v_cndmask_b32_e32 v0, v2, v0, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
384 ; GFX8-NEXT: v_add_u32_e64 v2, s[4:5], v1, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
385 ; GFX8-NEXT: v_cmp_gt_i32_e32 vcc, 0, v3
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
386 ; GFX8-NEXT: v_cmp_lt_i32_e64 s[4:5], v2, v1
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
387 ; GFX8-NEXT: v_ashrrev_i32_e32 v1, 31, v2
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
388 ; GFX8-NEXT: v_xor_b32_e32 v1, 0x80000000, v1
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
389 ; GFX8-NEXT: s_xor_b64 vcc, vcc, s[4:5]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
390 ; GFX8-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
391 ; GFX8-NEXT: s_setpc_b64 s[30:31]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
392 ;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
393 ; GFX9-LABEL: v_saddsat_v2i32:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
394 ; GFX9: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
395 ; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
396 ; GFX9-NEXT: v_add_i32 v0, v0, v2 clamp
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
397 ; GFX9-NEXT: v_add_i32 v1, v1, v3 clamp
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
398 ; GFX9-NEXT: s_setpc_b64 s[30:31]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
399 ;
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
400 ; GFX10PLUS-LABEL: v_saddsat_v2i32:
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
401 ; GFX10PLUS: ; %bb.0:
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
402 ; GFX10PLUS-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
403 ; GFX10PLUS-NEXT: s_waitcnt_vscnt null, 0x0
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
404 ; GFX10PLUS-NEXT: v_add_nc_i32 v0, v0, v2 clamp
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
405 ; GFX10PLUS-NEXT: v_add_nc_i32 v1, v1, v3 clamp
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
406 ; GFX10PLUS-NEXT: s_setpc_b64 s[30:31]
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
407 %result = call <2 x i32> @llvm.sadd.sat.v2i32(<2 x i32> %lhs, <2 x i32> %rhs)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
408 ret <2 x i32> %result
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
409 }
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
410
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
411 define i64 @v_saddsat_i64(i64 %lhs, i64 %rhs) {
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
412 ; GFX6-LABEL: v_saddsat_i64:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
413 ; GFX6: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
414 ; GFX6-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
415 ; GFX6-NEXT: v_add_i32_e32 v4, vcc, v0, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
416 ; GFX6-NEXT: v_addc_u32_e32 v5, vcc, v1, v3, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
417 ; GFX6-NEXT: v_cmp_lt_i64_e32 vcc, v[4:5], v[0:1]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
418 ; GFX6-NEXT: v_cmp_gt_i64_e64 s[4:5], 0, v[2:3]
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
419 ; GFX6-NEXT: v_ashrrev_i32_e32 v1, 31, v5
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
420 ; GFX6-NEXT: s_xor_b64 vcc, s[4:5], vcc
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
421 ; GFX6-NEXT: v_cndmask_b32_e32 v0, v4, v1, vcc
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
422 ; GFX6-NEXT: v_xor_b32_e32 v1, 0x80000000, v1
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
423 ; GFX6-NEXT: v_cndmask_b32_e32 v1, v5, v1, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
424 ; GFX6-NEXT: s_setpc_b64 s[30:31]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
425 ;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
426 ; GFX8-LABEL: v_saddsat_i64:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
427 ; GFX8: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
428 ; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
429 ; GFX8-NEXT: v_add_u32_e32 v4, vcc, v0, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
430 ; GFX8-NEXT: v_addc_u32_e32 v5, vcc, v1, v3, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
431 ; GFX8-NEXT: v_cmp_lt_i64_e32 vcc, v[4:5], v[0:1]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
432 ; GFX8-NEXT: v_cmp_gt_i64_e64 s[4:5], 0, v[2:3]
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
433 ; GFX8-NEXT: v_ashrrev_i32_e32 v1, 31, v5
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
434 ; GFX8-NEXT: s_xor_b64 vcc, s[4:5], vcc
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
435 ; GFX8-NEXT: v_cndmask_b32_e32 v0, v4, v1, vcc
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
436 ; GFX8-NEXT: v_xor_b32_e32 v1, 0x80000000, v1
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
437 ; GFX8-NEXT: v_cndmask_b32_e32 v1, v5, v1, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
438 ; GFX8-NEXT: s_setpc_b64 s[30:31]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
439 ;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
440 ; GFX9-LABEL: v_saddsat_i64:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
441 ; GFX9: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
442 ; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
443 ; GFX9-NEXT: v_add_co_u32_e32 v4, vcc, v0, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
444 ; GFX9-NEXT: v_addc_co_u32_e32 v5, vcc, v1, v3, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
445 ; GFX9-NEXT: v_cmp_lt_i64_e32 vcc, v[4:5], v[0:1]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
446 ; GFX9-NEXT: v_cmp_gt_i64_e64 s[4:5], 0, v[2:3]
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
447 ; GFX9-NEXT: v_ashrrev_i32_e32 v1, 31, v5
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
448 ; GFX9-NEXT: s_xor_b64 vcc, s[4:5], vcc
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
449 ; GFX9-NEXT: v_cndmask_b32_e32 v0, v4, v1, vcc
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
450 ; GFX9-NEXT: v_xor_b32_e32 v1, 0x80000000, v1
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
451 ; GFX9-NEXT: v_cndmask_b32_e32 v1, v5, v1, vcc
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
452 ; GFX9-NEXT: s_setpc_b64 s[30:31]
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
453 ;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
454 ; GFX10-LABEL: v_saddsat_i64:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
455 ; GFX10: ; %bb.0:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
456 ; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
457 ; GFX10-NEXT: s_waitcnt_vscnt null, 0x0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
458 ; GFX10-NEXT: v_add_co_u32 v4, vcc_lo, v0, v2
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
459 ; GFX10-NEXT: v_add_co_ci_u32_e32 v5, vcc_lo, v1, v3, vcc_lo
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
460 ; GFX10-NEXT: v_cmp_gt_i64_e64 s4, 0, v[2:3]
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
461 ; GFX10-NEXT: v_ashrrev_i32_e32 v6, 31, v5
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
462 ; GFX10-NEXT: v_cmp_lt_i64_e32 vcc_lo, v[4:5], v[0:1]
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
463 ; GFX10-NEXT: v_xor_b32_e32 v1, 0x80000000, v6
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
464 ; GFX10-NEXT: s_xor_b32 vcc_lo, s4, vcc_lo
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
465 ; GFX10-NEXT: v_cndmask_b32_e32 v0, v4, v6, vcc_lo
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
466 ; GFX10-NEXT: v_cndmask_b32_e32 v1, v5, v1, vcc_lo
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
467 ; GFX10-NEXT: s_setpc_b64 s[30:31]
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
468 ;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
469 ; GFX11-LABEL: v_saddsat_i64:
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
470 ; GFX11: ; %bb.0:
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
471 ; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
472 ; GFX11-NEXT: s_waitcnt_vscnt null, 0x0
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
473 ; GFX11-NEXT: v_add_co_u32 v4, vcc_lo, v0, v2
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
474 ; GFX11-NEXT: v_add_co_ci_u32_e32 v5, vcc_lo, v1, v3, vcc_lo
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
475 ; GFX11-NEXT: v_cmp_gt_i64_e64 s0, 0, v[2:3]
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
476 ; GFX11-NEXT: v_ashrrev_i32_e32 v6, 31, v5
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
477 ; GFX11-NEXT: v_cmp_lt_i64_e32 vcc_lo, v[4:5], v[0:1]
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
478 ; GFX11-NEXT: v_xor_b32_e32 v1, 0x80000000, v6
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
479 ; GFX11-NEXT: s_xor_b32 vcc_lo, s0, vcc_lo
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
480 ; GFX11-NEXT: v_dual_cndmask_b32 v0, v4, v6 :: v_dual_cndmask_b32 v1, v5, v1
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
481 ; GFX11-NEXT: s_setpc_b64 s[30:31]
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
482 %result = call i64 @llvm.sadd.sat.i64(i64 %lhs, i64 %rhs)
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
483 ret i64 %result
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
484 }
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
485
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
486 declare i8 @llvm.sadd.sat.i8(i8, i8) #0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
487 declare i16 @llvm.sadd.sat.i16(i16, i16) #0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
488 declare <2 x i16> @llvm.sadd.sat.v2i16(<2 x i16>, <2 x i16>) #0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
489 declare <3 x i16> @llvm.sadd.sat.v3i16(<3 x i16>, <3 x i16>) #0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
490 declare <4 x i16> @llvm.sadd.sat.v4i16(<4 x i16>, <4 x i16>) #0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
491 declare i32 @llvm.sadd.sat.i32(i32, i32) #0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
492 declare <2 x i32> @llvm.sadd.sat.v2i32(<2 x i32>, <2 x i32>) #0
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
493 declare i64 @llvm.sadd.sat.i64(i64, i64) #0