<commit_before>; Zero byte allocas should be deleted.

; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep alloca

declare void %use(...)
void %test() {
	%X = alloca [0 x int]
	call void(...)* %use([0 x int] *%X)
	%Y = alloca int, uint 0
	call void(...)* %use(int* %Y)
	%Z = alloca {}
	call void(...)* %use({}* %Z)
	ret void
}<commit_msg>add a simple case where instcombine can detect and remove a dead alloca<commit_after>; Zero byte allocas should be deleted.

; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep alloca

declare void %use(...)
void %test() {
	%X = alloca [0 x int]
	call void(...)* %use([0 x int] *%X)
	%Y = alloca int, uint 0
	call void(...)* %use(int* %Y)
	%Z = alloca {}
	call void(...)* %use({}* %Z)
	ret void
}

void %test2() {
	%A = alloca int    ;; dead.
	store int 123, int* %A
	ret void
}

void %test3() {
	%A = alloca {int}    ;; dead.
	%B = getelementptr {int}* %A, int 0, uint 0
	store int 123, int* %B
	ret void
}
{'fraction_non_alphanumeric': 0.18932527693857, 'fraction_numerical': 0.016112789526686808, 'mean_word_length': 3.0242914979757085, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '6329296', 'n_tokens_mistral': 420, 'n_tokens_neox': 404, 'n_words': 146}