1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -fast-isel -fast-isel-abort=3 -mtriple=x86_64-unknown-unknown -mattr=-sse4.2,+crc32 | FileCheck %s
3 ; RUN: llc < %s -fast-isel -fast-isel-abort=3 -mtriple=x86_64-unknown-unknown -mattr=+crc32 | FileCheck %s
5 ; NOTE: This should use IR equivalent to what is generated by clang/test/CodeGen/sse42-builtins.c
7 ; Note: %a1 is i32 as FastISel can't handle i8/i16 arguments.
8 define i64 @test_mm_crc64_u8(i64 %a0, i32 %a1) nounwind{
9 ; CHECK-LABEL: test_mm_crc64_u8:
11 ; CHECK-NEXT: crc32b %sil, %edi
12 ; CHECK-NEXT: movl %edi, %eax
14 %trunc = trunc i32 %a1 to i8
15 %res = call i64 @llvm.x86.sse42.crc32.64.8(i64 %a0, i8 %trunc)
18 declare i64 @llvm.x86.sse42.crc32.64.8(i64, i8) nounwind readnone
20 define i64 @test_mm_crc64_u64(i64 %a0, i64 %a1) nounwind{
21 ; CHECK-LABEL: test_mm_crc64_u64:
23 ; CHECK-NEXT: movq %rdi, %rax
24 ; CHECK-NEXT: crc32q %rsi, %rax
26 %res = call i64 @llvm.x86.sse42.crc32.64.64(i64 %a0, i64 %a1)
29 declare i64 @llvm.x86.sse42.crc32.64.64(i64, i64) nounwind readnone