Skip to content

Commit 1d3e38b

Browse files
committed
[NewGVN] Add test for #53218 (NFC)
1 parent e158add commit 1d3e38b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

llvm/test/Transforms/NewGVN/flags-simplify.ll

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,21 @@ entry: ; preds = %if.then
4242
ret i64 %conv7
4343
}
4444

45+
define i64 @lshr_lsh_nuw(i64 %tmp) {
46+
; CHECK-LABEL: @lshr_lsh_nuw(
47+
; CHECK-NEXT: entry:
48+
; CHECK-NEXT: [[CONV3:%.*]] = shl i64 [[TMP:%.*]], 32
49+
; CHECK-NEXT: store i64 [[CONV3]], ptr @f, align 8
50+
; CHECK-NEXT: ret i64 [[TMP]]
51+
;
52+
entry:
53+
%conv3 = shl nuw i64 %tmp, 32
54+
store i64 %conv3, i64* @f, align 8
55+
%sext = shl i64 %tmp, 32
56+
%lshr = lshr i64 %sext, 32
57+
ret i64 %lshr
58+
}
59+
4560
define i32 @udiv_exact_mul(i32 %x, i32 %y, i1 %arg2) {
4661
; CHECK-LABEL: @udiv_exact_mul(
4762
; CHECK-NEXT: br i1 [[ARG2:%.*]], label [[BB2:%.*]], label [[BB1:%.*]]

0 commit comments

Comments
 (0)