File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
llvm/test/Transforms/InstCombine Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -2195,4 +2195,26 @@ define i16 @ashr_umax_demanded(i16 %x) {
2195
2195
ret i16 %shr
2196
2196
}
2197
2197
2198
+ define i128 @shift_zext_nneg (i8 %arg ) {
2199
+ ; CHECK-LABEL: @shift_zext_nneg(
2200
+ ; CHECK-NEXT: [[EXT:%.*]] = zext nneg i8 [[ARG:%.*]] to i128
2201
+ ; CHECK-NEXT: [[SHL:%.*]] = shl nuw i128 1, [[EXT]]
2202
+ ; CHECK-NEXT: ret i128 [[SHL]]
2203
+ ;
2204
+ %ext = zext i8 %arg to i128
2205
+ %shl = shl i128 1 , %ext
2206
+ ret i128 %shl
2207
+ }
2208
+
2209
+ define i129 @shift_zext_not_nneg (i8 %arg ) {
2210
+ ; CHECK-LABEL: @shift_zext_not_nneg(
2211
+ ; CHECK-NEXT: [[EXT:%.*]] = zext nneg i8 [[ARG:%.*]] to i129
2212
+ ; CHECK-NEXT: [[SHL:%.*]] = shl nuw nsw i129 1, [[EXT]]
2213
+ ; CHECK-NEXT: ret i129 [[SHL]]
2214
+ ;
2215
+ %ext = zext i8 %arg to i129
2216
+ %shl = shl i129 1 , %ext
2217
+ ret i129 %shl
2218
+ }
2219
+
2198
2220
declare i16 @llvm.umax.i16 (i16 , i16 )
You can’t perform that action at this time.
0 commit comments