brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.3 KiB · 79d2da2 Raw
76 lines · c
1// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 52// REQUIRES: powerpc-registered-target3// RUN: %clang_cc1 -triple powerpc64le-unknown-linux -O2 -target-cpu pwr7 \4// RUN:   -emit-llvm %s -o - | FileCheck %s5// RUN: %clang_cc1 -triple powerpc64-unknown-aix -O2 -target-cpu pwr7 \6// RUN:   -emit-llvm %s -o - | FileCheck %s7// RUN: not %clang_cc1 -triple powerpc-unknown-aix -O2 -target-cpu pwr7 \8// RUN:   -emit-llvm %s -o - 2>&1 | FileCheck %s --check-prefix=CHECK-32-ERROR9 10// CHECK-LABEL: define{{.*}} i64 @cdtbcd_test(i6411// CHECK-NEXT:  [[ENTRY:.*:]]12// CHECK-NEXT:  [[TMP0:%.*]] = tail call i64  @llvm.ppc.cdtbcdd(i6413// CHECK-NEXT:  ret i64 [[TMP0]]14// CHECK-32-ERROR: error: this builtin is only available on 64-bit targets15// CHECK-32-ERROR: #define __cdtbcd __builtin_ppc_cdtbcd16long long cdtbcd_test(long long ll) {17    return __cdtbcd (ll);18}19 20// CHECK-LABEL: define{{.*}} i32 @cdtbcd_test_ui(i3221// CHECK-NEXT:  [[ENTRY:.*:]]22// CHECK-NEXT:  [[CONV:%.*]] = zext i32 {{.*}} to i6423// CHECK-NEXT:  [[TMP0:%.*]] = tail call i64 @llvm.ppc.cdtbcdd(i64 [[CONV]])24// CHECK-NEXT:  [[CONV1:%.*]] = trunc i64 [[TMP0]] to i3225// CHECK-NEXT:  ret i32 [[CONV1]]26// CHECK-32-ERROR: error: this builtin is only available on 64-bit targets27// CHECK-32-ERROR: #define __cdtbcd __builtin_ppc_cdtbcd28unsigned int cdtbcd_test_ui(unsigned int ui) {29    return __cdtbcd (ui);30}31 32// CHECK-LABEL: define{{.*}} i64 @cbcdtd_test(i6433// CHECK-NEXT:  [[ENTRY:.*:]]34// CHECK-NEXT:  [[TMP0:%.*]] = tail call i64 @llvm.ppc.cbcdtdd(i6435// CHECK-NEXT:  ret i64 [[TMP0]]36// CHECK-32-ERROR: error: this builtin is only available on 64-bit targets37// CHECK-32-ERROR: #define __cbcdtd __builtin_ppc_cbcdtd38long long cbcdtd_test(long long ll) {39    return __cbcdtd (ll);40}41 42// CHECK-LABEL: define{{.*}} i32 @cbcdtd_test_ui(i3243// CHECK-NEXT:  [[ENTRY:.*:]]44// CHECK-NEXT:  [[CONV:%.*]] = zext i32 {{.*}} to i6445// CHECK-NEXT:  [[TMP0:%.*]] = tail call i64 @llvm.ppc.cbcdtdd(i64 [[CONV]])46// CHECK-NEXT:  [[CONV1:%.*]] = trunc i64 [[TMP0]] to i3247// CHECK-NEXT:  ret i32 [[CONV1]]48// CHECK-32-ERROR: error: this builtin is only available on 64-bit targets49// CHECK-32-ERROR: #define __cbcdtd __builtin_ppc_cbcdtd50unsigned int cbcdtd_test_ui(unsigned int ui) {51    return __cbcdtd (ui);52}53 54// CHECK-LABEL: define{{.*}} i64 @addg6s_test(i6455// CHECK-NEXT:  [[ENTRY:.*:]]56// CHECK-NEXT:  [[TMP0:%.*]] = tail call i64 @llvm.ppc.addg6sd(i64 {{.*}}, i64 {{.*}})57// CHECK-NEXT:  ret i64 [[TMP0]]58// CHECK-32-ERROR: error: this builtin is only available on 64-bit targets59// CHECK-32-ERROR: #define __addg6s __builtin_ppc_addg6s60long long addg6s_test(long long ll, long long ll2) {61    return __addg6s (ll, ll2);62}63 64// CHECK-LABEL: define{{.*}} i32 @addg6s_test_ui(i3265// CHECK-NEXT:  [[ENTRY:.*:]]66// CHECK-NEXT:  [[CONV:%.*]] = zext i32 {{.*}} to i6467// CHECK-NEXT:  [[CONV1:%.*]] = zext i32 {{.*}} to i6468// CHECK-NEXT:  [[TMP0:%.*]] = tail call i64 @llvm.ppc.addg6sd(i64 {{.*}}, i6469// CHECK-NEXT:  [[CONV2:%.*]] = trunc i64 [[TMP0]] to i3270// CHECK-NEXT:  ret i32 [[CONV2]]71// CHECK-32-ERROR: error: this builtin is only available on 64-bit targets72// CHECK-32-ERROR: #define __addg6s __builtin_ppc_addg6s73unsigned int addg6s_test_ui(unsigned int ui, unsigned int ui2) {74    return __addg6s (ui, ui2);75}76