<commit_before><commit_msg>testcase for PR1307<commit_after>; RUN: llvm-as < %s | opt -simplify-libcalls -instcombine | llvm-dis > %t &&
; RUN: grep '@str,.*i64 3' %t && 
; RUN: grep '@str1,.*i64 7' %t &&
; RUN: grep 'ret i8.*null' %t
; PR1307

@str = internal constant [5 x i8] c"foog\00"
@str1 = internal constant [8 x i8] c"blahhh!\00"
@str2 = internal constant [5 x i8] c"Ponk\00"

define i8* @test1() {
        %tmp3 = tail call i8* @strchr( i8* getelementptr ([5 x i8]* @str, i32 0, i32 2), i32 103 )              ; <i8*> [#uses=1]
        ret i8* %tmp3
}

declare i8* @strchr(i8*, i32)

define i8* @test2() {
        %tmp3 = tail call i8* @strchr( i8* getelementptr ([8 x i8]* @str1, i32 0, i32 2), i32 0 )               ; <i8*> [#uses=1]
        ret i8* %tmp3
}

define i8* @test3() {
entry:
        %tmp3 = tail call i8* @strchr( i8* getelementptr ([5 x i8]* @str2, i32 0, i32 1), i32 80 )              ; <i8*> [#uses=1]
        ret i8* %tmp3
}

{'fraction_non_alphanumeric': 0.18448637316561844, 'fraction_numerical': 0.10377358490566038, 'mean_word_length': 2.6311787072243344, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7589564', 'n_tokens_mistral': 459, 'n_tokens_neox': 413, 'n_words': 128}