Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions llvm/test/Transforms/AggressiveInstCombine/memchr.ll
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,17 @@ entry:
%memchr = call ptr @memchr(ptr @str_long, i32 %x, i64 8)
ret ptr %memchr
}


define ptr @test_memchr_non_constant_length2(i32 %x, i64 %len) {
; CHECK-LABEL: define ptr @test_memchr_non_constant_length2(
; CHECK-SAME: i32 [[X:%.*]], i64 [[LEN:%.*]]) {
; CHECK-NEXT: [[ENTRY:.*:]]
; CHECK-NEXT: ; We want to check that the compiler still calls memchr:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this comment before the header of this function.

Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-w5ssp-1/llvm-project/github-pull-requests/build/bin/opt -S -passes=aggressive-instcombine --memchr-inline-threshold=5 < /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-w5ssp-1/llvm-project/github-pull-requests/llvm/test/Transforms/AggressiveInstCombine/memchr.ll | /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-w5ssp-1/llvm-project/github-pull-requests/build/bin/FileCheck /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-w5ssp-1/llvm-project/github-pull-requests/llvm/test/Transforms/AggressiveInstCombine/memchr.ll
+ /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-w5ssp-1/llvm-project/github-pull-requests/build/bin/opt -S -passes=aggressive-instcombine --memchr-inline-threshold=5
+ /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-w5ssp-1/llvm-project/github-pull-requests/build/bin/FileCheck /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-w5ssp-1/llvm-project/github-pull-requests/llvm/test/Transforms/AggressiveInstCombine/memchr.ll
/var/lib/buildkite-agent/builds/linux-56-59b8f5d88-w5ssp-1/llvm-project/github-pull-requests/llvm/test/Transforms/AggressiveInstCombine/memchr.ll:170:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: ; We want to check that the compiler still calls memchr:
              ^
<stdin>:133:7: note: scanning from here
entry:
      ^
<stdin>:134:8: note: possible intended match here
 %memchr = call ptr @memchr(ptr @str, i32 %x, i64 %len)
       ^

Input file: <stdin>
Check file: /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-w5ssp-1/llvm-project/github-pull-requests/llvm/test/Transforms/AggressiveInstCombine/memchr.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            .
            .
            .
          128:  %memchr = call ptr @memchr(ptr @str_long, i32 %x, i64 8) 
          129:  ret ptr %memchr 
          130: } 
          131:  
          132: define ptr @test_memchr_non_constant_length2(i32 %x, i64 %len) { 
          133: entry: 
next:170'0           X error: no match found
          134:  %memchr = call ptr @memchr(ptr @str, i32 %x, i64 %len) 
next:170'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next:170'1            ?                                                 possible intended match
          135:  ret ptr %memchr 
next:170'0     ~~~~~~~~~~~~~~~~~
          136: } 
next:170'0     ~~
>>>>>>

--

; CHECK-NEXT: [[MEMCHR:%.*]] = call ptr @memchr(ptr @str, i32 [[X]], i64 [[LEN]])
; CHECK-NEXT: ret ptr [[MEMCHR]]
;
entry:
%memchr = call ptr @memchr(ptr @str, i32 %x, i64 %len)
ret ptr %memchr
}
Loading