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