From 9039fc77c3f850ae29c5ea5b0de0e8218bea5ef5 Mon Sep 17 00:00:00 2001 From: Kit Barton Date: Mon, 30 Mar 2015 18:46:15 +0000 Subject: [PATCH] [PPC] Modify HTM and crypto intrinsics to inherit from GCCBuiltin There was a change to the way some of the HTM and crypto builtins are being handled in Clang. Previously, some of the builtins were dealt with in the CodeGenFunction::EmitPPCBuiltinExpr method (in order to do range checking on constant arguments). These check will been moved to Sema http://reviews.llvm.org/D8672), which means those builtins will not be handled in the EmitPPCBuiltinExpr method anymore. As a result, the definition of the intrinsics in IntrinsicsPowerPC.td needs to be modified to inherit from the GCCBuiltin definition. http://reviews.llvm.org/D8673 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233581 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/IR/IntrinsicsPowerPC.td | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/include/llvm/IR/IntrinsicsPowerPC.td b/include/llvm/IR/IntrinsicsPowerPC.td index 95fc3e5ecec..6e133143d6e 100644 --- a/include/llvm/IR/IntrinsicsPowerPC.td +++ b/include/llvm/IR/IntrinsicsPowerPC.td @@ -563,11 +563,12 @@ let TargetPrefix = "ppc" in { // All PPC intrinsics start with "llvm.ppc.". Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -// These need diagnostics for invalid arguments so don't inherit from GCCBuiltin def int_ppc_altivec_crypto_vshasigmad : + GCCBuiltin<"__builtin_altivec_crypto_vshasigmad">, Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; def int_ppc_altivec_crypto_vshasigmaw : + GCCBuiltin<"__builtin_altivec_crypto_vshasigmaw">, Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; } @@ -801,20 +802,20 @@ let TargetPrefix = "ppc" in { // All intrinsics start with "llvm.ppc.". let TargetPrefix = "ppc" in { // All intrinsics start with "llvm.ppc.". -def int_ppc_tbegin : +def int_ppc_tbegin : GCCBuiltin<"__builtin_tbegin">, Intrinsic<[llvm_i32_ty], [llvm_i32_ty], []>; -def int_ppc_tend : +def int_ppc_tend : GCCBuiltin<"__builtin_tend">, Intrinsic<[llvm_i32_ty], [llvm_i32_ty], []>; def int_ppc_tabort : GCCBuiltin<"__builtin_tabort">, Intrinsic<[llvm_i32_ty], [llvm_i32_ty], []>; -def int_ppc_tabortwc : +def int_ppc_tabortwc : GCCBuiltin<"__builtin_tabortwc">, Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], []>; -def int_ppc_tabortwci : +def int_ppc_tabortwci : GCCBuiltin<"__builtin_tabortwci">, Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], []>; -def int_ppc_tabortdc : +def int_ppc_tabortdc : GCCBuiltin<"__builtin_tabortdc">, Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], []>; -def int_ppc_tabortdci : +def int_ppc_tabortdci : GCCBuiltin<"__builtin_tabortdci">, Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], []>; def int_ppc_tcheck : GCCBuiltin<"__builtin_tcheck">, @@ -823,7 +824,7 @@ def int_ppc_treclaim : GCCBuiltin<"__builtin_treclaim">, Intrinsic<[llvm_i32_ty], [llvm_i32_ty], []>; def int_ppc_trechkpt : GCCBuiltin<"__builtin_trechkpt">, Intrinsic<[llvm_i32_ty], [], []>; -def int_ppc_tsr : +def int_ppc_tsr : GCCBuiltin<"__builtin_tsr">, Intrinsic<[llvm_i32_ty], [llvm_i32_ty], []>; def int_ppc_get_texasr : GCCBuiltin<"__builtin_get_texasr">, -- 2.34.1