<commit_before>; Test that the StrCatOptimizer works correctly
; RUN: llvm-as < %s | opt -constprop -simplify-libcalls | \
; RUN:   llvm-dis | not grep {call.*llvm.memcpy.i32}

@h = constant [2 x i8] c"h\00"		; <[2 x i8]*> [#uses=1]
@hel = constant [4 x i8] c"hel\00"		; <[4 x i8]*> [#uses=1]
@hello_u = constant [8 x i8] c"hello_u\00"		; <[8 x i8]*> [#uses=1]

declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)

define i32 @main() {
	%h_p = getelementptr [2 x i8]* @h, i32 0, i32 0		; <i8*> [#uses=1]
	%hel_p = getelementptr [4 x i8]* @hel, i32 0, i32 0		; <i8*> [#uses=1]<commit_msg>no reason for simplifylibcalls to simplify intrinsics, instcombine does a fine job.<commit_after>; RUN: llvm-as < %s | opt -constprop -instcombine | llvm-dis | not grep {call.*llvm.memcpy.i32}

@h = constant [2 x i8] c"h\00"		; <[2 x i8]*> [#uses=1]
@hel = constant [4 x i8] c"hel\00"		; <[4 x i8]*> [#uses=1]
@hello_u = constant [8 x i8] c"hello_u\00"		; <[8 x i8]*> [#uses=1]

declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)

define i32 @main() {
	%h_p = getelementptr [2 x i8]* @h, i32 0, i32 0		; <i8*> [#uses=1]
	%hel_p = getelementptr [4 x i8]* @hel, i32 0, i32 0		; <i8*> [#uses=1]
{'fraction_non_alphanumeric': 0.2051063829787234, 'fraction_numerical': 0.0902127659574468, 'mean_word_length': 3.7611336032388665, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5820171', 'n_tokens_mistral': 600, 'n_tokens_neox': 553, 'n_words': 165}