1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs < %s | FileCheck %s
4 target datalayout = "E-m:a-p:32:32-i64:64-n32"
5 target triple = "powerpc-ibm-aix7.2.0.0"
7 %struct.USST = type { i16, i16 }
8 %struct.SST = type { i16, i16 }
9 %struct.CST = type { i8, i8 }
10 %struct.SCST = type { i8, i8 }
11 %struct.ST = type { i32, i32 }
12 %struct.UST = type { i32, i32 }
14 ; Function Attrs: nounwind
15 define i32 @ustc1(ptr noundef byval(%struct.USST) align 4 %s) {
17 ; CHECK: # %bb.0: # %entry
19 ; CHECK-NEXT: srwi 3, 3, 24
20 ; CHECK-NEXT: stw 4, 24(1)
23 %0 = load i16, ptr %s, align 4
24 %conv = zext i16 %0 to i32
25 %shr = ashr i32 %conv, 8
29 ; Function Attrs: nounwind
30 define i32 @ustc2(ptr noundef byval(%struct.USST) align 4 %s) {
32 ; CHECK: # %bb.0: # %entry
34 ; CHECK-NEXT: srwi 3, 3, 16
35 ; CHECK-NEXT: stw 4, 24(1)
38 %0 = load i16, ptr %s, align 4
39 %conv = zext i16 %0 to i32
43 ; Function Attrs: nounwind
44 define i32 @stc1(ptr noundef byval(%struct.SST) align 4 %s) {
46 ; CHECK: # %bb.0: # %entry
48 ; CHECK-NEXT: srawi 3, 3, 24
49 ; CHECK-NEXT: stw 4, 24(1)
52 %0 = load i16, ptr %s, align 4
53 %conv = sext i16 %0 to i32
54 %shr = ashr i32 %conv, 8
58 ; Function Attrs: nounwind
59 define i32 @stc2(ptr noundef byval(%struct.SST) align 4 %s) {
61 ; CHECK: # %bb.0: # %entry
63 ; CHECK-NEXT: srawi 3, 3, 16
64 ; CHECK-NEXT: stw 4, 24(1)
67 %0 = load i16, ptr %s, align 4
68 %conv = sext i16 %0 to i32
72 ; Function Attrs: nounwind
73 define i32 @ctc(ptr noundef byval(%struct.CST) align 4 %s) {
75 ; CHECK: # %bb.0: # %entry
77 ; CHECK-NEXT: srwi 3, 3, 24
78 ; CHECK-NEXT: stw 4, 24(1)
81 %0 = load i8, ptr %s, align 4
82 %conv = zext i8 %0 to i32
86 ; Function Attrs: nounwind
87 define i32 @sctc(ptr noundef byval(%struct.SCST) align 4 %s) {
89 ; CHECK: # %bb.0: # %entry
91 ; CHECK-NEXT: srawi 3, 3, 24
92 ; CHECK-NEXT: stw 4, 24(1)
95 %0 = load i8, ptr %s, align 4
96 %conv = sext i8 %0 to i32
100 ; Function Attrs: nounwind
101 define i32 @tc44(ptr noundef byval(%struct.ST) align 4 %s) {
103 ; CHECK: # %bb.0: # %entry
104 ; CHECK-NEXT: stw 3, 24(1)
105 ; CHECK-NEXT: stw 4, 28(1)
108 %0 = load i32, ptr %s, align 4
112 ; Function Attrs: nounwind
113 define i32 @tc41(ptr noundef byval(%struct.ST) align 4 %s) {
115 ; CHECK: # %bb.0: # %entry
116 ; CHECK-NEXT: stw 3, 24(1)
117 ; CHECK-NEXT: srawi 3, 3, 24
118 ; CHECK-NEXT: stw 4, 28(1)
121 %0 = load i32, ptr %s, align 4
122 %shr = ashr i32 %0, 24
126 ; Function Attrs: nounwind
127 define i32 @tc42(ptr noundef byval(%struct.ST) align 4 %s) {
129 ; CHECK: # %bb.0: # %entry
130 ; CHECK-NEXT: stw 3, 24(1)
131 ; CHECK-NEXT: srawi 3, 3, 16
132 ; CHECK-NEXT: stw 4, 28(1)
135 %0 = load i32, ptr %s, align 4
136 %shr = ashr i32 %0, 16
140 ; Function Attrs: nounwind
141 define i32 @tc43(ptr noundef byval(%struct.ST) align 4 %s) {
143 ; CHECK: # %bb.0: # %entry
144 ; CHECK-NEXT: stw 3, 24(1)
145 ; CHECK-NEXT: srawi 3, 3, 8
146 ; CHECK-NEXT: stw 4, 28(1)
149 %0 = load i32, ptr %s, align 4
150 %shr = ashr i32 %0, 8
154 ; Function Attrs: nounwind
155 define i32 @utc44(ptr noundef byval(%struct.UST) align 4 %s) {
156 ; CHECK-LABEL: utc44:
157 ; CHECK: # %bb.0: # %entry
158 ; CHECK-NEXT: stw 3, 24(1)
159 ; CHECK-NEXT: stw 4, 28(1)
162 %0 = load i32, ptr %s, align 4
166 ; Function Attrs: nounwind
167 define i32 @utc41(ptr noundef byval(%struct.UST) align 4 %s) {
168 ; CHECK-LABEL: utc41:
169 ; CHECK: # %bb.0: # %entry
170 ; CHECK-NEXT: stw 3, 24(1)
171 ; CHECK-NEXT: srwi 3, 3, 24
172 ; CHECK-NEXT: stw 4, 28(1)
175 %0 = load i32, ptr %s, align 4
176 %shr = lshr i32 %0, 24
180 ; Function Attrs: nounwind
181 define i32 @utc42(ptr noundef byval(%struct.UST) align 4 %s) {
182 ; CHECK-LABEL: utc42:
183 ; CHECK: # %bb.0: # %entry
184 ; CHECK-NEXT: stw 3, 24(1)
185 ; CHECK-NEXT: srwi 3, 3, 16
186 ; CHECK-NEXT: stw 4, 28(1)
189 %0 = load i32, ptr %s, align 4
190 %shr = lshr i32 %0, 16
194 ; Function Attrs: nounwind
195 define i32 @utc43(ptr noundef byval(%struct.UST) align 4 %s) {
196 ; CHECK-LABEL: utc43:
197 ; CHECK: # %bb.0: # %entry
198 ; CHECK-NEXT: stw 3, 24(1)
199 ; CHECK-NEXT: srwi 3, 3, 8
200 ; CHECK-NEXT: stw 4, 28(1)
203 %0 = load i32, ptr %s, align 4
204 %shr = lshr i32 %0, 8