xref: /llvm-project/llvm/test/Transforms/InstCombine/X86/x86-crc32-demanded.ll (revision acdc419c897f8a9414c7a00c8908ac32312afee2)
1; RUN: opt < %s -passes=instcombine -S | FileCheck %s
2
3; crc32 with 64-bit destination zeros high 32-bit.
4; rdar://9467055
5
6define i64 @test() nounwind {
7entry:
8; CHECK: test
9; CHECK: tail call i64 @llvm.x86.sse42.crc32.64.64
10; CHECK-NOT: and
11; CHECK: ret
12  %0 = tail call i64 @llvm.x86.sse42.crc32.64.64(i64 0, i64 4) nounwind
13  %1 = and i64 %0, 4294967295
14  ret i64 %1
15}
16
17declare i64 @llvm.x86.sse42.crc32.64.64(i64, i64) nounwind readnone
18