From 17b547a62ff80435d10bbbfd30a798b51a081385 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Sat, 9 Sep 2023 15:43:06 +0800 Subject: [PATCH] [ConstraintElim] Add missing check in test_overflow_in_negate_constraint --- llvm/test/Transforms/ConstraintElimination/overflows.ll | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/llvm/test/Transforms/ConstraintElimination/overflows.ll b/llvm/test/Transforms/ConstraintElimination/overflows.ll index 1fd6bdbf6615b..556ae0c56f9aa 100644 --- a/llvm/test/Transforms/ConstraintElimination/overflows.ll +++ b/llvm/test/Transforms/ConstraintElimination/overflows.ll @@ -18,6 +18,14 @@ bb: } define i1 @test_overflow_in_negate_constraint(i8 %x, i64 %y) { +; CHECK-LABEL: define i1 @test_overflow_in_negate_constraint +; CHECK-SAME: (i8 [[X:%.*]], i64 [[Y:%.*]]) { +; CHECK-NEXT: bb: +; CHECK-NEXT: [[ZEXT:%.*]] = zext i8 [[X]] to i64 +; CHECK-NEXT: [[SHL:%.*]] = shl nuw nsw i64 [[ZEXT]], 63 +; CHECK-NEXT: [[ICMP:%.*]] = icmp uge i64 [[Y]], [[SHL]] +; CHECK-NEXT: ret i1 [[ICMP]] +; bb: %zext = zext i8 %x to i64 %shl = shl nuw nsw i64 %zext, 63