2006-03-26 04:37:19 +02:00
|
|
|
//===- IntrinsicsPowerPC.td - Defines PowerPC intrinsics ---*- tablegen -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-29 23:59:10 +01:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2006-03-26 04:37:19 +02:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file defines all of the PowerPC-specific intrinsics.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2006-04-03 17:43:07 +02:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Definitions for all PowerPC intrinsics.
|
|
|
|
//
|
|
|
|
|
2006-06-06 23:29:23 +02:00
|
|
|
// Non-altivec intrinsics.
|
|
|
|
let TargetPrefix = "ppc" in { // All intrinsics start with "llvm.ppc.".
|
2006-10-24 03:07:39 +02:00
|
|
|
// dcba/dcbf/dcbi/dcbst/dcbt/dcbz/dcbzl(PPC970) instructions.
|
2010-08-06 01:36:21 +02:00
|
|
|
def int_ppc_dcba : Intrinsic<[], [llvm_ptr_ty], []>;
|
|
|
|
def int_ppc_dcbf : Intrinsic<[], [llvm_ptr_ty], []>;
|
|
|
|
def int_ppc_dcbi : Intrinsic<[], [llvm_ptr_ty], []>;
|
|
|
|
def int_ppc_dcbst : Intrinsic<[], [llvm_ptr_ty], []>;
|
|
|
|
def int_ppc_dcbt : Intrinsic<[], [llvm_ptr_ty], []>;
|
|
|
|
def int_ppc_dcbtst: Intrinsic<[], [llvm_ptr_ty], []>;
|
|
|
|
def int_ppc_dcbz : Intrinsic<[], [llvm_ptr_ty], []>;
|
|
|
|
def int_ppc_dcbzl : Intrinsic<[], [llvm_ptr_ty], []>;
|
2008-08-22 19:20:54 +02:00
|
|
|
|
|
|
|
// sync instruction
|
2010-08-06 01:36:21 +02:00
|
|
|
def int_ppc_sync : Intrinsic<[], [], []>;
|
2006-06-06 23:29:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2006-04-03 17:43:07 +02:00
|
|
|
let TargetPrefix = "ppc" in { // All PPC intrinsics start with "llvm.ppc.".
|
|
|
|
/// PowerPC_Vec_Intrinsic - Base class for all altivec intrinsics.
|
2008-11-13 10:08:33 +01:00
|
|
|
class PowerPC_Vec_Intrinsic<string GCCIntSuffix, list<LLVMType> ret_types,
|
|
|
|
list<LLVMType> param_types,
|
2006-04-03 17:43:07 +02:00
|
|
|
list<IntrinsicProperty> properties>
|
|
|
|
: GCCBuiltin<!strconcat("__builtin_altivec_", GCCIntSuffix)>,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<ret_types, param_types, properties>;
|
2006-04-03 17:43:07 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// PowerPC Altivec Intrinsic Class Definitions.
|
|
|
|
//
|
|
|
|
|
2006-04-03 19:20:06 +02:00
|
|
|
/// PowerPC_Vec_FF_Intrinsic - A PowerPC intrinsic that takes one v4f32
|
|
|
|
/// vector and returns one. These intrinsics have no side effects.
|
|
|
|
class PowerPC_Vec_FF_Intrinsic<string GCCIntSuffix>
|
|
|
|
: PowerPC_Vec_Intrinsic<GCCIntSuffix,
|
2008-11-13 10:08:33 +01:00
|
|
|
[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
|
2006-04-03 19:20:06 +02:00
|
|
|
|
2006-04-03 17:43:07 +02:00
|
|
|
/// PowerPC_Vec_FFF_Intrinsic - A PowerPC intrinsic that takes two v4f32
|
|
|
|
/// vectors and returns one. These intrinsics have no side effects.
|
|
|
|
class PowerPC_Vec_FFF_Intrinsic<string GCCIntSuffix>
|
|
|
|
: PowerPC_Vec_Intrinsic<GCCIntSuffix,
|
2008-11-13 10:08:33 +01:00
|
|
|
[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-04-03 17:43:07 +02:00
|
|
|
|
|
|
|
/// PowerPC_Vec_BBB_Intrinsic - A PowerPC intrinsic that takes two v16f8
|
|
|
|
/// vectors and returns one. These intrinsics have no side effects.
|
|
|
|
class PowerPC_Vec_BBB_Intrinsic<string GCCIntSuffix>
|
|
|
|
: PowerPC_Vec_Intrinsic<GCCIntSuffix,
|
2008-11-13 10:08:33 +01:00
|
|
|
[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-04-03 17:43:07 +02:00
|
|
|
|
|
|
|
/// PowerPC_Vec_HHH_Intrinsic - A PowerPC intrinsic that takes two v8i16
|
|
|
|
/// vectors and returns one. These intrinsics have no side effects.
|
|
|
|
class PowerPC_Vec_HHH_Intrinsic<string GCCIntSuffix>
|
|
|
|
: PowerPC_Vec_Intrinsic<GCCIntSuffix,
|
2008-11-13 10:08:33 +01:00
|
|
|
[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-04-03 17:43:07 +02:00
|
|
|
|
|
|
|
/// PowerPC_Vec_WWW_Intrinsic - A PowerPC intrinsic that takes two v4i32
|
|
|
|
/// vectors and returns one. These intrinsics have no side effects.
|
|
|
|
class PowerPC_Vec_WWW_Intrinsic<string GCCIntSuffix>
|
|
|
|
: PowerPC_Vec_Intrinsic<GCCIntSuffix,
|
2008-11-13 10:08:33 +01:00
|
|
|
[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-04-03 17:43:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// PowerPC Altivec Intrinsic Definitions.
|
|
|
|
|
2006-03-26 04:37:19 +02:00
|
|
|
let TargetPrefix = "ppc" in { // All intrinsics start with "llvm.ppc.".
|
2006-04-06 00:18:01 +02:00
|
|
|
// Data Stream Control.
|
|
|
|
def int_ppc_altivec_dss : GCCBuiltin<"__builtin_altivec_dss">,
|
2010-08-06 01:36:21 +02:00
|
|
|
Intrinsic<[], [llvm_i32_ty], []>;
|
2006-04-06 00:18:01 +02:00
|
|
|
def int_ppc_altivec_dssall : GCCBuiltin<"__builtin_altivec_dssall">,
|
2010-08-06 01:36:21 +02:00
|
|
|
Intrinsic<[], [], []>;
|
2006-04-06 00:18:01 +02:00
|
|
|
def int_ppc_altivec_dst : GCCBuiltin<"__builtin_altivec_dst">,
|
2010-03-24 00:46:07 +01:00
|
|
|
Intrinsic<[],
|
2008-11-13 10:08:33 +01:00
|
|
|
[llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty],
|
2010-08-06 01:36:21 +02:00
|
|
|
[]>;
|
2006-04-06 00:18:01 +02:00
|
|
|
def int_ppc_altivec_dstt : GCCBuiltin<"__builtin_altivec_dstt">,
|
2010-03-24 00:46:07 +01:00
|
|
|
Intrinsic<[],
|
2008-11-13 10:08:33 +01:00
|
|
|
[llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty],
|
2010-08-06 01:36:21 +02:00
|
|
|
[]>;
|
2006-04-06 00:18:01 +02:00
|
|
|
def int_ppc_altivec_dstst : GCCBuiltin<"__builtin_altivec_dstst">,
|
2010-03-24 00:46:07 +01:00
|
|
|
Intrinsic<[],
|
2008-11-13 10:08:33 +01:00
|
|
|
[llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty],
|
2010-08-06 01:36:21 +02:00
|
|
|
[]>;
|
2006-04-06 00:18:01 +02:00
|
|
|
def int_ppc_altivec_dststt : GCCBuiltin<"__builtin_altivec_dststt">,
|
2010-03-24 00:46:07 +01:00
|
|
|
Intrinsic<[],
|
2008-11-13 10:08:33 +01:00
|
|
|
[llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty],
|
2010-08-06 01:36:21 +02:00
|
|
|
[]>;
|
2006-04-06 00:18:01 +02:00
|
|
|
|
2006-04-05 02:03:03 +02:00
|
|
|
// VSCR access.
|
|
|
|
def int_ppc_altivec_mfvscr : GCCBuiltin<"__builtin_altivec_mfvscr">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v8i16_ty], [], [IntrReadMem]>;
|
2006-04-05 02:03:03 +02:00
|
|
|
def int_ppc_altivec_mtvscr : GCCBuiltin<"__builtin_altivec_mtvscr">,
|
2010-08-06 01:36:21 +02:00
|
|
|
Intrinsic<[], [llvm_v4i32_ty], []>;
|
2006-04-05 02:03:03 +02:00
|
|
|
|
|
|
|
|
2006-03-28 05:52:36 +02:00
|
|
|
// Loads. These don't map directly to GCC builtins because they represent the
|
|
|
|
// source address with a single pointer.
|
|
|
|
def int_ppc_altivec_lvx :
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_ptr_ty], [IntrReadMem]>;
|
2006-03-28 05:52:36 +02:00
|
|
|
def int_ppc_altivec_lvxl :
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_ptr_ty], [IntrReadMem]>;
|
2006-03-28 05:52:36 +02:00
|
|
|
def int_ppc_altivec_lvebx :
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v16i8_ty], [llvm_ptr_ty], [IntrReadMem]>;
|
2006-03-28 05:52:36 +02:00
|
|
|
def int_ppc_altivec_lvehx :
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v8i16_ty], [llvm_ptr_ty], [IntrReadMem]>;
|
2006-03-28 05:52:36 +02:00
|
|
|
def int_ppc_altivec_lvewx :
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_ptr_ty], [IntrReadMem]>;
|
2006-03-28 00:05:34 +02:00
|
|
|
|
2006-03-28 05:52:36 +02:00
|
|
|
// Stores. These don't map directly to GCC builtins because they represent the
|
|
|
|
// source address with a single pointer.
|
|
|
|
def int_ppc_altivec_stvx :
|
2010-08-06 01:36:21 +02:00
|
|
|
Intrinsic<[], [llvm_v4i32_ty, llvm_ptr_ty], []>;
|
2006-03-28 05:52:36 +02:00
|
|
|
def int_ppc_altivec_stvxl :
|
2010-08-06 01:36:21 +02:00
|
|
|
Intrinsic<[], [llvm_v4i32_ty, llvm_ptr_ty], []>;
|
2006-03-28 05:52:36 +02:00
|
|
|
def int_ppc_altivec_stvebx :
|
2010-08-06 01:36:21 +02:00
|
|
|
Intrinsic<[], [llvm_v16i8_ty, llvm_ptr_ty], []>;
|
2006-03-28 05:52:36 +02:00
|
|
|
def int_ppc_altivec_stvehx :
|
2010-08-06 01:36:21 +02:00
|
|
|
Intrinsic<[], [llvm_v8i16_ty, llvm_ptr_ty], []>;
|
2006-03-28 05:52:36 +02:00
|
|
|
def int_ppc_altivec_stvewx :
|
2010-08-06 01:36:21 +02:00
|
|
|
Intrinsic<[], [llvm_v4i32_ty, llvm_ptr_ty], []>;
|
2006-03-26 04:37:19 +02:00
|
|
|
|
|
|
|
// Comparisons setting a vector.
|
|
|
|
def int_ppc_altivec_vcmpbfp : GCCBuiltin<"__builtin_altivec_vcmpbfp">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 04:37:19 +02:00
|
|
|
def int_ppc_altivec_vcmpeqfp : GCCBuiltin<"__builtin_altivec_vcmpeqfp">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 04:37:19 +02:00
|
|
|
def int_ppc_altivec_vcmpgefp : GCCBuiltin<"__builtin_altivec_vcmpgefp">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 04:37:19 +02:00
|
|
|
def int_ppc_altivec_vcmpgtfp : GCCBuiltin<"__builtin_altivec_vcmpgtfp">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 04:37:19 +02:00
|
|
|
|
|
|
|
def int_ppc_altivec_vcmpequw : GCCBuiltin<"__builtin_altivec_vcmpequw">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 04:37:19 +02:00
|
|
|
def int_ppc_altivec_vcmpgtsw : GCCBuiltin<"__builtin_altivec_vcmpgtsw">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 04:37:19 +02:00
|
|
|
def int_ppc_altivec_vcmpgtuw : GCCBuiltin<"__builtin_altivec_vcmpgtuw">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 04:37:19 +02:00
|
|
|
|
|
|
|
def int_ppc_altivec_vcmpequh : GCCBuiltin<"__builtin_altivec_vcmpequh">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 04:37:19 +02:00
|
|
|
def int_ppc_altivec_vcmpgtsh : GCCBuiltin<"__builtin_altivec_vcmpgtsh">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 04:37:19 +02:00
|
|
|
def int_ppc_altivec_vcmpgtuh : GCCBuiltin<"__builtin_altivec_vcmpgtuh">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 04:37:19 +02:00
|
|
|
|
|
|
|
def int_ppc_altivec_vcmpequb : GCCBuiltin<"__builtin_altivec_vcmpequb">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 04:37:19 +02:00
|
|
|
def int_ppc_altivec_vcmpgtsb : GCCBuiltin<"__builtin_altivec_vcmpgtsb">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 04:37:19 +02:00
|
|
|
def int_ppc_altivec_vcmpgtub : GCCBuiltin<"__builtin_altivec_vcmpgtub">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 04:37:19 +02:00
|
|
|
|
2006-03-26 09:50:25 +02:00
|
|
|
// Predicate Comparisons. The first operand specifies interpretation of CR6.
|
|
|
|
def int_ppc_altivec_vcmpbfp_p : GCCBuiltin<"__builtin_altivec_vcmpbfp_p">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4f32_ty,llvm_v4f32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 09:50:25 +02:00
|
|
|
def int_ppc_altivec_vcmpeqfp_p : GCCBuiltin<"__builtin_altivec_vcmpeqfp_p">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4f32_ty,llvm_v4f32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 09:50:25 +02:00
|
|
|
def int_ppc_altivec_vcmpgefp_p : GCCBuiltin<"__builtin_altivec_vcmpgefp_p">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4f32_ty,llvm_v4f32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 09:50:25 +02:00
|
|
|
def int_ppc_altivec_vcmpgtfp_p : GCCBuiltin<"__builtin_altivec_vcmpgtfp_p">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4f32_ty,llvm_v4f32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 09:50:25 +02:00
|
|
|
|
|
|
|
def int_ppc_altivec_vcmpequw_p : GCCBuiltin<"__builtin_altivec_vcmpequw_p">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4i32_ty,llvm_v4i32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 09:50:25 +02:00
|
|
|
def int_ppc_altivec_vcmpgtsw_p : GCCBuiltin<"__builtin_altivec_vcmpgtsw_p">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4i32_ty,llvm_v4i32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 09:50:25 +02:00
|
|
|
def int_ppc_altivec_vcmpgtuw_p : GCCBuiltin<"__builtin_altivec_vcmpgtuw_p">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4i32_ty,llvm_v4i32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 09:50:25 +02:00
|
|
|
|
|
|
|
def int_ppc_altivec_vcmpequh_p : GCCBuiltin<"__builtin_altivec_vcmpequh_p">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v8i16_ty,llvm_v8i16_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 09:50:25 +02:00
|
|
|
def int_ppc_altivec_vcmpgtsh_p : GCCBuiltin<"__builtin_altivec_vcmpgtsh_p">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v8i16_ty,llvm_v8i16_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 09:50:25 +02:00
|
|
|
def int_ppc_altivec_vcmpgtuh_p : GCCBuiltin<"__builtin_altivec_vcmpgtuh_p">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v8i16_ty,llvm_v8i16_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 09:50:25 +02:00
|
|
|
|
|
|
|
def int_ppc_altivec_vcmpequb_p : GCCBuiltin<"__builtin_altivec_vcmpequb_p">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v16i8_ty,llvm_v16i8_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 09:50:25 +02:00
|
|
|
def int_ppc_altivec_vcmpgtsb_p : GCCBuiltin<"__builtin_altivec_vcmpgtsb_p">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v16i8_ty,llvm_v16i8_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 09:50:25 +02:00
|
|
|
def int_ppc_altivec_vcmpgtub_p : GCCBuiltin<"__builtin_altivec_vcmpgtub_p">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v16i8_ty,llvm_v16i8_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-04-03 17:43:07 +02:00
|
|
|
}
|
2006-03-26 09:50:25 +02:00
|
|
|
|
2006-04-05 01:13:21 +02:00
|
|
|
// Vector average.
|
|
|
|
def int_ppc_altivec_vavgsb : PowerPC_Vec_BBB_Intrinsic<"vavgsb">;
|
|
|
|
def int_ppc_altivec_vavgsh : PowerPC_Vec_HHH_Intrinsic<"vavgsh">;
|
|
|
|
def int_ppc_altivec_vavgsw : PowerPC_Vec_WWW_Intrinsic<"vavgsw">;
|
|
|
|
def int_ppc_altivec_vavgub : PowerPC_Vec_BBB_Intrinsic<"vavgub">;
|
|
|
|
def int_ppc_altivec_vavguh : PowerPC_Vec_HHH_Intrinsic<"vavguh">;
|
|
|
|
def int_ppc_altivec_vavguw : PowerPC_Vec_WWW_Intrinsic<"vavguw">;
|
|
|
|
|
2006-04-03 17:43:07 +02:00
|
|
|
// Vector maximum.
|
|
|
|
def int_ppc_altivec_vmaxfp : PowerPC_Vec_FFF_Intrinsic<"vmaxfp">;
|
|
|
|
def int_ppc_altivec_vmaxsb : PowerPC_Vec_BBB_Intrinsic<"vmaxsb">;
|
|
|
|
def int_ppc_altivec_vmaxsh : PowerPC_Vec_HHH_Intrinsic<"vmaxsh">;
|
|
|
|
def int_ppc_altivec_vmaxsw : PowerPC_Vec_WWW_Intrinsic<"vmaxsw">;
|
|
|
|
def int_ppc_altivec_vmaxub : PowerPC_Vec_BBB_Intrinsic<"vmaxub">;
|
|
|
|
def int_ppc_altivec_vmaxuh : PowerPC_Vec_HHH_Intrinsic<"vmaxuh">;
|
|
|
|
def int_ppc_altivec_vmaxuw : PowerPC_Vec_WWW_Intrinsic<"vmaxuw">;
|
|
|
|
|
|
|
|
// Vector minimum.
|
|
|
|
def int_ppc_altivec_vminfp : PowerPC_Vec_FFF_Intrinsic<"vminfp">;
|
|
|
|
def int_ppc_altivec_vminsb : PowerPC_Vec_BBB_Intrinsic<"vminsb">;
|
|
|
|
def int_ppc_altivec_vminsh : PowerPC_Vec_HHH_Intrinsic<"vminsh">;
|
|
|
|
def int_ppc_altivec_vminsw : PowerPC_Vec_WWW_Intrinsic<"vminsw">;
|
|
|
|
def int_ppc_altivec_vminub : PowerPC_Vec_BBB_Intrinsic<"vminub">;
|
|
|
|
def int_ppc_altivec_vminuh : PowerPC_Vec_HHH_Intrinsic<"vminuh">;
|
|
|
|
def int_ppc_altivec_vminuw : PowerPC_Vec_WWW_Intrinsic<"vminuw">;
|
|
|
|
|
|
|
|
// Saturating adds.
|
|
|
|
def int_ppc_altivec_vaddubs : PowerPC_Vec_BBB_Intrinsic<"vaddubs">;
|
|
|
|
def int_ppc_altivec_vaddsbs : PowerPC_Vec_BBB_Intrinsic<"vaddsbs">;
|
|
|
|
def int_ppc_altivec_vadduhs : PowerPC_Vec_HHH_Intrinsic<"vadduhs">;
|
|
|
|
def int_ppc_altivec_vaddshs : PowerPC_Vec_HHH_Intrinsic<"vaddshs">;
|
|
|
|
def int_ppc_altivec_vadduws : PowerPC_Vec_WWW_Intrinsic<"vadduws">;
|
|
|
|
def int_ppc_altivec_vaddsws : PowerPC_Vec_WWW_Intrinsic<"vaddsws">;
|
|
|
|
def int_ppc_altivec_vaddcuw : PowerPC_Vec_WWW_Intrinsic<"vaddcuw">;
|
|
|
|
|
|
|
|
// Saturating subs.
|
|
|
|
def int_ppc_altivec_vsububs : PowerPC_Vec_BBB_Intrinsic<"vsububs">;
|
|
|
|
def int_ppc_altivec_vsubsbs : PowerPC_Vec_BBB_Intrinsic<"vsubsbs">;
|
|
|
|
def int_ppc_altivec_vsubuhs : PowerPC_Vec_HHH_Intrinsic<"vsubuhs">;
|
|
|
|
def int_ppc_altivec_vsubshs : PowerPC_Vec_HHH_Intrinsic<"vsubshs">;
|
|
|
|
def int_ppc_altivec_vsubuws : PowerPC_Vec_WWW_Intrinsic<"vsubuws">;
|
|
|
|
def int_ppc_altivec_vsubsws : PowerPC_Vec_WWW_Intrinsic<"vsubsws">;
|
|
|
|
def int_ppc_altivec_vsubcuw : PowerPC_Vec_WWW_Intrinsic<"vsubcuw">;
|
|
|
|
|
|
|
|
let TargetPrefix = "ppc" in { // All PPC intrinsics start with "llvm.ppc.".
|
|
|
|
// Saturating multiply-adds.
|
2006-03-28 06:15:58 +02:00
|
|
|
def int_ppc_altivec_vmhaddshs : GCCBuiltin<"__builtin_altivec_vmhaddshs">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty,
|
2006-04-11 00:02:59 +02:00
|
|
|
llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
|
2006-03-28 06:15:58 +02:00
|
|
|
def int_ppc_altivec_vmhraddshs : GCCBuiltin<"__builtin_altivec_vmhraddshs">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty,
|
2006-04-11 00:02:59 +02:00
|
|
|
llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>;
|
2006-03-26 04:37:19 +02:00
|
|
|
|
2006-03-28 00:05:34 +02:00
|
|
|
def int_ppc_altivec_vmaddfp : GCCBuiltin<"__builtin_altivec_vmaddfp">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty,
|
2006-04-11 00:02:59 +02:00
|
|
|
llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
|
2006-03-28 00:05:34 +02:00
|
|
|
def int_ppc_altivec_vnmsubfp : GCCBuiltin<"__builtin_altivec_vnmsubfp">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty,
|
2006-04-11 00:02:59 +02:00
|
|
|
llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
|
2006-03-28 00:05:34 +02:00
|
|
|
|
2006-04-11 00:02:59 +02:00
|
|
|
// Vector Multiply Sum Intructions.
|
2006-03-30 20:52:02 +02:00
|
|
|
def int_ppc_altivec_vmsummbm : GCCBuiltin<"__builtin_altivec_vmsummbm">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v16i8_ty, llvm_v16i8_ty,
|
2006-04-11 00:02:59 +02:00
|
|
|
llvm_v4i32_ty], [IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
def int_ppc_altivec_vmsumshm : GCCBuiltin<"__builtin_altivec_vmsumshm">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty,
|
2006-04-11 00:02:59 +02:00
|
|
|
llvm_v4i32_ty], [IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
def int_ppc_altivec_vmsumshs : GCCBuiltin<"__builtin_altivec_vmsumshs">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty,
|
2006-04-11 00:02:59 +02:00
|
|
|
llvm_v4i32_ty], [IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
def int_ppc_altivec_vmsumubm : GCCBuiltin<"__builtin_altivec_vmsumubm">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v16i8_ty, llvm_v16i8_ty,
|
2006-04-11 00:02:59 +02:00
|
|
|
llvm_v4i32_ty], [IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
def int_ppc_altivec_vmsumuhm : GCCBuiltin<"__builtin_altivec_vmsumuhm">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty,
|
2006-04-11 00:02:59 +02:00
|
|
|
llvm_v4i32_ty], [IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
def int_ppc_altivec_vmsumuhs : GCCBuiltin<"__builtin_altivec_vmsumuhs">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty,
|
2006-04-11 00:02:59 +02:00
|
|
|
llvm_v4i32_ty], [IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
|
2006-04-11 00:02:59 +02:00
|
|
|
// Vector Multiply Intructions.
|
2006-03-30 20:52:02 +02:00
|
|
|
def int_ppc_altivec_vmulesb : GCCBuiltin<"__builtin_altivec_vmulesb">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
def int_ppc_altivec_vmulesh : GCCBuiltin<"__builtin_altivec_vmulesh">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
def int_ppc_altivec_vmuleub : GCCBuiltin<"__builtin_altivec_vmuleub">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
def int_ppc_altivec_vmuleuh : GCCBuiltin<"__builtin_altivec_vmuleuh">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
|
|
|
|
def int_ppc_altivec_vmulosb : GCCBuiltin<"__builtin_altivec_vmulosb">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
def int_ppc_altivec_vmulosh : GCCBuiltin<"__builtin_altivec_vmulosh">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
def int_ppc_altivec_vmuloub : GCCBuiltin<"__builtin_altivec_vmuloub">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
def int_ppc_altivec_vmulouh : GCCBuiltin<"__builtin_altivec_vmulouh">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
|
2006-04-11 00:02:59 +02:00
|
|
|
// Vector Sum Intructions.
|
2006-03-28 00:05:34 +02:00
|
|
|
def int_ppc_altivec_vsumsws : GCCBuiltin<"__builtin_altivec_vsumsws">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-28 00:05:34 +02:00
|
|
|
def int_ppc_altivec_vsum2sws : GCCBuiltin<"__builtin_altivec_vsum2sws">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-28 00:05:34 +02:00
|
|
|
def int_ppc_altivec_vsum4sbs : GCCBuiltin<"__builtin_altivec_vsum4sbs">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v16i8_ty, llvm_v4i32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-28 00:05:34 +02:00
|
|
|
def int_ppc_altivec_vsum4shs : GCCBuiltin<"__builtin_altivec_vsum4shs">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v4i32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-28 00:05:34 +02:00
|
|
|
def int_ppc_altivec_vsum4ubs : GCCBuiltin<"__builtin_altivec_vsum4ubs">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v16i8_ty, llvm_v4i32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-28 00:05:34 +02:00
|
|
|
|
2006-04-05 02:49:14 +02:00
|
|
|
// Other multiplies.
|
|
|
|
def int_ppc_altivec_vmladduhm : GCCBuiltin<"__builtin_altivec_vmladduhm">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty,
|
2006-04-11 00:02:59 +02:00
|
|
|
llvm_v8i16_ty], [IntrNoMem]>;
|
2006-04-05 02:49:14 +02:00
|
|
|
|
2006-03-30 20:52:02 +02:00
|
|
|
// Packs.
|
|
|
|
def int_ppc_altivec_vpkpx : GCCBuiltin<"__builtin_altivec_vpkpx">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v8i16_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
def int_ppc_altivec_vpkshss : GCCBuiltin<"__builtin_altivec_vpkshss">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v16i8_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
def int_ppc_altivec_vpkshus : GCCBuiltin<"__builtin_altivec_vpkshus">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v16i8_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
def int_ppc_altivec_vpkswss : GCCBuiltin<"__builtin_altivec_vpkswss">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v16i8_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
def int_ppc_altivec_vpkswus : GCCBuiltin<"__builtin_altivec_vpkswus">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v8i16_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
// vpkuhum is lowered to a shuffle.
|
|
|
|
def int_ppc_altivec_vpkuhus : GCCBuiltin<"__builtin_altivec_vpkuhus">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v16i8_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
// vpkuwum is lowered to a shuffle.
|
|
|
|
def int_ppc_altivec_vpkuwus : GCCBuiltin<"__builtin_altivec_vpkuwus">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v8i16_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
|
|
|
|
// Unpacks.
|
|
|
|
def int_ppc_altivec_vupkhpx : GCCBuiltin<"__builtin_altivec_vupkhpx">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty], [IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
def int_ppc_altivec_vupkhsb : GCCBuiltin<"__builtin_altivec_vupkhsb">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty], [IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
def int_ppc_altivec_vupkhsh : GCCBuiltin<"__builtin_altivec_vupkhsh">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty], [IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
def int_ppc_altivec_vupklpx : GCCBuiltin<"__builtin_altivec_vupklpx">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty], [IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
def int_ppc_altivec_vupklsb : GCCBuiltin<"__builtin_altivec_vupklsb">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty], [IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
def int_ppc_altivec_vupklsh : GCCBuiltin<"__builtin_altivec_vupklsh">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty], [IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
|
2006-03-28 00:05:34 +02:00
|
|
|
|
2006-04-05 01:25:02 +02:00
|
|
|
// FP <-> integer conversion.
|
2006-03-26 04:37:19 +02:00
|
|
|
def int_ppc_altivec_vcfsx : GCCBuiltin<"__builtin_altivec_vcfsx">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4f32_ty], [llvm_v4i32_ty, llvm_i32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 04:37:19 +02:00
|
|
|
def int_ppc_altivec_vcfux : GCCBuiltin<"__builtin_altivec_vcfux">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4f32_ty], [llvm_v4i32_ty, llvm_i32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-04-05 01:25:02 +02:00
|
|
|
def int_ppc_altivec_vctsxs : GCCBuiltin<"__builtin_altivec_vctsxs">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_i32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-04-05 01:25:02 +02:00
|
|
|
def int_ppc_altivec_vctuxs : GCCBuiltin<"__builtin_altivec_vctuxs">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_i32_ty],
|
2006-04-11 00:02:59 +02:00
|
|
|
[IntrNoMem]>;
|
2006-03-26 04:37:19 +02:00
|
|
|
|
2006-03-28 04:28:48 +02:00
|
|
|
def int_ppc_altivec_vrfim : GCCBuiltin<"__builtin_altivec_vrfim">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
|
2006-03-28 04:28:48 +02:00
|
|
|
def int_ppc_altivec_vrfin : GCCBuiltin<"__builtin_altivec_vrfin">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
|
2006-03-28 04:28:48 +02:00
|
|
|
def int_ppc_altivec_vrfip : GCCBuiltin<"__builtin_altivec_vrfip">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
|
2006-03-28 04:28:48 +02:00
|
|
|
def int_ppc_altivec_vrfiz : GCCBuiltin<"__builtin_altivec_vrfiz">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
|
2006-04-03 19:20:06 +02:00
|
|
|
}
|
2006-04-05 03:15:54 +02:00
|
|
|
|
|
|
|
def int_ppc_altivec_vsl : PowerPC_Vec_WWW_Intrinsic<"vsl">;
|
2006-04-03 19:20:06 +02:00
|
|
|
def int_ppc_altivec_vslo : PowerPC_Vec_WWW_Intrinsic<"vslo">;
|
2006-04-05 03:15:54 +02:00
|
|
|
|
2006-04-03 19:20:06 +02:00
|
|
|
def int_ppc_altivec_vslb : PowerPC_Vec_BBB_Intrinsic<"vslb">;
|
|
|
|
def int_ppc_altivec_vslh : PowerPC_Vec_HHH_Intrinsic<"vslh">;
|
|
|
|
def int_ppc_altivec_vslw : PowerPC_Vec_WWW_Intrinsic<"vslw">;
|
|
|
|
|
|
|
|
// Right Shifts.
|
|
|
|
def int_ppc_altivec_vsr : PowerPC_Vec_WWW_Intrinsic<"vsr">;
|
|
|
|
def int_ppc_altivec_vsro : PowerPC_Vec_WWW_Intrinsic<"vsro">;
|
|
|
|
|
|
|
|
def int_ppc_altivec_vsrb : PowerPC_Vec_BBB_Intrinsic<"vsrb">;
|
|
|
|
def int_ppc_altivec_vsrh : PowerPC_Vec_HHH_Intrinsic<"vsrh">;
|
|
|
|
def int_ppc_altivec_vsrw : PowerPC_Vec_WWW_Intrinsic<"vsrw">;
|
|
|
|
def int_ppc_altivec_vsrab : PowerPC_Vec_BBB_Intrinsic<"vsrab">;
|
|
|
|
def int_ppc_altivec_vsrah : PowerPC_Vec_HHH_Intrinsic<"vsrah">;
|
|
|
|
def int_ppc_altivec_vsraw : PowerPC_Vec_WWW_Intrinsic<"vsraw">;
|
|
|
|
|
|
|
|
// Rotates.
|
|
|
|
def int_ppc_altivec_vrlb : PowerPC_Vec_BBB_Intrinsic<"vrlb">;
|
|
|
|
def int_ppc_altivec_vrlh : PowerPC_Vec_HHH_Intrinsic<"vrlh">;
|
|
|
|
def int_ppc_altivec_vrlw : PowerPC_Vec_WWW_Intrinsic<"vrlw">;
|
2006-03-28 00:05:34 +02:00
|
|
|
|
2006-04-03 19:20:06 +02:00
|
|
|
let TargetPrefix = "ppc" in { // All PPC intrinsics start with "llvm.ppc.".
|
2006-03-28 00:05:34 +02:00
|
|
|
// Miscellaneous.
|
2006-03-30 20:52:02 +02:00
|
|
|
def int_ppc_altivec_lvsl :
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v16i8_ty], [llvm_ptr_ty], [IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
def int_ppc_altivec_lvsr :
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v16i8_ty], [llvm_ptr_ty], [IntrNoMem]>;
|
2006-03-30 20:52:02 +02:00
|
|
|
|
2006-03-28 06:15:58 +02:00
|
|
|
def int_ppc_altivec_vperm : GCCBuiltin<"__builtin_altivec_vperm_4si">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty,
|
2006-04-11 00:02:59 +02:00
|
|
|
llvm_v4i32_ty, llvm_v16i8_ty], [IntrNoMem]>;
|
2006-03-28 00:05:34 +02:00
|
|
|
def int_ppc_altivec_vsel : GCCBuiltin<"__builtin_altivec_vsel_4si">,
|
2008-11-13 10:08:33 +01:00
|
|
|
Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty,
|
2006-04-11 00:02:59 +02:00
|
|
|
llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
|
2006-03-26 04:37:19 +02:00
|
|
|
}
|
|
|
|
|
2006-04-03 19:20:06 +02:00
|
|
|
def int_ppc_altivec_vexptefp : PowerPC_Vec_FF_Intrinsic<"vexptefp">;
|
|
|
|
def int_ppc_altivec_vlogefp : PowerPC_Vec_FF_Intrinsic<"vlogefp">;
|
|
|
|
def int_ppc_altivec_vrefp : PowerPC_Vec_FF_Intrinsic<"vrefp">;
|
|
|
|
def int_ppc_altivec_vrsqrtefp : PowerPC_Vec_FF_Intrinsic<"vrsqrtefp">;
|