1 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
2 ; RUN: --ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s
3 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
4 ; RUN: --ppc-asm-full-reg-names -mcpu=pwr7 < %s | FileCheck %s
5 ; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-linux-gnu \
6 ; RUN: --ppc-asm-full-reg-names -mcpu=pwr7 < %s | FileCheck %s
7 ; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-aix \
8 ; RUN: --ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s -check-prefix=AIX
9 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-aix \
10 ; RUN: --ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s -check-prefix=AIX
11 ; RUN: llc -mtriple=powerpc-ibm-aix-xcoff -filetype=obj -o %t_32.o < %s
12 ; RUN: llvm-readobj --exception-section %t_32.o | FileCheck %s --check-prefix=OBJ
14 ; Check that we do not crash in object mode
15 ; OBJ: Exception section {
16 ; OBJ-NEXT: Symbol: .test__trap_annotation (3)
18 !1 = !{!"ppc-trap-reason", !"1", !"2"}
19 declare void @llvm.ppc.trap(i32 %a)
20 declare void @llvm.ppc.tw(i32 %a, i32 %b, i32 immarg)
21 define dso_local void @test__trap_annotation(i32 %a) {
22 ; CHECK-LABEL: test__trap_annotation:
24 ; CHECK-NEXT: twi 24, r3, 0
27 ; AIX-LABEL: test__trap_annotation:
30 ; AIX-NEXT: .except .test__trap_annotation, 1, 2
31 ; AIX-NEXT: twi 24, r3, 0
33 call void @llvm.ppc.trap(i32 %a), !annotation !1
37 define dso_local void @test__tw_annotation(i32 %a) {
38 ; CHECK-LABEL: test__tw_annotation:
40 ; CHECK-NEXT: twi 0, r3, 4
43 ; AIX-LABEL: test__tw_annotation:
46 ; AIX-NEXT: .except .test__tw_annotation, 1, 2
47 ; AIX-NEXT: twi 0, r3, 4
49 call void @llvm.ppc.tw(i32 4, i32 %a, i32 0), !annotation !1