File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
llvm/test/Transforms/InstCombine Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,21 @@ define i32 @ashr_lshr2(i32 %x, i32 %y) {
6161 ret i32 %ret
6262}
6363
64+ define i128 @ashr_lshr2_i128 (i128 %x , i128 %y ) {
65+ ; CHECK-LABEL: @ashr_lshr2_i128(
66+ ; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i128 [[X:%.*]], 5
67+ ; CHECK-NEXT: [[L:%.*]] = lshr i128 [[X]], [[Y:%.*]]
68+ ; CHECK-NEXT: [[R:%.*]] = ashr exact i128 [[X]], [[Y]]
69+ ; CHECK-NEXT: [[RET:%.*]] = select i1 [[CMP]], i128 [[L]], i128 [[R]]
70+ ; CHECK-NEXT: ret i128 [[RET]]
71+ ;
72+ %cmp = icmp sgt i128 %x , 5
73+ %l = lshr i128 %x , %y
74+ %r = ashr exact i128 %x , %y
75+ %ret = select i1 %cmp , i128 %l , i128 %r
76+ ret i128 %ret
77+ }
78+
6479define <2 x i32 > @ashr_lshr_splat_vec (<2 x i32 > %x , <2 x i32 > %y ) {
6580; CHECK-LABEL: @ashr_lshr_splat_vec(
6681; CHECK-NEXT: [[CMP12:%.*]] = ashr <2 x i32> [[X:%.*]], [[Y:%.*]]
You can’t perform that action at this time.
0 commit comments