[llvm] bbe402b - [ConstraintElim] Add missing CHECK lines.
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 24 13:52:48 PST 2022
Author: Florian Hahn
Date: 2022-12-24T21:52:28Z
New Revision: bbe402b33a23fa1114310b227207565b1e91e6f1
URL: https://github.com/llvm/llvm-project/commit/bbe402b33a23fa1114310b227207565b1e91e6f1
DIFF: https://github.com/llvm/llvm-project/commit/bbe402b33a23fa1114310b227207565b1e91e6f1.diff
LOG: [ConstraintElim] Add missing CHECK lines.
Added:
Modified:
llvm/test/Transforms/ConstraintElimination/gep-chains.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/ConstraintElimination/gep-chains.ll b/llvm/test/Transforms/ConstraintElimination/gep-chains.ll
index b853c4035478..705d7f5e8e68 100644
--- a/llvm/test/Transforms/ConstraintElimination/gep-chains.ll
+++ b/llvm/test/Transforms/ConstraintElimination/gep-chains.ll
@@ -373,6 +373,19 @@ define i1 @gep_add_1_ult_var_idx_no_inbounds(ptr %dst, ptr %upper, i8 %len, i8 %
}
define i1 @test_chained_no_inbounds(ptr %A, ptr %B) {
+; CHECK-LABEL: @test_chained_no_inbounds(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[B_1:%.*]] = getelementptr i8, ptr [[B:%.*]], i64 1
+; CHECK-NEXT: [[B_2:%.*]] = getelementptr i8, ptr [[B_1]], i64 1
+; CHECK-NEXT: [[C_1:%.*]] = icmp ugt ptr [[A:%.*]], null
+; CHECK-NEXT: [[C_2:%.*]] = icmp ugt ptr [[B_1]], [[B_2]]
+; CHECK-NEXT: [[OR:%.*]] = or i1 [[C_1]], [[C_2]]
+; CHECK-NEXT: br i1 [[OR]], label [[THEN:%.*]], label [[ELSE:%.*]]
+; CHECK: then:
+; CHECK-NEXT: ret i1 true
+; CHECK: else:
+; CHECK-NEXT: ret i1 false
+;
entry:
%B.1 = getelementptr i8, ptr %B, i64 1
%B.2 = getelementptr i8, ptr %B.1, i64 1
More information about the llvm-commits
mailing list