<commit_before>; bswap should be constant folded when it is passed a constant argument

; RUN: llvm-as < %s | llc -march=x86 -enable-x86-dag-isel | grep bswapl | wc -l | grep 3 &&
; RUN: llvm-as < %s | llc -march=x86 -enable-x86-dag-isel | grep rolw | wc -l | grep 1

declare ushort %llvm.bswap.i16(ushort)
declare uint %llvm.bswap.i32(uint)
declare ulong %llvm.bswap.i64(ulong)

ushort %W(ushort %A) {
	%Z = call ushort %llvm.bswap.i16(ushort %A)
	ret ushort %Z
}

uint %X(uint %A) {
	%Z = call uint %llvm.bswap.i32(uint %A)
	ret uint %Z
}

ulong %Y(ulong %A) {
	%Z = call ulong %llvm.bswap.i64(ulong %A)
	ret ulong %Z
}
<commit_msg>X86 dag isel is now (soon) the default.<commit_after>; bswap should be constant folded when it is passed a constant argument

; RUN: llvm-as < %s | llc -march=x86 | grep bswapl | wc -l | grep 3 &&
; RUN: llvm-as < %s | llc -march=x86 | grep rolw | wc -l | grep 1

declare ushort %llvm.bswap.i16(ushort)
declare uint %llvm.bswap.i32(uint)
declare ulong %llvm.bswap.i64(ulong)

ushort %W(ushort %A) {
	%Z = call ushort %llvm.bswap.i16(ushort %A)
	ret ushort %Z
}

uint %X(uint %A) {
	%Z = call uint %llvm.bswap.i32(uint %A)
	ret uint %Z
}

ulong %Y(ulong %A) {
	%Z = call ulong %llvm.bswap.i64(ulong %A)
	ret ulong %Z
}

{'fraction_non_alphanumeric': 0.152555910543131, 'fraction_numerical': 0.03354632587859425, 'mean_word_length': 3.556363636363636, 'pattern_counts': {'":': 0, '<': 7, '<?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': '5417530', 'n_tokens_mistral': 604, 'n_tokens_neox': 577, 'n_words': 163}