[llvm] bd89b1f - [Tests] Preserve original test scenario

Dávid Bolvanský via llvm-commits llvm-commits at lists.llvm.org
Sun May 7 07:55:33 PDT 2023


Author: Dávid Bolvanský
Date: 2023-05-07T16:55:23+02:00
New Revision: bd89b1f1eab2897aafb00980874326003637c18e

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

LOG: [Tests] Preserve original test scenario

Added: 
    

Modified: 
    llvm/test/Transforms/InstCombine/memchr.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/InstCombine/memchr.ll b/llvm/test/Transforms/InstCombine/memchr.ll
index f4b6734cfd7d..2074fd7ba4f7 100644
--- a/llvm/test/Transforms/InstCombine/memchr.ll
+++ b/llvm/test/Transforms/InstCombine/memchr.ll
@@ -172,15 +172,13 @@ define i1 @test14(i32 %C) {
   ret i1 %cmp
 }
 
-define i1 @test15(i32 %C) {
+define i1 @test15(i32 %C, i32 %n) {
 ; CHECK-LABEL: @test15(
-; CHECK-NEXT:    [[TMP1:%.*]] = icmp eq i32 [[C:%.*]], 0
-; CHECK-NEXT:    [[TMP2:%.*]] = and i32 [[C]], -2
-; CHECK-NEXT:    [[TMP3:%.*]] = icmp eq i32 [[TMP2]], 254
-; CHECK-NEXT:    [[TMP4:%.*]] = or i1 [[TMP3]], [[TMP1]]
-; CHECK-NEXT:    ret i1 [[TMP4]]
+; CHECK-NEXT:    [[DST:%.*]] = call ptr @memchr(ptr nonnull @negative, i32 [[C:%.*]], i32 [[N:%.*]])
+; CHECK-NEXT:    [[CMP:%.*]] = icmp ne ptr [[DST]], null
+; CHECK-NEXT:    ret i1 [[CMP]]
 ;
-  %dst = call ptr @memchr(ptr @negative, i32 %C, i32 3)
+  %dst = call ptr @memchr(ptr @negative, i32 %C, i32 %n)
   %cmp = icmp ne ptr %dst, null
   ret i1 %cmp
 }


        


More information about the llvm-commits mailing list