[llvm] a99b97b - [InstSimplify] Add additional icmp of gep folding test; NFC
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 4 09:27:38 PST 2020
Author: Nikita Popov
Date: 2020-03-04T18:27:01+01:00
New Revision: a99b97b81881f0c8b70f829d7d836b2539d1b6a6
URL: https://github.com/llvm/llvm-project/commit/a99b97b81881f0c8b70f829d7d836b2539d1b6a6
DIFF: https://github.com/llvm/llvm-project/commit/a99b97b81881f0c8b70f829d7d836b2539d1b6a6.diff
LOG: [InstSimplify] Add additional icmp of gep folding test; NFC
Added:
Modified:
llvm/test/Transforms/InstSimplify/compare.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/InstSimplify/compare.ll b/llvm/test/Transforms/InstSimplify/compare.ll
index c23fab8e91c2..c4e791fc6695 100644
--- a/llvm/test/Transforms/InstSimplify/compare.ll
+++ b/llvm/test/Transforms/InstSimplify/compare.ll
@@ -299,6 +299,16 @@ define i1 @gep17() {
ret i1 %cmp
}
+define i1 @gep_same_base_constant_indices(i8* %a) {
+; CHECK-LABEL: @gep_same_base_constant_indices(
+; CHECK-NEXT: ret i1 icmp slt (i8* getelementptr (i8, i8* null, i64 1), i8* getelementptr (i8, i8* null, i64 10))
+;
+ %arrayidx1 = getelementptr inbounds i8, i8* %a, i64 1
+ %arrayidx2 = getelementptr inbounds i8, i8* %a, i64 10
+ %cmp = icmp slt i8* %arrayidx1, %arrayidx2
+ ret i1 %cmp
+}
+
define i1 @zext(i32 %x) {
; CHECK-LABEL: @zext(
; CHECK-NEXT: ret i1 true
More information about the llvm-commits
mailing list