| 1 |
// REQUIRES: powerpc-registered-target |
| 2 |
// RUN: %clang_cc1 -triple powerpc-unknown-aix \ |
| 3 |
// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefixes=AIX,AIX32 |
| 4 |
// RUN: %clang_cc1 -triple powerpc64-unknown-aix \ |
| 5 |
// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefixes=AIX,AIX64 |
| 6 |
|
| 7 |
// AIX-LABEL: define void @retVoid() |
| 8 |
void retVoid(void) {} |
| 9 |
|
| 10 |
// AIX-LABEL: define signext i8 @retChar(i8 noundef signext %x) |
| 11 |
char retChar(char x) { return x; } |
| 12 |
|
| 13 |
// AIX-LABEL: define signext i16 @retShort(i16 noundef signext %x) |
| 14 |
short retShort(short x) { return x; } |
| 15 |
|
| 16 |
// AIX32-LABEL: define i32 @retInt(i32 noundef %x) |
| 17 |
// AIX64-LABEL: define signext i32 @retInt(i32 noundef signext %x) |
| 18 |
int retInt(int x) { return 1; } |
| 19 |
|
| 20 |
// AIX-LABEL: define i64 @retLongLong(i64 noundef %x) |
| 21 |
long long retLongLong(long long x) { return x; } |
| 22 |
|
| 23 |
// AIX-LABEL: define signext i8 @retEnumChar(i8 noundef signext %x) |
| 24 |
enum EnumChar : char { IsChar }; |
| 25 |
enum EnumChar retEnumChar(enum EnumChar x) { |
| 26 |
return x; |
| 27 |
} |
| 28 |
|
| 29 |
// AIX32-LABEL: define i32 @retEnumInt(i32 noundef %x) |
| 30 |
// AIX64-LABEL: define signext i32 @retEnumInt(i32 noundef signext %x) |
| 31 |
enum EnumInt : int { IsInt }; |
| 32 |
enum EnumInt retEnumInt(enum EnumInt x) { |
| 33 |
return x; |
| 34 |
} |