[llvm] 21cc740 - [ConstraintElim] Add extra test with chained GEPs without inbounds.
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 24 13:52:14 PST 2022
Author: Florian Hahn
Date: 2022-12-24T21:51:26Z
New Revision: 21cc7400f7c8caa02902b201bbe78336f4f7008a
URL: https://github.com/llvm/llvm-project/commit/21cc7400f7c8caa02902b201bbe78336f4f7008a
DIFF: https://github.com/llvm/llvm-project/commit/21cc7400f7c8caa02902b201bbe78336f4f7008a.diff
LOG: [ConstraintElim] Add extra test with chained GEPs without inbounds.
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 3ec6ce4f13fc..b853c4035478 100644
--- a/llvm/test/Transforms/ConstraintElimination/gep-chains.ll
+++ b/llvm/test/Transforms/ConstraintElimination/gep-chains.ll
@@ -371,3 +371,19 @@ define i1 @gep_add_1_ult_var_idx_no_inbounds(ptr %dst, ptr %upper, i8 %len, i8 %
%res.2 = xor i1 %res.1, %cmp.idx.3
ret i1 %res.2
}
+
+define i1 @test_chained_no_inbounds(ptr %A, ptr %B) {
+entry:
+ %B.1 = getelementptr i8, ptr %B, i64 1
+ %B.2 = getelementptr i8, ptr %B.1, i64 1
+ %c.1 = icmp ugt ptr %A, null
+ %c.2 = icmp ugt ptr %B.1, %B.2
+ %or = or i1 %c.1, %c.2
+ br i1 %or, label %then, label %else
+
+then:
+ ret i1 true
+
+else:
+ ret i1 false
+}
More information about the llvm-commits
mailing list