Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/llvm/Support/TargetOpcodes.def is written in an unsupported language. File is not indexed.

0001 //===-- llvm/Support/TargetOpcodes.def - Target Indep Opcodes ---*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // This file defines the target independent instruction opcodes.
0010 //
0011 //===----------------------------------------------------------------------===//
0012 
0013 // NOTE: NO INCLUDE GUARD DESIRED!
0014 
0015 /// HANDLE_TARGET_OPCODE defines an opcode and its associated enum value.
0016 ///
0017 #ifndef HANDLE_TARGET_OPCODE
0018 #define HANDLE_TARGET_OPCODE(OPC, NUM)
0019 #endif
0020 
0021 /// HANDLE_TARGET_OPCODE_MARKER defines an alternative identifier for an opcode.
0022 ///
0023 #ifndef HANDLE_TARGET_OPCODE_MARKER
0024 #define HANDLE_TARGET_OPCODE_MARKER(IDENT, OPC)
0025 #endif
0026 
0027 /// Every instruction defined here must also appear in Target.td.
0028 ///
0029 HANDLE_TARGET_OPCODE(PHI)
0030 HANDLE_TARGET_OPCODE(INLINEASM)
0031 HANDLE_TARGET_OPCODE(INLINEASM_BR)
0032 HANDLE_TARGET_OPCODE(CFI_INSTRUCTION)
0033 HANDLE_TARGET_OPCODE(EH_LABEL)
0034 HANDLE_TARGET_OPCODE(GC_LABEL)
0035 HANDLE_TARGET_OPCODE(ANNOTATION_LABEL)
0036 
0037 /// KILL - This instruction is a noop that is used only to adjust the
0038 /// liveness of registers. This can be useful when dealing with
0039 /// sub-registers.
0040 HANDLE_TARGET_OPCODE(KILL)
0041 
0042 /// EXTRACT_SUBREG - This instruction takes two operands: a register
0043 /// that has subregisters, and a subregister index. It returns the
0044 /// extracted subregister value. This is commonly used to implement
0045 /// truncation operations on target architectures which support it.
0046 HANDLE_TARGET_OPCODE(EXTRACT_SUBREG)
0047 
0048 /// INSERT_SUBREG - This instruction takes three operands: a register that
0049 /// has subregisters, a register providing an insert value, and a
0050 /// subregister index. It returns the value of the first register with the
0051 /// value of the second register inserted. The first register is often
0052 /// defined by an IMPLICIT_DEF, because it is commonly used to implement
0053 /// anyext operations on target architectures which support it.
0054 HANDLE_TARGET_OPCODE(INSERT_SUBREG)
0055 
0056 /// IMPLICIT_DEF - This is the MachineInstr-level equivalent of undef.
0057 HANDLE_TARGET_OPCODE(IMPLICIT_DEF)
0058 
0059 /// Explicit undef initialization used past IMPLICIT_DEF elimination in cases
0060 /// where an undef operand must be allocated to a different register than an
0061 /// early-clobber result operand.
0062 HANDLE_TARGET_OPCODE(INIT_UNDEF)
0063 
0064 /// SUBREG_TO_REG - Assert the value of bits in a super register.
0065 /// The result of this instruction is the value of the second operand inserted
0066 /// into the subregister specified by the third operand. All other bits are
0067 /// assumed to be equal to the bits in the immediate integer constant in the
0068 /// first operand. This instruction just communicates information; No code
0069 /// should be generated.
0070 /// This is typically used after an instruction where the write to a subregister
0071 /// implicitly cleared the bits in the super registers.
0072 HANDLE_TARGET_OPCODE(SUBREG_TO_REG)
0073 
0074 /// COPY_TO_REGCLASS - This instruction is a placeholder for a plain
0075 /// register-to-register copy into a specific register class. This is only
0076 /// used between instruction selection and MachineInstr creation, before
0077 /// virtual registers have been created for all the instructions, and it's
0078 /// only needed in cases where the register classes implied by the
0079 /// instructions are insufficient. It is emitted as a COPY MachineInstr.
0080 HANDLE_TARGET_OPCODE(COPY_TO_REGCLASS)
0081 
0082 /// DBG_VALUE - a mapping of the llvm.dbg.value intrinsic
0083 HANDLE_TARGET_OPCODE(DBG_VALUE)
0084 
0085 /// DBG_VALUE - a mapping of the llvm.dbg.value intrinsic with a variadic
0086 /// list of locations
0087 HANDLE_TARGET_OPCODE(DBG_VALUE_LIST)
0088 
0089 /// DBG_INSTR_REF - A mapping of llvm.dbg.value referring to the instruction
0090 /// that defines the value, rather than a virtual register.
0091 HANDLE_TARGET_OPCODE(DBG_INSTR_REF)
0092 
0093 /// DBG_PHI - remainder of a PHI, identifies a program point where values
0094 /// merge under control flow.
0095 HANDLE_TARGET_OPCODE(DBG_PHI)
0096 
0097 /// DBG_LABEL - a mapping of the llvm.dbg.label intrinsic
0098 HANDLE_TARGET_OPCODE(DBG_LABEL)
0099 
0100 /// REG_SEQUENCE - This variadic instruction is used to form a register that
0101 /// represents a consecutive sequence of sub-registers. It's used as a
0102 /// register coalescing / allocation aid and must be eliminated before code
0103 /// emission.
0104 // In SDNode form, the first operand encodes the register class created by
0105 // the REG_SEQUENCE, while each subsequent pair names a vreg + subreg index
0106 // pair.  Once it has been lowered to a MachineInstr, the regclass operand
0107 // is no longer present.
0108 /// e.g. v1027 = REG_SEQUENCE v1024, 3, v1025, 4, v1026, 5
0109 /// After register coalescing references of v1024 should be replace with
0110 /// v1027:3, v1025 with v1027:4, etc.
0111 HANDLE_TARGET_OPCODE(REG_SEQUENCE)
0112 
0113 /// COPY - Target-independent register copy. This instruction can also be
0114 /// used to copy between subregisters of virtual registers.
0115 HANDLE_TARGET_OPCODE(COPY)
0116 
0117 /// BUNDLE - This instruction represents an instruction bundle. Instructions
0118 /// which immediately follow a BUNDLE instruction which are marked with
0119 /// 'InsideBundle' flag are inside the bundle.
0120 HANDLE_TARGET_OPCODE(BUNDLE)
0121 
0122 /// Lifetime markers.
0123 HANDLE_TARGET_OPCODE(LIFETIME_START)
0124 HANDLE_TARGET_OPCODE(LIFETIME_END)
0125 
0126 /// Pseudo probe
0127 HANDLE_TARGET_OPCODE(PSEUDO_PROBE)
0128 
0129 /// Arithmetic fence.
0130 HANDLE_TARGET_OPCODE(ARITH_FENCE)
0131 
0132 /// A Stackmap instruction captures the location of live variables at its
0133 /// position in the instruction stream. It is followed by a shadow of bytes
0134 /// that must lie within the function and not contain another stackmap.
0135 HANDLE_TARGET_OPCODE(STACKMAP)
0136 
0137 /// FEntry all - This is a marker instruction which gets translated into a raw fentry call.
0138 HANDLE_TARGET_OPCODE(FENTRY_CALL)
0139 
0140 /// Patchable call instruction - this instruction represents a call to a
0141 /// constant address, followed by a series of NOPs. It is intended to
0142 /// support optimizations for dynamic languages (such as javascript) that
0143 /// rewrite calls to runtimes with more efficient code sequences.
0144 /// This also implies a stack map.
0145 HANDLE_TARGET_OPCODE(PATCHPOINT)
0146 
0147 /// This pseudo-instruction loads the stack guard value. Targets which need
0148 /// to prevent the stack guard value or address from being spilled to the
0149 /// stack should override TargetLowering::emitLoadStackGuardNode and
0150 /// additionally expand this pseudo after register allocation.
0151 HANDLE_TARGET_OPCODE(LOAD_STACK_GUARD)
0152 
0153 /// These are used to support call sites that must have the stack adjusted
0154 /// before the call (e.g. to initialize an argument passed by value).
0155 /// See llvm.call.preallocated.{setup,arg} in the LangRef for more details.
0156 HANDLE_TARGET_OPCODE(PREALLOCATED_SETUP)
0157 HANDLE_TARGET_OPCODE(PREALLOCATED_ARG)
0158 
0159 /// Call instruction with associated vm state for deoptimization and list
0160 /// of live pointers for relocation by the garbage collector.  It is
0161 /// intended to support garbage collection with fully precise relocating
0162 /// collectors and deoptimizations in either the callee or caller.
0163 HANDLE_TARGET_OPCODE(STATEPOINT)
0164 
0165 /// Instruction that records the offset of a local stack allocation passed to
0166 /// llvm.localescape. It has two arguments: the symbol for the label and the
0167 /// frame index of the local stack allocation.
0168 HANDLE_TARGET_OPCODE(LOCAL_ESCAPE)
0169 
0170 /// Wraps a machine instruction which can fault, bundled with associated
0171 /// information on how to handle such a fault.
0172 /// For example loading instruction that may page fault, bundled with associated
0173 /// information on how to handle such a page fault.  It is intended to support
0174 /// "zero cost" null checks in managed languages by allowing LLVM to fold
0175 /// comparisons into existing memory operations.
0176 HANDLE_TARGET_OPCODE(FAULTING_OP)
0177 
0178 /// Precedes a machine instruction to add patchability constraints.  An
0179 /// instruction after PATCHABLE_OP has to either have a minimum
0180 /// size or be preceded with a nop of that size.  The first operand is
0181 /// an immediate denoting the minimum size of the following instruction.
0182 HANDLE_TARGET_OPCODE(PATCHABLE_OP)
0183 
0184 /// This is a marker instruction which gets translated into a nop sled, useful
0185 /// for inserting instrumentation instructions at runtime.
0186 HANDLE_TARGET_OPCODE(PATCHABLE_FUNCTION_ENTER)
0187 
0188 /// Wraps a return instruction and its operands to enable adding nop sleds
0189 /// either before or after the return. The nop sleds are useful for inserting
0190 /// instrumentation instructions at runtime.
0191 /// The patch here replaces the return instruction.
0192 HANDLE_TARGET_OPCODE(PATCHABLE_RET)
0193 
0194 /// This is a marker instruction which gets translated into a nop sled, useful
0195 /// for inserting instrumentation instructions at runtime.
0196 /// The patch here prepends the return instruction.
0197 /// The same thing as in x86_64 is not possible for ARM because it has multiple
0198 /// return instructions. Furthermore, CPU allows parametrized and even
0199 /// conditional return instructions. In the current ARM implementation we are
0200 /// making use of the fact that currently LLVM doesn't seem to generate
0201 /// conditional return instructions.
0202 /// On ARM, the same instruction can be used for popping multiple registers
0203 /// from the stack and returning (it just pops pc register too), and LLVM
0204 /// generates it sometimes. So we can't insert the sled between this stack
0205 /// adjustment and the return without splitting the original instruction into 2
0206 /// instructions. So on ARM, rather than jumping into the exit trampoline, we
0207 /// call it, it does the tracing, preserves the stack and returns.
0208 HANDLE_TARGET_OPCODE(PATCHABLE_FUNCTION_EXIT)
0209 
0210 /// Wraps a tail call instruction and its operands to enable adding nop sleds
0211 /// either before or after the tail exit. We use this as a disambiguation from
0212 /// PATCHABLE_RET which specifically only works for return instructions.
0213 HANDLE_TARGET_OPCODE(PATCHABLE_TAIL_CALL)
0214 
0215 /// Wraps a logging call and its arguments with nop sleds. At runtime, this can
0216 /// be patched to insert instrumentation instructions.
0217 HANDLE_TARGET_OPCODE(PATCHABLE_EVENT_CALL)
0218 
0219 /// Wraps a typed logging call and its argument with nop sleds. At runtime, this
0220 /// can be patched to insert instrumentation instructions.
0221 HANDLE_TARGET_OPCODE(PATCHABLE_TYPED_EVENT_CALL)
0222 
0223 HANDLE_TARGET_OPCODE(ICALL_BRANCH_FUNNEL)
0224 
0225 /// Represents a use of the operand but generates no code.
0226 HANDLE_TARGET_OPCODE(FAKE_USE)
0227 
0228 // This is a fence with the singlethread scope. It represents a compiler memory
0229 // barrier, but does not correspond to any generated instruction.
0230 HANDLE_TARGET_OPCODE(MEMBARRIER)
0231 
0232 // Provides information about what jump table the following indirect branch is
0233 // using.
0234 HANDLE_TARGET_OPCODE(JUMP_TABLE_DEBUG_INFO)
0235 
0236 HANDLE_TARGET_OPCODE(CONVERGENCECTRL_ENTRY)
0237 HANDLE_TARGET_OPCODE(CONVERGENCECTRL_ANCHOR)
0238 HANDLE_TARGET_OPCODE(CONVERGENCECTRL_LOOP)
0239 HANDLE_TARGET_OPCODE(CONVERGENCECTRL_GLUE)
0240 
0241 /// The following generic opcodes are not supposed to appear after ISel.
0242 /// This is something we might want to relax, but for now, this is convenient
0243 /// to produce diagnostics.
0244 
0245 /// Instructions which should not exist past instruction selection, but do not
0246 /// generate code. These instructions only act as optimization hints.
0247 HANDLE_TARGET_OPCODE(G_ASSERT_SEXT)
0248 HANDLE_TARGET_OPCODE(G_ASSERT_ZEXT)
0249 HANDLE_TARGET_OPCODE(G_ASSERT_ALIGN)
0250 HANDLE_TARGET_OPCODE_MARKER(PRE_ISEL_GENERIC_OPTIMIZATION_HINT_START,
0251                             G_ASSERT_SEXT)
0252 HANDLE_TARGET_OPCODE_MARKER(PRE_ISEL_GENERIC_OPTIMIZATION_HINT_END,
0253                             G_ASSERT_ALIGN)
0254 
0255 /// Generic ADD instruction. This is an integer add.
0256 HANDLE_TARGET_OPCODE(G_ADD)
0257 HANDLE_TARGET_OPCODE_MARKER(PRE_ISEL_GENERIC_OPCODE_START, G_ADD)
0258 
0259 /// Generic SUB instruction. This is an integer sub.
0260 HANDLE_TARGET_OPCODE(G_SUB)
0261 
0262 // Generic multiply instruction.
0263 HANDLE_TARGET_OPCODE(G_MUL)
0264 
0265 // Generic signed division instruction.
0266 HANDLE_TARGET_OPCODE(G_SDIV)
0267 
0268 // Generic unsigned division instruction.
0269 HANDLE_TARGET_OPCODE(G_UDIV)
0270 
0271 // Generic signed remainder instruction.
0272 HANDLE_TARGET_OPCODE(G_SREM)
0273 
0274 // Generic unsigned remainder instruction.
0275 HANDLE_TARGET_OPCODE(G_UREM)
0276 
0277 // Generic signed divrem instruction.
0278 HANDLE_TARGET_OPCODE(G_SDIVREM)
0279 
0280 // Generic unsigned divrem instruction.
0281 HANDLE_TARGET_OPCODE(G_UDIVREM)
0282 
0283 /// Generic bitwise and instruction.
0284 HANDLE_TARGET_OPCODE(G_AND)
0285 
0286 /// Generic bitwise or instruction.
0287 HANDLE_TARGET_OPCODE(G_OR)
0288 
0289 /// Generic bitwise exclusive-or instruction.
0290 HANDLE_TARGET_OPCODE(G_XOR)
0291 
0292 /// Generic absolute difference signed instruction.
0293 HANDLE_TARGET_OPCODE(G_ABDS)
0294 
0295 /// Generic absolute difference unsigned instruction.
0296 HANDLE_TARGET_OPCODE(G_ABDU)
0297 
0298 
0299 HANDLE_TARGET_OPCODE(G_IMPLICIT_DEF)
0300 
0301 /// Generic PHI instruction with types.
0302 HANDLE_TARGET_OPCODE(G_PHI)
0303 
0304 /// Generic instruction to materialize the address of an alloca or other
0305 /// stack-based object.
0306 HANDLE_TARGET_OPCODE(G_FRAME_INDEX)
0307 
0308 /// Generic reference to global value.
0309 HANDLE_TARGET_OPCODE(G_GLOBAL_VALUE)
0310 
0311 /// Generic ptrauth-signed reference to global value.
0312 HANDLE_TARGET_OPCODE(G_PTRAUTH_GLOBAL_VALUE)
0313 
0314 /// Generic instruction to materialize the address of an object in the constant
0315 /// pool.
0316 HANDLE_TARGET_OPCODE(G_CONSTANT_POOL)
0317 
0318 /// Generic instruction to extract blocks of bits from the register given
0319 /// (typically a sub-register COPY after instruction selection).
0320 HANDLE_TARGET_OPCODE(G_EXTRACT)
0321 
0322 HANDLE_TARGET_OPCODE(G_UNMERGE_VALUES)
0323 
0324 /// Generic instruction to insert blocks of bits from the registers given into
0325 /// the source.
0326 HANDLE_TARGET_OPCODE(G_INSERT)
0327 
0328 /// Generic instruction to paste a variable number of components together into a
0329 /// larger register.
0330 HANDLE_TARGET_OPCODE(G_MERGE_VALUES)
0331 
0332 /// Generic instruction to create a vector value from a number of scalar
0333 /// components.
0334 HANDLE_TARGET_OPCODE(G_BUILD_VECTOR)
0335 
0336 /// Generic instruction to create a vector value from a number of scalar
0337 /// components, which have types larger than the result vector elt type.
0338 HANDLE_TARGET_OPCODE(G_BUILD_VECTOR_TRUNC)
0339 
0340 /// Generic instruction to create a vector by concatenating multiple vectors.
0341 HANDLE_TARGET_OPCODE(G_CONCAT_VECTORS)
0342 
0343 /// Generic pointer to int conversion.
0344 HANDLE_TARGET_OPCODE(G_PTRTOINT)
0345 
0346 /// Generic int to pointer conversion.
0347 HANDLE_TARGET_OPCODE(G_INTTOPTR)
0348 
0349 /// Generic bitcast. The source and destination types must be different, or a
0350 /// COPY is the relevant instruction.
0351 HANDLE_TARGET_OPCODE(G_BITCAST)
0352 
0353 /// Generic freeze.
0354 HANDLE_TARGET_OPCODE(G_FREEZE)
0355 
0356 /// Constant folding barrier.
0357 HANDLE_TARGET_OPCODE(G_CONSTANT_FOLD_BARRIER)
0358 
0359 // INTRINSIC fptrunc_round intrinsic.
0360 HANDLE_TARGET_OPCODE(G_INTRINSIC_FPTRUNC_ROUND)
0361 
0362 /// INTRINSIC trunc intrinsic.
0363 HANDLE_TARGET_OPCODE(G_INTRINSIC_TRUNC)
0364 
0365 /// INTRINSIC round intrinsic.
0366 HANDLE_TARGET_OPCODE(G_INTRINSIC_ROUND)
0367 
0368 /// INTRINSIC round to integer intrinsic.
0369 HANDLE_TARGET_OPCODE(G_INTRINSIC_LRINT)
0370 
0371 /// INTRINSIC long round to integer intrinsic.
0372 HANDLE_TARGET_OPCODE(G_INTRINSIC_LLRINT)
0373 
0374 /// INTRINSIC roundeven intrinsic.
0375 HANDLE_TARGET_OPCODE(G_INTRINSIC_ROUNDEVEN)
0376 
0377 /// INTRINSIC readcyclecounter
0378 HANDLE_TARGET_OPCODE(G_READCYCLECOUNTER)
0379 
0380 /// INTRINSIC readsteadycounter
0381 HANDLE_TARGET_OPCODE(G_READSTEADYCOUNTER)
0382 
0383 /// Generic load (including anyext load)
0384 HANDLE_TARGET_OPCODE(G_LOAD)
0385 
0386 /// Generic signext load
0387 HANDLE_TARGET_OPCODE(G_SEXTLOAD)
0388 
0389 /// Generic zeroext load
0390 HANDLE_TARGET_OPCODE(G_ZEXTLOAD)
0391 
0392 /// Generic indexed load (including anyext load)
0393 HANDLE_TARGET_OPCODE(G_INDEXED_LOAD)
0394 
0395 /// Generic indexed signext load
0396 HANDLE_TARGET_OPCODE(G_INDEXED_SEXTLOAD)
0397 
0398 /// Generic indexed zeroext load
0399 HANDLE_TARGET_OPCODE(G_INDEXED_ZEXTLOAD)
0400 
0401 /// Generic store.
0402 HANDLE_TARGET_OPCODE(G_STORE)
0403 
0404 /// Generic indexed store.
0405 HANDLE_TARGET_OPCODE(G_INDEXED_STORE)
0406 
0407 /// Generic atomic cmpxchg with internal success check.
0408 HANDLE_TARGET_OPCODE(G_ATOMIC_CMPXCHG_WITH_SUCCESS)
0409 
0410 /// Generic atomic cmpxchg.
0411 HANDLE_TARGET_OPCODE(G_ATOMIC_CMPXCHG)
0412 
0413 /// Generic atomicrmw.
0414 HANDLE_TARGET_OPCODE(G_ATOMICRMW_XCHG)
0415 HANDLE_TARGET_OPCODE(G_ATOMICRMW_ADD)
0416 HANDLE_TARGET_OPCODE(G_ATOMICRMW_SUB)
0417 HANDLE_TARGET_OPCODE(G_ATOMICRMW_AND)
0418 HANDLE_TARGET_OPCODE(G_ATOMICRMW_NAND)
0419 HANDLE_TARGET_OPCODE(G_ATOMICRMW_OR)
0420 HANDLE_TARGET_OPCODE(G_ATOMICRMW_XOR)
0421 HANDLE_TARGET_OPCODE(G_ATOMICRMW_MAX)
0422 HANDLE_TARGET_OPCODE(G_ATOMICRMW_MIN)
0423 HANDLE_TARGET_OPCODE(G_ATOMICRMW_UMAX)
0424 HANDLE_TARGET_OPCODE(G_ATOMICRMW_UMIN)
0425 HANDLE_TARGET_OPCODE(G_ATOMICRMW_FADD)
0426 HANDLE_TARGET_OPCODE(G_ATOMICRMW_FSUB)
0427 HANDLE_TARGET_OPCODE(G_ATOMICRMW_FMAX)
0428 HANDLE_TARGET_OPCODE(G_ATOMICRMW_FMIN)
0429 HANDLE_TARGET_OPCODE(G_ATOMICRMW_UINC_WRAP)
0430 HANDLE_TARGET_OPCODE(G_ATOMICRMW_UDEC_WRAP)
0431 HANDLE_TARGET_OPCODE(G_ATOMICRMW_USUB_COND)
0432 HANDLE_TARGET_OPCODE(G_ATOMICRMW_USUB_SAT)
0433 
0434 // Marker for start of Generic AtomicRMW opcodes
0435 HANDLE_TARGET_OPCODE_MARKER(GENERIC_ATOMICRMW_OP_START, G_ATOMICRMW_XCHG)
0436 
0437 // Marker for end of Generic AtomicRMW opcodes
0438 HANDLE_TARGET_OPCODE_MARKER(GENERIC_ATOMICRMW_OP_END, G_ATOMICRMW_USUB_SAT)
0439 
0440 // Generic atomic fence
0441 HANDLE_TARGET_OPCODE(G_FENCE)
0442 
0443 /// Generic prefetch
0444 HANDLE_TARGET_OPCODE(G_PREFETCH)
0445 
0446 /// Generic conditional branch instruction.
0447 HANDLE_TARGET_OPCODE(G_BRCOND)
0448 
0449 /// Generic indirect branch instruction.
0450 HANDLE_TARGET_OPCODE(G_BRINDIRECT)
0451 
0452 /// Begin an invoke region marker.
0453 HANDLE_TARGET_OPCODE(G_INVOKE_REGION_START)
0454 
0455 /// Generic intrinsic use (without side effects).
0456 HANDLE_TARGET_OPCODE(G_INTRINSIC)
0457 
0458 /// Generic intrinsic use (with side effects).
0459 HANDLE_TARGET_OPCODE(G_INTRINSIC_W_SIDE_EFFECTS)
0460 
0461 /// Generic intrinsic use (without side effects).
0462 HANDLE_TARGET_OPCODE(G_INTRINSIC_CONVERGENT)
0463 
0464 /// Generic intrinsic use (with side effects).
0465 HANDLE_TARGET_OPCODE(G_INTRINSIC_CONVERGENT_W_SIDE_EFFECTS)
0466 
0467 /// Generic extension allowing rubbish in high bits.
0468 HANDLE_TARGET_OPCODE(G_ANYEXT)
0469 
0470 /// Generic instruction to discard the high bits of a register. This differs
0471 /// from (G_EXTRACT val, 0) on its action on vectors: G_TRUNC will truncate
0472 /// each element individually, G_EXTRACT will typically discard the high
0473 /// elements of the vector.
0474 HANDLE_TARGET_OPCODE(G_TRUNC)
0475 
0476 /// Generic integer constant.
0477 HANDLE_TARGET_OPCODE(G_CONSTANT)
0478 
0479 /// Generic floating constant.
0480 HANDLE_TARGET_OPCODE(G_FCONSTANT)
0481 
0482 /// Generic va_start instruction. Stores to its one pointer operand.
0483 HANDLE_TARGET_OPCODE(G_VASTART)
0484 
0485 /// Generic va_arg instruction. Stores to its one pointer operand.
0486 HANDLE_TARGET_OPCODE(G_VAARG)
0487 
0488 // Generic sign extend
0489 HANDLE_TARGET_OPCODE(G_SEXT)
0490 HANDLE_TARGET_OPCODE(G_SEXT_INREG)
0491 
0492 // Generic zero extend
0493 HANDLE_TARGET_OPCODE(G_ZEXT)
0494 
0495 // Generic left-shift
0496 HANDLE_TARGET_OPCODE(G_SHL)
0497 
0498 // Generic logical right-shift
0499 HANDLE_TARGET_OPCODE(G_LSHR)
0500 
0501 // Generic arithmetic right-shift
0502 HANDLE_TARGET_OPCODE(G_ASHR)
0503 
0504 // Generic funnel left shift
0505 HANDLE_TARGET_OPCODE(G_FSHL)
0506 
0507 // Generic funnel right shift
0508 HANDLE_TARGET_OPCODE(G_FSHR)
0509 
0510 // Generic right rotate
0511 HANDLE_TARGET_OPCODE(G_ROTR)
0512 
0513 // Generic left rotate
0514 HANDLE_TARGET_OPCODE(G_ROTL)
0515 
0516 /// Generic integer-base comparison, also applicable to vectors of integers.
0517 HANDLE_TARGET_OPCODE(G_ICMP)
0518 
0519 /// Generic floating-point comparison, also applicable to vectors.
0520 HANDLE_TARGET_OPCODE(G_FCMP)
0521 
0522 /// Generic signed 3-way comparison.
0523 HANDLE_TARGET_OPCODE(G_SCMP)
0524 
0525 /// Generic unsigned 3-way comparison.
0526 HANDLE_TARGET_OPCODE(G_UCMP)
0527 
0528 /// Generic select.
0529 HANDLE_TARGET_OPCODE(G_SELECT)
0530 
0531 /// Generic unsigned add instruction, consuming the normal operands and
0532 /// producing the result and a carry flag.
0533 HANDLE_TARGET_OPCODE(G_UADDO)
0534 
0535 /// Generic unsigned add instruction, consuming the normal operands plus a carry
0536 /// flag, and similarly producing the result and a carry flag.
0537 HANDLE_TARGET_OPCODE(G_UADDE)
0538 
0539 /// Generic unsigned sub instruction, consuming the normal operands and
0540 /// producing the result and a carry flag.
0541 HANDLE_TARGET_OPCODE(G_USUBO)
0542 
0543 /// Generic unsigned subtract instruction, consuming the normal operands plus a
0544 /// carry flag, and similarly producing the result and a carry flag.
0545 HANDLE_TARGET_OPCODE(G_USUBE)
0546 
0547 /// Generic signed add instruction, producing the result and a signed overflow
0548 /// flag.
0549 HANDLE_TARGET_OPCODE(G_SADDO)
0550 
0551 /// Generic signed add instruction, consuming the normal operands plus a carry
0552 /// flag, and similarly producing the result and a carry flag.
0553 HANDLE_TARGET_OPCODE(G_SADDE)
0554 
0555 /// Generic signed subtract instruction, producing the result and a signed
0556 /// overflow flag.
0557 HANDLE_TARGET_OPCODE(G_SSUBO)
0558 
0559 /// Generic signed sub instruction, consuming the normal operands plus a carry
0560 /// flag, and similarly producing the result and a carry flag.
0561 HANDLE_TARGET_OPCODE(G_SSUBE)
0562 
0563 /// Generic unsigned multiply instruction, producing the result and a signed
0564 /// overflow flag.
0565 HANDLE_TARGET_OPCODE(G_UMULO)
0566 
0567 /// Generic signed multiply instruction, producing the result and a signed
0568 /// overflow flag.
0569 HANDLE_TARGET_OPCODE(G_SMULO)
0570 
0571 // Multiply two numbers at twice the incoming bit width (unsigned) and return
0572 // the high half of the result.
0573 HANDLE_TARGET_OPCODE(G_UMULH)
0574 
0575 // Multiply two numbers at twice the incoming bit width (signed) and return
0576 // the high half of the result.
0577 HANDLE_TARGET_OPCODE(G_SMULH)
0578 
0579 /// Generic saturating unsigned addition.
0580 HANDLE_TARGET_OPCODE(G_UADDSAT)
0581 
0582 /// Generic saturating signed addition.
0583 HANDLE_TARGET_OPCODE(G_SADDSAT)
0584 
0585 /// Generic saturating unsigned subtraction.
0586 HANDLE_TARGET_OPCODE(G_USUBSAT)
0587 
0588 /// Generic saturating signed subtraction.
0589 HANDLE_TARGET_OPCODE(G_SSUBSAT)
0590 
0591 /// Generic saturating unsigned left shift.
0592 HANDLE_TARGET_OPCODE(G_USHLSAT)
0593 
0594 /// Generic saturating signed left shift.
0595 HANDLE_TARGET_OPCODE(G_SSHLSAT)
0596 
0597 // Perform signed fixed point multiplication
0598 HANDLE_TARGET_OPCODE(G_SMULFIX)
0599 
0600 // Perform unsigned fixed point multiplication
0601 HANDLE_TARGET_OPCODE(G_UMULFIX)
0602 
0603 // Perform signed, saturating fixed point multiplication
0604 HANDLE_TARGET_OPCODE(G_SMULFIXSAT)
0605 
0606 // Perform unsigned, saturating fixed point multiplication
0607 HANDLE_TARGET_OPCODE(G_UMULFIXSAT)
0608 
0609 // Perform signed fixed point division
0610 HANDLE_TARGET_OPCODE(G_SDIVFIX)
0611 
0612 // Perform unsigned fixed point division
0613 HANDLE_TARGET_OPCODE(G_UDIVFIX)
0614 
0615 // Perform signed, saturating fixed point division
0616 HANDLE_TARGET_OPCODE(G_SDIVFIXSAT)
0617 
0618 // Perform unsigned, saturating fixed point division
0619 HANDLE_TARGET_OPCODE(G_UDIVFIXSAT)
0620 
0621 /// Generic FP addition.
0622 HANDLE_TARGET_OPCODE(G_FADD)
0623 
0624 /// Generic FP subtraction.
0625 HANDLE_TARGET_OPCODE(G_FSUB)
0626 
0627 /// Generic FP multiplication.
0628 HANDLE_TARGET_OPCODE(G_FMUL)
0629 
0630 /// Generic FMA multiplication. Behaves like llvm fma intrinsic
0631 HANDLE_TARGET_OPCODE(G_FMA)
0632 
0633 /// Generic FP multiply and add. Behaves as separate fmul and fadd.
0634 HANDLE_TARGET_OPCODE(G_FMAD)
0635 
0636 /// Generic FP division.
0637 HANDLE_TARGET_OPCODE(G_FDIV)
0638 
0639 /// Generic FP remainder.
0640 HANDLE_TARGET_OPCODE(G_FREM)
0641 
0642 /// Generic FP exponentiation.
0643 HANDLE_TARGET_OPCODE(G_FPOW)
0644 
0645 /// Generic FP exponentiation, with an integer exponent.
0646 HANDLE_TARGET_OPCODE(G_FPOWI)
0647 
0648 /// Generic base-e exponential of a value.
0649 HANDLE_TARGET_OPCODE(G_FEXP)
0650 
0651 /// Generic base-2 exponential of a value.
0652 HANDLE_TARGET_OPCODE(G_FEXP2)
0653 
0654 /// Generic base-10 exponential of a value.
0655 HANDLE_TARGET_OPCODE(G_FEXP10)
0656 
0657 /// Floating point base-e logarithm of a value.
0658 HANDLE_TARGET_OPCODE(G_FLOG)
0659 
0660 /// Floating point base-2 logarithm of a value.
0661 HANDLE_TARGET_OPCODE(G_FLOG2)
0662 
0663 /// Floating point base-10 logarithm of a value.
0664 HANDLE_TARGET_OPCODE(G_FLOG10)
0665 
0666 /// Floating point x * 2^n
0667 HANDLE_TARGET_OPCODE(G_FLDEXP)
0668 
0669 /// Floating point extract fraction and exponent.
0670 HANDLE_TARGET_OPCODE(G_FFREXP)
0671 
0672 /// Generic FP negation.
0673 HANDLE_TARGET_OPCODE(G_FNEG)
0674 
0675 /// Generic FP extension.
0676 HANDLE_TARGET_OPCODE(G_FPEXT)
0677 
0678 /// Generic float to signed-int conversion
0679 HANDLE_TARGET_OPCODE(G_FPTRUNC)
0680 
0681 /// Generic float to signed-int conversion
0682 HANDLE_TARGET_OPCODE(G_FPTOSI)
0683 
0684 /// Generic float to unsigned-int conversion
0685 HANDLE_TARGET_OPCODE(G_FPTOUI)
0686 
0687 /// Generic signed-int to float conversion
0688 HANDLE_TARGET_OPCODE(G_SITOFP)
0689 
0690 /// Generic unsigned-int to float conversion
0691 HANDLE_TARGET_OPCODE(G_UITOFP)
0692 
0693 /// Generic saturating float to signed-int conversion
0694 HANDLE_TARGET_OPCODE(G_FPTOSI_SAT)
0695 
0696 /// Generic saturating float to unsigned-int conversion
0697 HANDLE_TARGET_OPCODE(G_FPTOUI_SAT)
0698 
0699 /// Generic FP absolute value.
0700 HANDLE_TARGET_OPCODE(G_FABS)
0701 
0702 /// FCOPYSIGN(X, Y) - Return the value of X with the sign of Y.  NOTE: This does
0703 /// not require that X and Y have the same type, just that they are both
0704 /// floating point. X and the result must have the same type.  FCOPYSIGN(f32,
0705 /// f64) is allowed.
0706 HANDLE_TARGET_OPCODE(G_FCOPYSIGN)
0707 
0708 /// Generic test for floating-point class.
0709 HANDLE_TARGET_OPCODE(G_IS_FPCLASS)
0710 
0711 /// Generic FP canonicalize value.
0712 HANDLE_TARGET_OPCODE(G_FCANONICALIZE)
0713 
0714 /// FP min/max matching libm's fmin/fmax
0715 HANDLE_TARGET_OPCODE(G_FMINNUM)
0716 HANDLE_TARGET_OPCODE(G_FMAXNUM)
0717 
0718 /// FP min/max matching IEEE-754 2008's minnum/maxnum semantics.
0719 HANDLE_TARGET_OPCODE(G_FMINNUM_IEEE)
0720 HANDLE_TARGET_OPCODE(G_FMAXNUM_IEEE)
0721 
0722 /// FP min/max matching IEEE-754 2018 draft semantics.
0723 HANDLE_TARGET_OPCODE(G_FMINIMUM)
0724 HANDLE_TARGET_OPCODE(G_FMAXIMUM)
0725 
0726 /// Access to FP environment.
0727 HANDLE_TARGET_OPCODE(G_GET_FPENV)
0728 HANDLE_TARGET_OPCODE(G_SET_FPENV)
0729 HANDLE_TARGET_OPCODE(G_RESET_FPENV)
0730 HANDLE_TARGET_OPCODE(G_GET_FPMODE)
0731 HANDLE_TARGET_OPCODE(G_SET_FPMODE)
0732 HANDLE_TARGET_OPCODE(G_RESET_FPMODE)
0733 
0734 /// Generic pointer offset
0735 HANDLE_TARGET_OPCODE(G_PTR_ADD)
0736 
0737 /// Clear the specified bits in a pointer.
0738 HANDLE_TARGET_OPCODE(G_PTRMASK)
0739 
0740 /// Generic signed integer minimum.
0741 HANDLE_TARGET_OPCODE(G_SMIN)
0742 
0743 /// Generic signed integer maximum.
0744 HANDLE_TARGET_OPCODE(G_SMAX)
0745 
0746 /// Generic unsigned integer maximum.
0747 HANDLE_TARGET_OPCODE(G_UMIN)
0748 
0749 /// Generic unsigned integer maximum.
0750 HANDLE_TARGET_OPCODE(G_UMAX)
0751 
0752 /// Generic integer absolute value.
0753 HANDLE_TARGET_OPCODE(G_ABS)
0754 
0755 HANDLE_TARGET_OPCODE(G_LROUND)
0756 HANDLE_TARGET_OPCODE(G_LLROUND)
0757 
0758 /// Generic BRANCH instruction. This is an unconditional branch.
0759 HANDLE_TARGET_OPCODE(G_BR)
0760 
0761 /// Generic branch to jump table entry.
0762 HANDLE_TARGET_OPCODE(G_BRJT)
0763 
0764 /// Generic vscale.
0765 HANDLE_TARGET_OPCODE(G_VSCALE)
0766 
0767 /// Generic insert subvector.
0768 HANDLE_TARGET_OPCODE(G_INSERT_SUBVECTOR)
0769 
0770 /// Generic extract subvector.
0771 HANDLE_TARGET_OPCODE(G_EXTRACT_SUBVECTOR)
0772 
0773 /// Generic insertelement.
0774 HANDLE_TARGET_OPCODE(G_INSERT_VECTOR_ELT)
0775 
0776 /// Generic extractelement.
0777 HANDLE_TARGET_OPCODE(G_EXTRACT_VECTOR_ELT)
0778 
0779 /// Generic shufflevector.
0780 HANDLE_TARGET_OPCODE(G_SHUFFLE_VECTOR)
0781 
0782 /// Generic splatvector.
0783 HANDLE_TARGET_OPCODE(G_SPLAT_VECTOR)
0784 
0785 /// Generic stepvector.
0786 HANDLE_TARGET_OPCODE(G_STEP_VECTOR)
0787 
0788 /// Generic masked compress.
0789 HANDLE_TARGET_OPCODE(G_VECTOR_COMPRESS)
0790 
0791 /// Generic count trailing zeroes.
0792 HANDLE_TARGET_OPCODE(G_CTTZ)
0793 
0794 /// Same as above, undefined for zero inputs.
0795 HANDLE_TARGET_OPCODE(G_CTTZ_ZERO_UNDEF)
0796 
0797 /// Generic count leading zeroes.
0798 HANDLE_TARGET_OPCODE(G_CTLZ)
0799 
0800 /// Same as above, undefined for zero inputs.
0801 HANDLE_TARGET_OPCODE(G_CTLZ_ZERO_UNDEF)
0802 
0803 /// Generic count bits.
0804 HANDLE_TARGET_OPCODE(G_CTPOP)
0805 
0806 /// Generic byte swap.
0807 HANDLE_TARGET_OPCODE(G_BSWAP)
0808 
0809 /// Generic bit reverse.
0810 HANDLE_TARGET_OPCODE(G_BITREVERSE)
0811 
0812 /// Floating point ceil.
0813 HANDLE_TARGET_OPCODE(G_FCEIL)
0814 
0815 /// Floating point cosine.
0816 HANDLE_TARGET_OPCODE(G_FCOS)
0817 
0818 /// Floating point sine.
0819 HANDLE_TARGET_OPCODE(G_FSIN)
0820 
0821 /// Floating point combined sine and cosine.
0822 HANDLE_TARGET_OPCODE(G_FSINCOS)
0823 
0824 /// Floating point tangent.
0825 HANDLE_TARGET_OPCODE(G_FTAN)
0826 
0827 /// Floating point arccosine.
0828 HANDLE_TARGET_OPCODE(G_FACOS)
0829 
0830 /// Floating point arcsine.
0831 HANDLE_TARGET_OPCODE(G_FASIN)
0832 
0833 /// Floating point arctangent.
0834 HANDLE_TARGET_OPCODE(G_FATAN)
0835 
0836 /// Floating point arctangent of y/x.
0837 HANDLE_TARGET_OPCODE(G_FATAN2)
0838 
0839 /// Floating point hyperbolic cosine.
0840 HANDLE_TARGET_OPCODE(G_FCOSH)
0841 
0842 /// Floating point hyperbolic sine.
0843 HANDLE_TARGET_OPCODE(G_FSINH)
0844 
0845 /// Floating point hyperbolic tangent.
0846 HANDLE_TARGET_OPCODE(G_FTANH)
0847 
0848 /// Floating point square root.
0849 HANDLE_TARGET_OPCODE(G_FSQRT)
0850 
0851 /// Floating point floor.
0852 HANDLE_TARGET_OPCODE(G_FFLOOR)
0853 
0854 /// Floating point round to next integer.
0855 HANDLE_TARGET_OPCODE(G_FRINT)
0856 
0857 /// Floating point round to nearest integer.
0858 HANDLE_TARGET_OPCODE(G_FNEARBYINT)
0859 
0860 /// Generic AddressSpaceCast.
0861 HANDLE_TARGET_OPCODE(G_ADDRSPACE_CAST)
0862 
0863 /// Generic block address
0864 HANDLE_TARGET_OPCODE(G_BLOCK_ADDR)
0865 
0866 /// Generic jump table address
0867 HANDLE_TARGET_OPCODE(G_JUMP_TABLE)
0868 
0869 /// Generic dynamic stack allocation.
0870 HANDLE_TARGET_OPCODE(G_DYN_STACKALLOC)
0871 
0872 /// Generic stack pointer save.
0873 HANDLE_TARGET_OPCODE(G_STACKSAVE)
0874 
0875 /// Generic stack pointer restore.
0876 HANDLE_TARGET_OPCODE(G_STACKRESTORE)
0877 
0878 /// Strict floating point instructions.
0879 HANDLE_TARGET_OPCODE(G_STRICT_FADD)
0880 HANDLE_TARGET_OPCODE(G_STRICT_FSUB)
0881 HANDLE_TARGET_OPCODE(G_STRICT_FMUL)
0882 HANDLE_TARGET_OPCODE(G_STRICT_FDIV)
0883 HANDLE_TARGET_OPCODE(G_STRICT_FREM)
0884 HANDLE_TARGET_OPCODE(G_STRICT_FMA)
0885 HANDLE_TARGET_OPCODE(G_STRICT_FSQRT)
0886 HANDLE_TARGET_OPCODE(G_STRICT_FLDEXP)
0887 
0888 /// read_register intrinsic
0889 HANDLE_TARGET_OPCODE(G_READ_REGISTER)
0890 
0891 /// write_register intrinsic
0892 HANDLE_TARGET_OPCODE(G_WRITE_REGISTER)
0893 
0894 /// llvm.memcpy intrinsic
0895 HANDLE_TARGET_OPCODE(G_MEMCPY)
0896 
0897 /// llvm.memcpy.inline intrinsic
0898 HANDLE_TARGET_OPCODE(G_MEMCPY_INLINE)
0899 
0900 /// llvm.memmove intrinsic
0901 HANDLE_TARGET_OPCODE(G_MEMMOVE)
0902 
0903 /// llvm.memset intrinsic
0904 HANDLE_TARGET_OPCODE(G_MEMSET)
0905 HANDLE_TARGET_OPCODE(G_BZERO)
0906 
0907 /// llvm.trap, llvm.debugtrap and llvm.ubsantrap intrinsics
0908 HANDLE_TARGET_OPCODE(G_TRAP)
0909 HANDLE_TARGET_OPCODE(G_DEBUGTRAP)
0910 HANDLE_TARGET_OPCODE(G_UBSANTRAP)
0911 
0912 /// Vector reductions
0913 HANDLE_TARGET_OPCODE(G_VECREDUCE_SEQ_FADD)
0914 HANDLE_TARGET_OPCODE(G_VECREDUCE_SEQ_FMUL)
0915 HANDLE_TARGET_OPCODE(G_VECREDUCE_FADD)
0916 HANDLE_TARGET_OPCODE(G_VECREDUCE_FMUL)
0917 HANDLE_TARGET_OPCODE(G_VECREDUCE_FMAX)
0918 HANDLE_TARGET_OPCODE(G_VECREDUCE_FMIN)
0919 HANDLE_TARGET_OPCODE(G_VECREDUCE_FMAXIMUM)
0920 HANDLE_TARGET_OPCODE(G_VECREDUCE_FMINIMUM)
0921 HANDLE_TARGET_OPCODE(G_VECREDUCE_ADD)
0922 HANDLE_TARGET_OPCODE(G_VECREDUCE_MUL)
0923 HANDLE_TARGET_OPCODE(G_VECREDUCE_AND)
0924 HANDLE_TARGET_OPCODE(G_VECREDUCE_OR)
0925 HANDLE_TARGET_OPCODE(G_VECREDUCE_XOR)
0926 HANDLE_TARGET_OPCODE(G_VECREDUCE_SMAX)
0927 HANDLE_TARGET_OPCODE(G_VECREDUCE_SMIN)
0928 HANDLE_TARGET_OPCODE(G_VECREDUCE_UMAX)
0929 HANDLE_TARGET_OPCODE(G_VECREDUCE_UMIN)
0930 
0931 HANDLE_TARGET_OPCODE(G_SBFX)
0932 HANDLE_TARGET_OPCODE(G_UBFX)
0933 
0934 /// Marker for the end of the generic opcode.
0935 /// This is used to check if an opcode is in the range of the
0936 /// generic opcodes.
0937 HANDLE_TARGET_OPCODE_MARKER(PRE_ISEL_GENERIC_OPCODE_END, G_UBFX)
0938 
0939 /// BUILTIN_OP_END - This must be the last enum value in this list.
0940 /// The target-specific post-isel opcode values start here.
0941 HANDLE_TARGET_OPCODE_MARKER(GENERIC_OP_END, PRE_ISEL_GENERIC_OPCODE_END)