Skip to content

Commit 2ec9d2e

Browse files
dtcxzywZijunZhaoCCK
authored andcommitted
[ConstraintElim] Add missing checks in test_overflow_in_negate_constraint (llvm#65841)
This patch adds missing checks in the function `test_overflow_in_negate_constraint`. Related commit: 0a0181d
1 parent 920ef7c commit 2ec9d2e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

llvm/test/Transforms/ConstraintElimination/overflows.ll

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ bb:
1818
}
1919

2020
define i1 @test_overflow_in_negate_constraint(i8 %x, i64 %y) {
21+
; CHECK-LABEL: define i1 @test_overflow_in_negate_constraint
22+
; CHECK-SAME: (i8 [[X:%.*]], i64 [[Y:%.*]]) {
23+
; CHECK-NEXT: bb:
24+
; CHECK-NEXT: [[ZEXT:%.*]] = zext i8 [[X]] to i64
25+
; CHECK-NEXT: [[SHL:%.*]] = shl nuw nsw i64 [[ZEXT]], 63
26+
; CHECK-NEXT: [[ICMP:%.*]] = icmp uge i64 [[Y]], [[SHL]]
27+
; CHECK-NEXT: ret i1 [[ICMP]]
28+
;
2129
bb:
2230
%zext = zext i8 %x to i64
2331
%shl = shl nuw nsw i64 %zext, 63

0 commit comments

Comments
 (0)