| 1 |
// RUN: %clang_cc1 %s -triple powerpc64-ibm-aix-xcoff -o /dev/null -emit-llvm -verify=aix |
| 2 |
// RUN: %clang_cc1 %s -triple powerpc-ibm-aix-xcoff -o /dev/null -emit-llvm -verify=aix |
| 3 |
// RUN: %clang_cc1 %s -triple powerpc64-unknown-linux-gnu -o /dev/null -emit-llvm -verify=good |
| 4 |
// RUN: %clang_cc1 %s -triple powerpc-unknown-linux-gnu -o /dev/null -emit-llvm -verify=good |
| 5 |
// RUN: %clang_cc1 %s -triple powerpc64le-unknown-linux-gnu -o /dev/null -emit-llvm -verify=good |
| 6 |
// RUN: %clang_cc1 %s -triple powerpc64le-unknown-linux-gnu -target-feature +pcrelative-memops -o /dev/null -emit-llvm -verify=good |
| 7 |
// RUN: %clang_cc1 %s -triple powerpc64le-unknown-linux-gnu -target-feature +longcall -o /dev/null -emit-llvm -verify=longcall |
| 8 |
// RUN: %clang_cc1 %s -triple powerpc64le-unknown-linux-gnu -target-feature +pcrelative-memops -target-feature +longcall -o /dev/null -emit-llvm -verify=good |
| 9 |
|
| 10 |
int foo(int x) { |
| 11 |
return x; |
| 12 |
} |
| 13 |
|
| 14 |
int bar(int x) |
| 15 |
{ |
| 16 |
// good-no-diagnostics |
| 17 |
// longcall-error@+2 {{'musttail' attribute for this call is impossible because long calls cannot be tail called on PPC}} |
| 18 |
// aix-error@+1 {{'musttail' attribute is not supported on AIX}} |
| 19 |
[[clang::musttail]] return foo(1); |
| 20 |
} |