[llvm] ed72f40 - Revert "[NFC] Precommited tests from D73000"

Dávid Bolvanský via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 16 11:38:44 PDT 2022


Author: Dávid Bolvanský
Date: 2022-06-16T20:38:35+02:00
New Revision: ed72f40d0be7a91836abf7cba5d4d6aeb6471b9b

URL: https://github.com/llvm/llvm-project/commit/ed72f40d0be7a91836abf7cba5d4d6aeb6471b9b
DIFF: https://github.com/llvm/llvm-project/commit/ed72f40d0be7a91836abf7cba5d4d6aeb6471b9b.diff

LOG: Revert "[NFC] Precommited tests from D73000"

This reverts commit 814c9f4e0c4dd72c9df600ec45e40efd72ef55f0.

Added: 
    

Modified: 
    

Removed: 
    llvm/test/Transforms/InstCombine/memchr-7.ll


################################################################################
diff  --git a/llvm/test/Transforms/InstCombine/memchr-7.ll b/llvm/test/Transforms/InstCombine/memchr-7.ll
deleted file mode 100644
index 6310da886decb..0000000000000
--- a/llvm/test/Transforms/InstCombine/memchr-7.ll
+++ /dev/null
@@ -1,97 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -instcombine -S | FileCheck %s
-
- at .str = private unnamed_addr constant [27 x i8] c"abcdefghijklmnopqrstuvwxyz\00", align 1
- at .str.1 = private unnamed_addr constant [2 x i8] c"\0D\0A", align 1
-
-declare i8* @strchr(i8*, i32)
-declare i8* @memchr(i8*, i32, i64)
-
-define zeroext i1 @strchr_to_memchr_n_equals_len(i32 %c) {
-; CHECK-LABEL: @strchr_to_memchr_n_equals_len(
-; CHECK-NEXT:    [[MEMCHR:%.*]] = tail call i8* @memchr(i8* noundef nonnull dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 [[C:%.*]], i64 27)
-; CHECK-NEXT:    [[CMP:%.*]] = icmp ne i8* [[MEMCHR]], null
-; CHECK-NEXT:    ret i1 [[CMP]]
-;
-  %call = tail call i8* @strchr(i8* nonnull dereferenceable(27) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %c)
-  %cmp = icmp ne i8* %call, null
-  ret i1 %cmp
-}
-
-define zeroext i1 @memchr_n_equals_len(i32 %c) {
-; CHECK-LABEL: @memchr_n_equals_len(
-; CHECK-NEXT:    [[CALL:%.*]] = tail call i8* @memchr(i8* noundef nonnull dereferenceable(3) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 [[C:%.*]], i64 2)
-; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i8* [[CALL]], null
-; CHECK-NEXT:    ret i1 [[CMP]]
-;
-  %call = tail call i8* @memchr(i8* nonnull dereferenceable(3) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %c, i64 2)
-  %cmp = icmp eq i8* %call, null
-  ret i1 %cmp
-}
-
-define zeroext i1 @memchr_n_less_than_len(i32 %c) {
-; CHECK-LABEL: @memchr_n_less_than_len(
-; CHECK-NEXT:    [[CALL:%.*]] = tail call i8* @memchr(i8* noundef nonnull dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 [[C:%.*]], i64 15)
-; CHECK-NEXT:    [[CMP:%.*]] = icmp ne i8* [[CALL]], null
-; CHECK-NEXT:    ret i1 [[CMP]]
-;
-  %call = tail call i8* @memchr(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %c, i64 15)
-  %cmp = icmp ne i8* %call, null
-  ret i1 %cmp
-}
-
-
-define zeroext i1 @memchr_n_more_than_len(i32 %c) {
-; CHECK-LABEL: @memchr_n_more_than_len(
-; CHECK-NEXT:    [[CALL:%.*]] = tail call i8* @memchr(i8* noundef nonnull dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 [[C:%.*]], i64 30)
-; CHECK-NEXT:    [[CMP:%.*]] = icmp ne i8* [[CALL]], null
-; CHECK-NEXT:    ret i1 [[CMP]]
-;
-  %call = tail call i8* @memchr(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %c, i64 30)
-  %cmp = icmp ne i8* %call, null
-  ret i1 %cmp
-}
-
-; Negative test - no comparison with zero
-
-define i8* @memchr_no_zero_cmp(i32 %c) {
-; CHECK-LABEL: @memchr_no_zero_cmp(
-; CHECK-NEXT:    [[MEMCHR:%.*]] = tail call i8* @memchr(i8* noundef nonnull dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 [[C:%.*]], i64 27)
-; CHECK-NEXT:    ret i8* [[MEMCHR]]
-;
-  %call = tail call i8* @strchr(i8* nonnull dereferenceable(27) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %c)
-  ret i8* %call
-}
-
-define i8* @memchr_no_zero_cmp2(i32 %c) {
-; CHECK-LABEL: @memchr_no_zero_cmp2(
-; CHECK-NEXT:    [[MEMCHR:%.*]] = tail call i8* @memchr(i8* noundef nonnull dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 [[C:%.*]], i64 3)
-; CHECK-NEXT:    ret i8* [[MEMCHR]]
-;
-  %call = tail call i8* @strchr(i8* nonnull dereferenceable(3) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %c)
-  ret i8* %call
-}
-
-; Negative test - opt for size
-
-define zeroext i1 @memchr_n_equals_len_minsize(i32 %c) minsize {
-; CHECK-LABEL: @memchr_n_equals_len_minsize(
-; CHECK-NEXT:    [[MEMCHR:%.*]] = tail call i8* @memchr(i8* noundef nonnull dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 [[C:%.*]], i64 27)
-; CHECK-NEXT:    [[CMP:%.*]] = icmp ne i8* [[MEMCHR]], null
-; CHECK-NEXT:    ret i1 [[CMP]]
-;
-  %call = tail call i8* @strchr(i8* nonnull dereferenceable(27) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %c)
-  %cmp = icmp ne i8* %call, null
-  ret i1 %cmp
-}
-
-define zeroext i1 @memchr_n_equals_len2_minsize(i32 %c) minsize {
-; CHECK-LABEL: @memchr_n_equals_len2_minsize(
-; CHECK-NEXT:    [[CALL:%.*]] = tail call i8* @memchr(i8* noundef nonnull dereferenceable(3) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 [[C:%.*]], i64 2)
-; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i8* [[CALL]], null
-; CHECK-NEXT:    ret i1 [[CMP]]
-;
-  %call = tail call i8* @memchr(i8* nonnull dereferenceable(3) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %c, i64 2)
-  %cmp = icmp eq i8* %call, null
-  ret i1 %cmp
-}


        


More information about the llvm-commits mailing list