xref: /llvm-project/llvm/test/CodeGen/PowerPC/ppc64-icbt-pwr7.ll (revision f71a9e8bb7223f3f739458840ffec8ceacf4526c)
1; Test the ICBT instruction is not emitted on POWER7
2; Based on the ppc64-prefetch.ll test
3; RUN: not --crash llc -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 < %s 2>&1 | FileCheck %s
4
5declare void @llvm.prefetch(ptr, i32, i32, i32)
6
7define void @test(ptr %a, ...) nounwind {
8entry:
9  call void @llvm.prefetch(ptr %a, i32 0, i32 3, i32 0)
10  ret void
11
12; FIXME: Crashing is not really the correct behavior here, we really should just emit nothing
13; CHECK: Cannot select: {{0x[0-9,a-f]+|t[0-9]+}}: ch = Prefetch
14; CHECK: {{0x[0-9,a-f]+|t[0-9]+}}: i32 = TargetConstant<0>
15; CHECK-NEXT: {{0x[0-9,a-f]+|t[0-9]+}}: i32 = TargetConstant<3>
16; CHECK-NEXT: {{0x[0-9,a-f]+|t[0-9]+}}: i32 = TargetConstant<0>
17
18}
19
20