-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PowerPC] Semachecking for XL compat builtin icbt
This patch is in a series of patches to provide builtins for compatibility with the XL compiler. This patch adds semachecking for an already implemented builtin, `__icbt`. `__icbt` is only valid for Power8 and up. Reviewed By: #powerpc, nemanjai Differential Revision: https://reviews.llvm.org/D105834
- Loading branch information
Showing
6 changed files
with
92 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// REQUIRES: powerpc-registered-target | ||
// RUN: %clang_cc1 -triple powerpc64-unknown-unknown -emit-llvm %s \ | ||
// RUN: -target-cpu pwr8 -o - | FileCheck %s -check-prefix=CHECK-PWR8 | ||
// RUN: %clang_cc1 -triple powerpc64le-unknown-unknown -emit-llvm %s \ | ||
// RUN: -target-cpu pwr8 -o - | FileCheck %s -check-prefix=CHECK-PWR8 | ||
// RUN: %clang_cc1 -triple powerpc64-unknown-aix -emit-llvm %s \ | ||
// RUN: -target-cpu pwr8 -o - | FileCheck %s -check-prefix=CHECK-PWR8 | ||
// RUN: %clang_cc1 -triple powerpc-unknown-aix %s -emit-llvm %s \ | ||
// RUN: -target-cpu pwr8 -o - | FileCheck %s -check-prefix=CHECK-PWR8 | ||
// RUN: not %clang_cc1 -triple powerpc64-unknown-unknown -emit-llvm %s \ | ||
// RUN: -target-cpu pwr7 2>&1 | FileCheck %s -check-prefix=CHECK-NOPWR8 | ||
// RUN: not %clang_cc1 -triple powerpc64-unknown-aix -emit-llvm %s \ | ||
// RUN: -target-cpu pwr7 2>&1 | FileCheck %s -check-prefix=CHECK-NOPWR8 | ||
// RUN: not %clang_cc1 -triple powerpc-unknown-aix %s -emit-llvm %s \ | ||
// RUN: -target-cpu pwr7 2>&1 | FileCheck %s -check-prefix=CHECK-NOPWR8 | ||
|
||
extern void *a; | ||
|
||
void test_icbt() { | ||
// CHECK-LABEL: @test_icbt( | ||
|
||
__icbt(a); | ||
// CHECK-PWR8: call void @llvm.ppc.icbt(i8* %0) | ||
// CHECK-NOPWR8: error: this builtin is only valid on POWER8 or later CPUs | ||
} | ||
|
||
void test_builtin_ppc_icbt() { | ||
// CHECK-LABEL: @test_builtin_ppc_icbt( | ||
|
||
__builtin_ppc_icbt(a); | ||
// CHECK-PWR8: call void @llvm.ppc.icbt(i8* %0) | ||
// CHECK-NOPWR8: error: this builtin is only valid on POWER8 or later CPUs | ||
} |
Oops, something went wrong.