LLVM  16.0.0git
IntrinsicInst.cpp
Go to the documentation of this file.
1 //===-- IntrinsicInst.cpp - Intrinsic Instruction Wrappers ---------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file implements methods that make it really easy to deal with intrinsic
10 // functions.
11 //
12 // All intrinsic function calls are instances of the call instruction, so these
13 // are all subclasses of the CallInst class. Note that none of these classes
14 // has state or virtual methods, which is an important part of this gross/neat
15 // hack working.
16 //
17 // In some cases, arguments to intrinsics need to be generic and are defined as
18 // type pointer to empty struct { }*. To access the real item of interest the
19 // cast instruction needs to be stripped away.
20 //
21 //===----------------------------------------------------------------------===//
22 
23 #include "llvm/IR/IntrinsicInst.h"
24 #include "llvm/ADT/StringSwitch.h"
25 #include "llvm/IR/Constants.h"
27 #include "llvm/IR/Metadata.h"
28 #include "llvm/IR/Module.h"
29 #include "llvm/IR/Operator.h"
30 #include "llvm/IR/PatternMatch.h"
31 #include "llvm/IR/Statepoint.h"
32 
33 using namespace llvm;
34 
36  switch (IID) {
37  case Intrinsic::objc_autorelease:
38  case Intrinsic::objc_autoreleasePoolPop:
39  case Intrinsic::objc_autoreleasePoolPush:
40  case Intrinsic::objc_autoreleaseReturnValue:
41  case Intrinsic::objc_copyWeak:
42  case Intrinsic::objc_destroyWeak:
43  case Intrinsic::objc_initWeak:
44  case Intrinsic::objc_loadWeak:
45  case Intrinsic::objc_loadWeakRetained:
46  case Intrinsic::objc_moveWeak:
47  case Intrinsic::objc_release:
48  case Intrinsic::objc_retain:
49  case Intrinsic::objc_retainAutorelease:
50  case Intrinsic::objc_retainAutoreleaseReturnValue:
51  case Intrinsic::objc_retainAutoreleasedReturnValue:
52  case Intrinsic::objc_retainBlock:
53  case Intrinsic::objc_storeStrong:
54  case Intrinsic::objc_storeWeak:
55  case Intrinsic::objc_unsafeClaimAutoreleasedReturnValue:
56  case Intrinsic::objc_retainedObject:
57  case Intrinsic::objc_unretainedObject:
58  case Intrinsic::objc_unretainedPointer:
59  case Intrinsic::objc_retain_autorelease:
60  case Intrinsic::objc_sync_enter:
61  case Intrinsic::objc_sync_exit:
62  return true;
63  default:
64  return false;
65  }
66 }
67 
68 //===----------------------------------------------------------------------===//
69 /// DbgVariableIntrinsic - This is the common base class for debug info
70 /// intrinsics for variables.
71 ///
72 
75  auto *MD = getRawLocation();
76  assert(MD && "First operand of DbgVariableIntrinsic should be non-null.");
77 
78  // If operand is ValueAsMetadata, return a range over just that operand.
79  if (auto *VAM = dyn_cast<ValueAsMetadata>(MD)) {
80  return {location_op_iterator(VAM), location_op_iterator(VAM + 1)};
81  }
82  // If operand is DIArgList, return a range over its args.
83  if (auto *AL = dyn_cast<DIArgList>(MD))
84  return {location_op_iterator(AL->args_begin()),
85  location_op_iterator(AL->args_end())};
86  // Operand must be an empty metadata tuple, so return empty iterator.
87  return {location_op_iterator(static_cast<ValueAsMetadata *>(nullptr)),
88  location_op_iterator(static_cast<ValueAsMetadata *>(nullptr))};
89 }
90 
92  auto *MD = getRawLocation();
93  assert(MD && "First operand of DbgVariableIntrinsic should be non-null.");
94  if (auto *AL = dyn_cast<DIArgList>(MD))
95  return AL->getArgs()[OpIdx]->getValue();
96  if (isa<MDNode>(MD))
97  return nullptr;
98  assert(
99  isa<ValueAsMetadata>(MD) &&
100  "Attempted to get location operand from DbgVariableIntrinsic with none.");
101  auto *V = cast<ValueAsMetadata>(MD);
102  assert(OpIdx == 0 && "Operand Index must be 0 for a debug intrinsic with a "
103  "single location operand.");
104  return V->getValue();
105 }
106 
108  return isa<MetadataAsValue>(V) ? dyn_cast<ValueAsMetadata>(
109  cast<MetadataAsValue>(V)->getMetadata())
111 }
112 
114  Value *NewValue) {
115  assert(NewValue && "Values must be non-null");
116  auto Locations = location_ops();
117  auto OldIt = find(Locations, OldValue);
118  assert(OldIt != Locations.end() && "OldValue must be a current location");
119  if (!hasArgList()) {
120  Value *NewOperand = isa<MetadataAsValue>(NewValue)
121  ? NewValue
123  getContext(), ValueAsMetadata::get(NewValue));
124  return setArgOperand(0, NewOperand);
125  }
127  ValueAsMetadata *NewOperand = getAsMetadata(NewValue);
128  for (auto *VMD : Locations)
129  MDs.push_back(VMD == *OldIt ? NewOperand : getAsMetadata(VMD));
130  setArgOperand(
132 }
134  Value *NewValue) {
135  assert(OpIdx < getNumVariableLocationOps() && "Invalid Operand Index");
136  if (!hasArgList()) {
137  Value *NewOperand = isa<MetadataAsValue>(NewValue)
138  ? NewValue
140  getContext(), ValueAsMetadata::get(NewValue));
141  return setArgOperand(0, NewOperand);
142  }
144  ValueAsMetadata *NewOperand = getAsMetadata(NewValue);
145  for (unsigned Idx = 0; Idx < getNumVariableLocationOps(); ++Idx)
146  MDs.push_back(Idx == OpIdx ? NewOperand
148  setArgOperand(
150 }
151 
154  assert(NewExpr->hasAllLocationOps(getNumVariableLocationOps() +
155  NewValues.size()) &&
156  "NewExpr for debug variable intrinsic does not reference every "
157  "location operand.");
158  assert(!is_contained(NewValues, nullptr) && "New values must be non-null");
159  setArgOperand(2, MetadataAsValue::get(getContext(), NewExpr));
161  for (auto *VMD : location_ops())
162  MDs.push_back(getAsMetadata(VMD));
163  for (auto *VMD : NewValues)
164  MDs.push_back(getAsMetadata(VMD));
165  setArgOperand(
167 }
168 
170  if (auto Fragment = getExpression()->getFragmentInfo())
171  return Fragment->SizeInBits;
172  return getVariable()->getSizeInBits();
173 }
174 
176  StringRef Name) {
177  assert(Name.startswith("llvm."));
178 
179  // Do successive binary searches of the dotted name components. For
180  // "llvm.gc.experimental.statepoint.p1i8.p1i32", we will find the range of
181  // intrinsics starting with "llvm.gc", then "llvm.gc.experimental", then
182  // "llvm.gc.experimental.statepoint", and then we will stop as the range is
183  // size 1. During the search, we can skip the prefix that we already know is
184  // identical. By using strncmp we consider names with differing suffixes to
185  // be part of the equal range.
186  size_t CmpEnd = 4; // Skip the "llvm" component.
187  const char *const *Low = NameTable.begin();
188  const char *const *High = NameTable.end();
189  const char *const *LastLow = Low;
190  while (CmpEnd < Name.size() && High - Low > 0) {
191  size_t CmpStart = CmpEnd;
192  CmpEnd = Name.find('.', CmpStart + 1);
193  CmpEnd = CmpEnd == StringRef::npos ? Name.size() : CmpEnd;
194  auto Cmp = [CmpStart, CmpEnd](const char *LHS, const char *RHS) {
195  return strncmp(LHS + CmpStart, RHS + CmpStart, CmpEnd - CmpStart) < 0;
196  };
197  LastLow = Low;
198  std::tie(Low, High) = std::equal_range(Low, High, Name.data(), Cmp);
199  }
200  if (High - Low > 0)
201  LastLow = Low;
202 
203  if (LastLow == NameTable.end())
204  return -1;
205  StringRef NameFound = *LastLow;
206  if (Name == NameFound ||
207  (Name.startswith(NameFound) && Name[NameFound.size()] == '.'))
208  return LastLow - NameTable.begin();
209  return -1;
210 }
211 
214  llvm_unreachable("InstrProfValueProfileInst does not have counters!");
215  return cast<ConstantInt>(const_cast<Value *>(getArgOperand(2)));
216 }
217 
220  llvm_unreachable("Please use InstrProfValueProfileInst::getIndex()");
221  return cast<ConstantInt>(const_cast<Value *>(getArgOperand(3)));
222 }
223 
226  return const_cast<Value *>(getArgOperand(4));
227  }
228  const Module *M = getModule();
229  LLVMContext &Context = M->getContext();
231 }
232 
234  unsigned NumOperands = arg_size();
235  Metadata *MD = nullptr;
236  auto *MAV = dyn_cast<MetadataAsValue>(getArgOperand(NumOperands - 2));
237  if (MAV)
238  MD = MAV->getMetadata();
239  if (!MD || !isa<MDString>(MD))
240  return None;
241  return convertStrToRoundingMode(cast<MDString>(MD)->getString());
242 }
243 
246  unsigned NumOperands = arg_size();
247  Metadata *MD = nullptr;
248  auto *MAV = dyn_cast<MetadataAsValue>(getArgOperand(NumOperands - 1));
249  if (MAV)
250  MD = MAV->getMetadata();
251  if (!MD || !isa<MDString>(MD))
252  return None;
253  return convertStrToExceptionBehavior(cast<MDString>(MD)->getString());
254 }
255 
258  if (Except) {
259  if (Except.value() != fp::ebIgnore)
260  return false;
261  }
262 
264  if (Rounding) {
266  return false;
267  }
268 
269  return true;
270 }
271 
273  Metadata *MD = cast<MetadataAsValue>(Op)->getMetadata();
274  if (!MD || !isa<MDString>(MD))
276  return StringSwitch<FCmpInst::Predicate>(cast<MDString>(MD)->getString())
277  .Case("oeq", FCmpInst::FCMP_OEQ)
278  .Case("ogt", FCmpInst::FCMP_OGT)
279  .Case("oge", FCmpInst::FCMP_OGE)
280  .Case("olt", FCmpInst::FCMP_OLT)
281  .Case("ole", FCmpInst::FCMP_OLE)
282  .Case("one", FCmpInst::FCMP_ONE)
283  .Case("ord", FCmpInst::FCMP_ORD)
284  .Case("uno", FCmpInst::FCMP_UNO)
285  .Case("ueq", FCmpInst::FCMP_UEQ)
286  .Case("ugt", FCmpInst::FCMP_UGT)
287  .Case("uge", FCmpInst::FCMP_UGE)
288  .Case("ult", FCmpInst::FCMP_ULT)
289  .Case("ule", FCmpInst::FCMP_ULE)
290  .Case("une", FCmpInst::FCMP_UNE)
292 }
293 
296 }
297 
299  switch (getIntrinsicID()) {
300  default:
301  return false;
302 #define INSTRUCTION(NAME, NARG, ROUND_MODE, INTRINSIC) \
303  case Intrinsic::INTRINSIC: \
304  return NARG == 1;
305 #include "llvm/IR/ConstrainedOps.def"
306  }
307 }
308 
310  switch (getIntrinsicID()) {
311  default:
312  return false;
313 #define INSTRUCTION(NAME, NARG, ROUND_MODE, INTRINSIC) \
314  case Intrinsic::INTRINSIC: \
315  return NARG == 3;
316 #include "llvm/IR/ConstrainedOps.def"
317  }
318 }
319 
321  switch (I->getIntrinsicID()) {
322 #define INSTRUCTION(NAME, NARGS, ROUND_MODE, INTRINSIC) \
323  case Intrinsic::INTRINSIC:
324 #include "llvm/IR/ConstrainedOps.def"
325  return true;
326  default:
327  return false;
328  }
329 }
330 
332  auto GetVectorLengthOfType = [](const Type *T) -> ElementCount {
333  const auto *VT = cast<VectorType>(T);
334  auto ElemCount = VT->getElementCount();
335  return ElemCount;
336  };
337 
338  Value *VPMask = getMaskParam();
339  if (!VPMask) {
340  assert((getIntrinsicID() == Intrinsic::vp_merge ||
341  getIntrinsicID() == Intrinsic::vp_select) &&
342  "Unexpected VP intrinsic without mask operand");
343  return GetVectorLengthOfType(getType());
344  }
345  return GetVectorLengthOfType(VPMask->getType());
346 }
347 
349  if (auto MaskPos = getMaskParamPos(getIntrinsicID()))
350  return getArgOperand(*MaskPos);
351  return nullptr;
352 }
353 
355  auto MaskPos = getMaskParamPos(getIntrinsicID());
356  setArgOperand(*MaskPos, NewMask);
357 }
358 
360  if (auto EVLPos = getVectorLengthParamPos(getIntrinsicID()))
361  return getArgOperand(*EVLPos);
362  return nullptr;
363 }
364 
366  auto EVLPos = getVectorLengthParamPos(getIntrinsicID());
367  setArgOperand(*EVLPos, NewEVL);
368 }
369 
371  switch (IntrinsicID) {
372  default:
373  return None;
374 
375 #define BEGIN_REGISTER_VP_INTRINSIC(VPID, MASKPOS, VLENPOS) \
376  case Intrinsic::VPID: \
377  return MASKPOS;
378 #include "llvm/IR/VPIntrinsics.def"
379  }
380 }
381 
384  switch (IntrinsicID) {
385  default:
386  return None;
387 
388 #define BEGIN_REGISTER_VP_INTRINSIC(VPID, MASKPOS, VLENPOS) \
389  case Intrinsic::VPID: \
390  return VLENPOS;
391 #include "llvm/IR/VPIntrinsics.def"
392  }
393 }
394 
395 /// \return the alignment of the pointer used by this load/store/gather or
396 /// scatter.
399  assert(PtrParamOpt && "no pointer argument!");
400  return getParamAlign(PtrParamOpt.value());
401 }
402 
403 /// \return The pointer operand of this load,store, gather or scatter.
405  if (auto PtrParamOpt = getMemoryPointerParamPos(getIntrinsicID()))
406  return getArgOperand(PtrParamOpt.value());
407  return nullptr;
408 }
409 
411  switch (VPID) {
412  default:
413  break;
414 #define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) case Intrinsic::VPID:
415 #define VP_PROPERTY_MEMOP(POINTERPOS, ...) return POINTERPOS;
416 #define END_REGISTER_VP_INTRINSIC(VPID) break;
417 #include "llvm/IR/VPIntrinsics.def"
418  }
419  return None;
420 }
421 
422 /// \return The data (payload) operand of this store or scatter.
424  auto DataParamOpt = getMemoryDataParamPos(getIntrinsicID());
425  if (!DataParamOpt)
426  return nullptr;
427  return getArgOperand(DataParamOpt.value());
428 }
429 
431  switch (VPID) {
432  default:
433  break;
434 #define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) case Intrinsic::VPID:
435 #define VP_PROPERTY_MEMOP(POINTERPOS, DATAPOS) return DATAPOS;
436 #define END_REGISTER_VP_INTRINSIC(VPID) break;
437 #include "llvm/IR/VPIntrinsics.def"
438  }
439  return None;
440 }
441 
443  switch (ID) {
444  default:
445  break;
446 #define BEGIN_REGISTER_VP_INTRINSIC(VPID, MASKPOS, VLENPOS) \
447  case Intrinsic::VPID: \
448  return true;
449 #include "llvm/IR/VPIntrinsics.def"
450  }
451  return false;
452 }
453 
454 // Equivalent non-predicated opcode
456  switch (ID) {
457  default:
458  break;
459 #define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) case Intrinsic::VPID:
460 #define VP_PROPERTY_FUNCTIONAL_OPC(OPC) return Instruction::OPC;
461 #define END_REGISTER_VP_INTRINSIC(VPID) break;
462 #include "llvm/IR/VPIntrinsics.def"
463  }
464  return None;
465 }
466 
468  switch (IROPC) {
469  default:
470  break;
471 
472 #define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) break;
473 #define VP_PROPERTY_FUNCTIONAL_OPC(OPC) case Instruction::OPC:
474 #define END_REGISTER_VP_INTRINSIC(VPID) return Intrinsic::VPID;
475 #include "llvm/IR/VPIntrinsics.def"
476  }
478 }
479 
481  using namespace PatternMatch;
482 
484 
485  // No vlen param - no lanes masked-off by it.
486  auto *VLParam = getVectorLengthParam();
487  if (!VLParam)
488  return true;
489 
490  // Note that the VP intrinsic causes undefined behavior if the Explicit Vector
491  // Length parameter is strictly greater-than the number of vector elements of
492  // the operation. This function returns true when this is detected statically
493  // in the IR.
494 
495  // Check whether "W == vscale * EC.getKnownMinValue()"
496  if (EC.isScalable()) {
497  // Undig the DL
498  const auto *ParMod = this->getModule();
499  if (!ParMod)
500  return false;
501  const auto &DL = ParMod->getDataLayout();
502 
503  // Compare vscale patterns
504  uint64_t VScaleFactor;
505  if (match(VLParam, m_c_Mul(m_ConstantInt(VScaleFactor), m_VScale(DL))))
506  return VScaleFactor >= EC.getKnownMinValue();
507  return (EC.getKnownMinValue() == 1) && match(VLParam, m_VScale(DL));
508  }
509 
510  // standard SIMD operation
511  const auto *VLConst = dyn_cast<ConstantInt>(VLParam);
512  if (!VLConst)
513  return false;
514 
515  uint64_t VLNum = VLConst->getZExtValue();
516  if (VLNum >= EC.getKnownMinValue())
517  return true;
518 
519  return false;
520 }
521 
523  Type *ReturnType,
524  ArrayRef<Value *> Params) {
525  assert(isVPIntrinsic(VPID) && "not a VP intrinsic");
526  Function *VPFunc;
527  switch (VPID) {
528  default: {
529  Type *OverloadTy = Params[0]->getType();
531  OverloadTy =
532  Params[*VPReductionIntrinsic::getVectorParamPos(VPID)]->getType();
533 
534  VPFunc = Intrinsic::getDeclaration(M, VPID, OverloadTy);
535  break;
536  }
537  case Intrinsic::vp_trunc:
538  case Intrinsic::vp_sext:
539  case Intrinsic::vp_zext:
540  case Intrinsic::vp_fptoui:
541  case Intrinsic::vp_fptosi:
542  case Intrinsic::vp_uitofp:
543  case Intrinsic::vp_sitofp:
544  case Intrinsic::vp_fptrunc:
545  case Intrinsic::vp_fpext:
546  case Intrinsic::vp_ptrtoint:
547  case Intrinsic::vp_inttoptr:
548  VPFunc =
549  Intrinsic::getDeclaration(M, VPID, {ReturnType, Params[0]->getType()});
550  break;
551  case Intrinsic::vp_merge:
552  case Intrinsic::vp_select:
553  VPFunc = Intrinsic::getDeclaration(M, VPID, {Params[1]->getType()});
554  break;
555  case Intrinsic::vp_load:
556  VPFunc = Intrinsic::getDeclaration(
557  M, VPID, {ReturnType, Params[0]->getType()});
558  break;
559  case Intrinsic::experimental_vp_strided_load:
560  VPFunc = Intrinsic::getDeclaration(
561  M, VPID, {ReturnType, Params[0]->getType(), Params[1]->getType()});
562  break;
563  case Intrinsic::vp_gather:
564  VPFunc = Intrinsic::getDeclaration(
565  M, VPID, {ReturnType, Params[0]->getType()});
566  break;
567  case Intrinsic::vp_store:
568  VPFunc = Intrinsic::getDeclaration(
569  M, VPID, {Params[0]->getType(), Params[1]->getType()});
570  break;
571  case Intrinsic::experimental_vp_strided_store:
572  VPFunc = Intrinsic::getDeclaration(
573  M, VPID,
574  {Params[0]->getType(), Params[1]->getType(), Params[2]->getType()});
575  break;
576  case Intrinsic::vp_scatter:
577  VPFunc = Intrinsic::getDeclaration(
578  M, VPID, {Params[0]->getType(), Params[1]->getType()});
579  break;
580  }
581  assert(VPFunc && "Could not declare VP intrinsic");
582  return VPFunc;
583 }
584 
586  switch (ID) {
587  default:
588  break;
589 #define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) case Intrinsic::VPID:
590 #define VP_PROPERTY_REDUCTION(STARTPOS, ...) return true;
591 #define END_REGISTER_VP_INTRINSIC(VPID) break;
592 #include "llvm/IR/VPIntrinsics.def"
593  }
594  return false;
595 }
596 
598  switch (ID) {
599  default:
600  break;
601 #define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) case Intrinsic::VPID:
602 #define VP_PROPERTY_CASTOP return true;
603 #define END_REGISTER_VP_INTRINSIC(VPID) break;
604 #include "llvm/IR/VPIntrinsics.def"
605  }
606  return false;
607 }
608 
610  switch (ID) {
611  default:
612  break;
613 #define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) case Intrinsic::VPID:
614 #define VP_PROPERTY_CMP(CCPOS, ...) return true;
615 #define END_REGISTER_VP_INTRINSIC(VPID) break;
616 #include "llvm/IR/VPIntrinsics.def"
617  }
618  return false;
619 }
620 
622  Metadata *MD = cast<MetadataAsValue>(Op)->getMetadata();
623  if (!MD || !isa<MDString>(MD))
625  return StringSwitch<ICmpInst::Predicate>(cast<MDString>(MD)->getString())
626  .Case("eq", ICmpInst::ICMP_EQ)
627  .Case("ne", ICmpInst::ICMP_NE)
628  .Case("ugt", ICmpInst::ICMP_UGT)
629  .Case("uge", ICmpInst::ICMP_UGE)
630  .Case("ult", ICmpInst::ICMP_ULT)
631  .Case("ule", ICmpInst::ICMP_ULE)
632  .Case("sgt", ICmpInst::ICMP_SGT)
633  .Case("sge", ICmpInst::ICMP_SGE)
634  .Case("slt", ICmpInst::ICMP_SLT)
635  .Case("sle", ICmpInst::ICMP_SLE)
637 }
638 
640  bool IsFP = true;
641  Optional<unsigned> CCArgIdx;
642  switch (getIntrinsicID()) {
643  default:
644  break;
645 #define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) case Intrinsic::VPID:
646 #define VP_PROPERTY_CMP(CCPOS, ISFP) \
647  CCArgIdx = CCPOS; \
648  IsFP = ISFP; \
649  break;
650 #define END_REGISTER_VP_INTRINSIC(VPID) break;
651 #include "llvm/IR/VPIntrinsics.def"
652  }
653  assert(CCArgIdx && "Unexpected vector-predicated comparison");
654  return IsFP ? getFPPredicateFromMD(getArgOperand(*CCArgIdx))
655  : getIntPredicateFromMD(getArgOperand(*CCArgIdx));
656 }
657 
660 }
661 
664 }
665 
667  switch (ID) {
668 #define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) case Intrinsic::VPID:
669 #define VP_PROPERTY_REDUCTION(STARTPOS, VECTORPOS) return VECTORPOS;
670 #define END_REGISTER_VP_INTRINSIC(VPID) break;
671 #include "llvm/IR/VPIntrinsics.def"
672  default:
673  break;
674  }
675  return None;
676 }
677 
679  switch (ID) {
680 #define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) case Intrinsic::VPID:
681 #define VP_PROPERTY_REDUCTION(STARTPOS, VECTORPOS) return STARTPOS;
682 #define END_REGISTER_VP_INTRINSIC(VPID) break;
683 #include "llvm/IR/VPIntrinsics.def"
684  default:
685  break;
686  }
687  return None;
688 }
689 
691  switch (getIntrinsicID()) {
692  case Intrinsic::uadd_with_overflow:
693  case Intrinsic::sadd_with_overflow:
694  case Intrinsic::uadd_sat:
695  case Intrinsic::sadd_sat:
696  return Instruction::Add;
697  case Intrinsic::usub_with_overflow:
698  case Intrinsic::ssub_with_overflow:
699  case Intrinsic::usub_sat:
700  case Intrinsic::ssub_sat:
701  return Instruction::Sub;
702  case Intrinsic::umul_with_overflow:
703  case Intrinsic::smul_with_overflow:
704  return Instruction::Mul;
705  default:
706  llvm_unreachable("Invalid intrinsic");
707  }
708 }
709 
711  switch (getIntrinsicID()) {
712  case Intrinsic::sadd_with_overflow:
713  case Intrinsic::ssub_with_overflow:
714  case Intrinsic::smul_with_overflow:
715  case Intrinsic::sadd_sat:
716  case Intrinsic::ssub_sat:
717  return true;
718  default:
719  return false;
720  }
721 }
722 
724  if (isSigned())
726  else
728 }
729 
731  const Value *Token = getArgOperand(0);
732  if (isa<UndefValue>(Token))
733  return Token;
734 
735  // This takes care both of relocates for call statepoints and relocates
736  // on normal path of invoke statepoint.
737  if (!isa<LandingPadInst>(Token))
738  return cast<GCStatepointInst>(Token);
739 
740  // This relocate is on exceptional path of an invoke statepoint
741  const BasicBlock *InvokeBB =
742  cast<Instruction>(Token)->getParent()->getUniquePredecessor();
743 
744  assert(InvokeBB && "safepoints should have unique landingpads");
745  assert(InvokeBB->getTerminator() &&
746  "safepoint block should be well formed");
747 
748  return cast<GCStatepointInst>(InvokeBB->getTerminator());
749 }
750 
752  auto Statepoint = getStatepoint();
753  if (isa<UndefValue>(Statepoint))
754  return UndefValue::get(Statepoint->getType());
755 
756  auto *GCInst = cast<GCStatepointInst>(Statepoint);
757  if (auto Opt = GCInst->getOperandBundle(LLVMContext::OB_gc_live))
758  return *(Opt->Inputs.begin() + getBasePtrIndex());
759  return *(GCInst->arg_begin() + getBasePtrIndex());
760 }
761 
763  auto *Statepoint = getStatepoint();
764  if (isa<UndefValue>(Statepoint))
765  return UndefValue::get(Statepoint->getType());
766 
767  auto *GCInst = cast<GCStatepointInst>(Statepoint);
768  if (auto Opt = GCInst->getOperandBundle(LLVMContext::OB_gc_live))
769  return *(Opt->Inputs.begin() + getDerivedPtrIndex());
770  return *(GCInst->arg_begin() + getDerivedPtrIndex());
771 }
llvm::StringSwitch::Case
StringSwitch & Case(StringLiteral S, T Value)
Definition: StringSwitch.h:69
llvm::CmpInst::FCMP_ULE
@ FCMP_ULE
1 1 0 1 True if unordered, less than, or equal
Definition: InstrTypes.h:734
llvm::DbgVariableIntrinsic::getExpression
DIExpression * getExpression() const
Definition: IntrinsicInst.h:262
llvm::BinaryOpIntrinsic::getBinaryOp
Instruction::BinaryOps getBinaryOp() const
Returns the binary operation underlying the intrinsic.
Definition: IntrinsicInst.cpp:690
llvm::VPIntrinsic::getVectorLengthParamPos
static Optional< unsigned > getVectorLengthParamPos(Intrinsic::ID IntrinsicID)
Definition: IntrinsicInst.cpp:383
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::InstrProfIncrementInst::getStep
Value * getStep() const
Definition: IntrinsicInst.cpp:224
M
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
Definition: README.txt:252
llvm::Instruction::getModule
const Module * getModule() const
Return the module owning the function this instruction belongs to or nullptr it the function does not...
Definition: Instruction.cpp:65
llvm::AArch64CC::AL
@ AL
Definition: AArch64BaseInfo.h:269
llvm::CmpInst::ICMP_EQ
@ ICMP_EQ
equal
Definition: InstrTypes.h:740
llvm::Intrinsic::getDeclaration
Function * getDeclaration(Module *M, ID id, ArrayRef< Type * > Tys=None)
Create or insert an LLVM Function declaration for an intrinsic, and return it.
Definition: Function.cpp:1421
Metadata.h
llvm::CmpInst::Predicate
Predicate
This enumeration lists the possible predicates for CmpInst subclasses.
Definition: InstrTypes.h:719
llvm::BasicBlock::getParent
const Function * getParent() const
Return the enclosing method, or null if none.
Definition: BasicBlock.h:104
IntrinsicInst.h
llvm::ElementCount
Definition: TypeSize.h:404
DebugInfoMetadata.h
T
llvm::Function
Definition: Function.h:60
llvm::IntrinsicInst::getIntrinsicID
Intrinsic::ID getIntrinsicID() const
Return the intrinsic ID of this intrinsic.
Definition: IntrinsicInst.h:53
High
uint64_t High
Definition: NVVMIntrRange.cpp:61
llvm::StringRef::npos
static constexpr size_t npos
Definition: StringRef.h:52
llvm::SmallVector
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1181
llvm::DIVariable::getSizeInBits
Optional< uint64_t > getSizeInBits() const
Determines the size of the variable's type.
Definition: DebugInfoMetadata.cpp:1171
llvm::InstrProfIncrementInstStep::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:1282
llvm::CmpInst::FCMP_ONE
@ FCMP_ONE
0 1 1 0 True if ordered and operands are unequal
Definition: InstrTypes.h:727
llvm::VPIntrinsic::setVectorLengthParam
void setVectorLengthParam(Value *)
Definition: IntrinsicInst.cpp:365
llvm::VPCmpIntrinsic::getPredicate
CmpInst::Predicate getPredicate() const
Definition: IntrinsicInst.cpp:639
llvm::CmpInst::ICMP_NE
@ ICMP_NE
not equal
Definition: InstrTypes.h:741
llvm::DbgVariableIntrinsic::replaceVariableLocationOp
void replaceVariableLocationOp(Value *OldValue, Value *NewValue)
Definition: IntrinsicInst.cpp:113
llvm::VPIntrinsic::canIgnoreVectorLengthParam
bool canIgnoreVectorLengthParam() const
Definition: IntrinsicInst.cpp:480
llvm::ConstrainedFPIntrinsic::isDefaultFPEnvironment
bool isDefaultFPEnvironment() const
Definition: IntrinsicInst.cpp:256
NewExpr
Definition: ItaniumDemangle.h:1934
llvm::CmpInst::ICMP_SGT
@ ICMP_SGT
signed greater than
Definition: InstrTypes.h:746
llvm::VPIntrinsic::getDeclarationForParams
static Function * getDeclarationForParams(Module *M, Intrinsic::ID, Type *ReturnType, ArrayRef< Value * > Params)
Declares a llvm.vp.
Definition: IntrinsicInst.cpp:522
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
llvm::Intrinsic::lookupLLVMIntrinsicByName
int lookupLLVMIntrinsicByName(ArrayRef< const char * > NameTable, StringRef Name)
Looks up Name in NameTable via binary search.
Definition: IntrinsicInst.cpp:175
Module.h
llvm::VPIntrinsic::getMemoryDataParam
Value * getMemoryDataParam() const
Definition: IntrinsicInst.cpp:423
llvm::InstrProfInstBase::getIndex
ConstantInt * getIndex() const
Definition: IntrinsicInst.cpp:218
llvm::DbgVariableIntrinsic::getVariable
DILocalVariable * getVariable() const
Definition: IntrinsicInst.h:258
llvm::InstrProfInstBase::getNumCounters
ConstantInt * getNumCounters() const
Definition: IntrinsicInst.cpp:212
llvm::VPIntrinsic::getFunctionalOpcodeForVP
static Optional< unsigned > getFunctionalOpcodeForVP(Intrinsic::ID ID)
Definition: IntrinsicInst.cpp:455
llvm::Optional< uint64_t >
Operator.h
llvm::ConstrainedFPIntrinsic::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.cpp:320
llvm::CmpInst::ICMP_SLE
@ ICMP_SLE
signed less or equal
Definition: InstrTypes.h:749
llvm::ValueAsMetadata::get
static ValueAsMetadata * get(Value *V)
Definition: Metadata.cpp:393
llvm::Intrinsic::not_intrinsic
@ not_intrinsic
Definition: Intrinsics.h:45
llvm::DIExpression
DWARF expression.
Definition: DebugInfoMetadata.h:2558
RHS
Value * RHS
Definition: X86PartialReduction.cpp:76
llvm::PatternMatch::m_VScale
VScaleVal_match m_VScale(const DataLayout &DL)
Definition: PatternMatch.h:2489
llvm::CmpInst::FCMP_OGT
@ FCMP_OGT
0 0 1 0 True if ordered and greater than
Definition: InstrTypes.h:723
llvm::DbgVariableIntrinsic::getVariableLocationOp
Value * getVariableLocationOp(unsigned OpIdx) const
Definition: IntrinsicInst.cpp:91
llvm::MDNode::get
static MDTuple * get(LLVMContext &Context, ArrayRef< Metadata * > MDs)
Definition: Metadata.h:1400
llvm::VPIntrinsic::setMaskParam
void setMaskParam(Value *)
Definition: IntrinsicInst.cpp:354
llvm::BasicBlock
LLVM Basic Block Representation.
Definition: BasicBlock.h:55
llvm::CmpInst::FCMP_ULT
@ FCMP_ULT
1 1 0 0 True if unordered or less than
Definition: InstrTypes.h:733
Context
LLVMContext & Context
Definition: NVVMIntrRange.cpp:66
llvm::VPReductionIntrinsic::isVPReduction
static bool isVPReduction(Intrinsic::ID ID)
Definition: IntrinsicInst.cpp:585
LHS
Value * LHS
Definition: X86PartialReduction.cpp:75
llvm::ConstantInt
This is the shared class of boolean and integer constants.
Definition: Constants.h:79
llvm::DbgVariableIntrinsic::addVariableLocationOps
void addVariableLocationOps(ArrayRef< Value * > NewValues, DIExpression *NewExpr)
Adding a new location operand will always result in this intrinsic using an ArgList,...
Definition: IntrinsicInst.cpp:152
Constants.h
llvm::PatternMatch::match
bool match(Val *V, const Pattern &P)
Definition: PatternMatch.h:49
llvm::CmpInst::ICMP_ULE
@ ICMP_ULE
unsigned less or equal
Definition: InstrTypes.h:745
llvm::CmpInst::FCMP_UGE
@ FCMP_UGE
1 0 1 1 True if unordered, greater than, or equal
Definition: InstrTypes.h:732
llvm::BinaryOpIntrinsic::getNoWrapKind
unsigned getNoWrapKind() const
Returns one of OBO::NoSignedWrap or OBO::NoUnsignedWrap.
Definition: IntrinsicInst.cpp:723
llvm::MaybeAlign
This struct is a compact representation of a valid (power of two) or undefined (0) alignment.
Definition: Alignment.h:117
llvm::PatternMatch::m_ConstantInt
class_match< ConstantInt > m_ConstantInt()
Match an arbitrary ConstantInt and ignore it.
Definition: PatternMatch.h:147
llvm::CmpInst::FCMP_UNO
@ FCMP_UNO
1 0 0 0 True if unordered: isnan(X) | isnan(Y)
Definition: InstrTypes.h:729
llvm::UndefValue::get
static UndefValue * get(Type *T)
Static factory methods - Return an 'undef' object of the specified type.
Definition: Constants.cpp:1713
llvm::ThreadPriority::Low
@ Low
Lower the current thread's priority such that it does not affect foreground tasks significantly.
llvm::ConstantInt::get
static Constant * get(Type *Ty, uint64_t V, bool IsSigned=false)
If Ty is a vector type, return a Constant with a splat of the given value.
Definition: Constants.cpp:879
llvm::VPIntrinsic::getForOpcode
static Intrinsic::ID getForOpcode(unsigned OC)
The llvm.vp.* intrinsics for this instruction Opcode.
Definition: IntrinsicInst.cpp:467
llvm::CmpInst::FCMP_OEQ
@ FCMP_OEQ
0 0 0 1 True if ordered and equal
Definition: InstrTypes.h:722
llvm::DbgVariableIntrinsic::hasArgList
bool hasArgList() const
Definition: IntrinsicInst.h:232
llvm::CmpInst::FCMP_OLT
@ FCMP_OLT
0 1 0 0 True if ordered and less than
Definition: InstrTypes.h:725
PatternMatch.h
llvm::Metadata
Root of the metadata hierarchy.
Definition: Metadata.h:62
llvm::GCProjectionInst::getStatepoint
const Value * getStatepoint() const
The statepoint with which this gc.relocate is associated.
Definition: IntrinsicInst.cpp:730
llvm::DbgVariableIntrinsic::getNumVariableLocationOps
unsigned getNumVariableLocationOps() const
Definition: IntrinsicInst.h:226
llvm::None
const NoneType None
Definition: None.h:24
Statepoint.h
llvm::CallingConv::ID
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
Definition: CallingConv.h:24
llvm::VPCmpIntrinsic::isVPCmp
static bool isVPCmp(Intrinsic::ID ID)
Definition: IntrinsicInst.cpp:609
getFPPredicateFromMD
static FCmpInst::Predicate getFPPredicateFromMD(const Value *Op)
Definition: IntrinsicInst.cpp:272
llvm::VPIntrinsic::getMemoryPointerParamPos
static Optional< unsigned > getMemoryPointerParamPos(Intrinsic::ID)
Definition: IntrinsicInst.cpp:410
llvm::VPIntrinsic::getVectorLengthParam
Value * getVectorLengthParam() const
Definition: IntrinsicInst.cpp:359
llvm::VPIntrinsic::getStaticVectorLength
ElementCount getStaticVectorLength() const
Definition: IntrinsicInst.cpp:331
llvm::OverflowingBinaryOperator::NoUnsignedWrap
@ NoUnsignedWrap
Definition: Operator.h:76
llvm::BinaryOpIntrinsic::isSigned
bool isSigned() const
Whether the intrinsic is signed or unsigned.
Definition: IntrinsicInst.cpp:710
uint64_t
llvm::find
auto find(R &&Range, const T &Val)
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly.
Definition: STLExtras.h:1610
llvm::VPIntrinsic::getPointerAlignment
MaybeAlign getPointerAlignment() const
Definition: IntrinsicInst.cpp:397
llvm::GCRelocateInst::getDerivedPtr
Value * getDerivedPtr() const
Definition: IntrinsicInst.cpp:762
llvm::LLVMContext
This is an important class for using LLVM in a threaded context.
Definition: LLVMContext.h:67
I
#define I(x, y, z)
Definition: MD5.cpp:58
llvm::is_contained
bool is_contained(R &&Range, const E &Element)
Wrapper function around std::find to detect if an element exists in a container.
Definition: STLExtras.h:1673
llvm::VPIntrinsic::isVPIntrinsic
static bool isVPIntrinsic(Intrinsic::ID)
Definition: IntrinsicInst.cpp:442
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::CmpInst::FCMP_OGE
@ FCMP_OGE
0 0 1 1 True if ordered and greater than or equal
Definition: InstrTypes.h:724
llvm::CmpInst::ICMP_UGE
@ ICMP_UGE
unsigned greater or equal
Definition: InstrTypes.h:743
llvm::convertStrToExceptionBehavior
Optional< fp::ExceptionBehavior > convertStrToExceptionBehavior(StringRef)
Returns a valid ExceptionBehavior enumerator when given a string valid as input in constrained intrin...
Definition: FPEnv.cpp:64
llvm::CmpInst::BAD_ICMP_PREDICATE
@ BAD_ICMP_PREDICATE
Definition: InstrTypes.h:752
llvm::Module
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:65
getIntPredicateFromMD
static ICmpInst::Predicate getIntPredicateFromMD(const Value *Op)
Definition: IntrinsicInst.cpp:621
llvm::VPIntrinsic::getMemoryDataParamPos
static Optional< unsigned > getMemoryDataParamPos(Intrinsic::ID)
Definition: IntrinsicInst.cpp:430
llvm::ARM::WinEH::ReturnType
ReturnType
Definition: ARMWinEH.h:25
llvm::CmpInst::ICMP_SLT
@ ICMP_SLT
signed less than
Definition: InstrTypes.h:748
llvm::ConstrainedFPCmpIntrinsic::getPredicate
FCmpInst::Predicate getPredicate() const
Definition: IntrinsicInst.cpp:294
llvm::ArrayRef
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: APInt.h:32
llvm::ConstrainedFPIntrinsic::getExceptionBehavior
Optional< fp::ExceptionBehavior > getExceptionBehavior() const
Definition: IntrinsicInst.cpp:245
Mul
BinaryOperator * Mul
Definition: X86PartialReduction.cpp:70
llvm::CallBase::getParamAlign
MaybeAlign getParamAlign(unsigned ArgNo) const
Extract the alignment for a call or parameter (0=unknown).
Definition: InstrTypes.h:1742
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
llvm::CmpInst::ICMP_ULT
@ ICMP_ULT
unsigned less than
Definition: InstrTypes.h:744
llvm_unreachable
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Definition: ErrorHandling.h:143
llvm::Value::getType
Type * getType() const
All values are typed, get the type of this value.
Definition: Value.h:255
llvm::convertStrToRoundingMode
Optional< RoundingMode > convertStrToRoundingMode(StringRef)
Returns a valid RoundingMode enumerator when given a string that is valid as input in constrained int...
Definition: FPEnv.cpp:23
llvm::DbgVariableIntrinsic::getRawLocation
Metadata * getRawLocation() const
Definition: IntrinsicInst.h:266
llvm::Value::getContext
LLVMContext & getContext() const
All values hold a context through their type.
Definition: Value.cpp:994
DL
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Definition: AArch64SLSHardening.cpp:76
llvm::DbgVariableIntrinsic::getFragmentSizeInBits
Optional< uint64_t > getFragmentSizeInBits() const
Get the size (in bits) of the variable, or fragment of the variable that is described.
Definition: IntrinsicInst.cpp:169
llvm::IntrinsicInst::mayLowerToFunctionCall
static bool mayLowerToFunctionCall(Intrinsic::ID IID)
Check if the intrinsic might lower into a regular function call in the course of IR transformations.
Definition: IntrinsicInst.cpp:35
llvm::VPReductionIntrinsic::getStartParamPos
unsigned getStartParamPos() const
Definition: IntrinsicInst.cpp:662
llvm::CallBase::setArgOperand
void setArgOperand(unsigned i, Value *v)
Definition: InstrTypes.h:1346
getAsMetadata
static ValueAsMetadata * getAsMetadata(Value *V)
Definition: IntrinsicInst.cpp:107
llvm::StringRef::size
constexpr size_t size() const
size - Get the string size.
Definition: StringRef.h:137
llvm::CmpInst::FCMP_UGT
@ FCMP_UGT
1 0 1 0 True if unordered or greater than
Definition: InstrTypes.h:731
llvm::GCRelocateInst::getBasePtr
Value * getBasePtr() const
Definition: IntrinsicInst.cpp:751
llvm::Type::getInt64Ty
static IntegerType * getInt64Ty(LLVMContext &C)
Definition: Type.cpp:240
llvm::GraphProgram::Name
Name
Definition: GraphWriter.h:50
llvm::InstrProfValueProfileInst::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:1293
llvm::ConstrainedFPIntrinsic::isUnaryOp
bool isUnaryOp() const
Definition: IntrinsicInst.cpp:298
llvm::VPIntrinsic::getMemoryPointerParam
Value * getMemoryPointerParam() const
Definition: IntrinsicInst.cpp:404
llvm::MetadataAsValue::get
static MetadataAsValue * get(LLVMContext &Context, Metadata *MD)
Definition: Metadata.cpp:103
llvm::AMDGPU::SendMsg::Op
Op
Definition: SIDefines.h:348
llvm::ArrayRef::begin
iterator begin() const
Definition: ArrayRef.h:152
llvm::CallBase::arg_size
unsigned arg_size() const
Definition: InstrTypes.h:1339
llvm::VPReductionIntrinsic::getVectorParamPos
unsigned getVectorParamPos() const
Definition: IntrinsicInst.cpp:658
llvm::PatternMatch::m_c_Mul
BinaryOp_match< LHS, RHS, Instruction::Mul, true > m_c_Mul(const LHS &L, const RHS &R)
Matches a Mul with LHS and RHS in either order.
Definition: PatternMatch.h:2244
StringSwitch.h
llvm::fp::ebIgnore
@ ebIgnore
This corresponds to "fpexcept.ignore".
Definition: FPEnv.h:39
llvm::ConstrainedFPIntrinsic::isTernaryOp
bool isTernaryOp() const
Definition: IntrinsicInst.cpp:309
llvm::CmpInst::ICMP_SGE
@ ICMP_SGE
signed greater or equal
Definition: InstrTypes.h:747
llvm::VPIntrinsic::getMaskParamPos
static Optional< unsigned > getMaskParamPos(Intrinsic::ID IntrinsicID)
Definition: IntrinsicInst.cpp:370
llvm::MCID::Add
@ Add
Definition: MCInstrDesc.h:185
llvm::IntrinsicInst
A wrapper class for inspecting calls to intrinsic functions.
Definition: IntrinsicInst.h:46
llvm::OverflowingBinaryOperator::NoSignedWrap
@ NoSignedWrap
Definition: Operator.h:77
llvm::Instruction::BinaryOps
BinaryOps
Definition: Instruction.h:773
isSigned
static bool isSigned(unsigned int Opcode)
Definition: ExpandLargeDivRem.cpp:52
llvm::DbgVariableIntrinsic::location_op_iterator
Definition: IntrinsicInst.h:158
llvm::CmpInst::ICMP_UGT
@ ICMP_UGT
unsigned greater than
Definition: InstrTypes.h:742
llvm::CmpInst::FCMP_UNE
@ FCMP_UNE
1 1 1 0 True if unordered or not equal
Definition: InstrTypes.h:735
llvm::CallBase::getArgOperand
Value * getArgOperand(unsigned i) const
Definition: InstrTypes.h:1341
llvm::VPCastIntrinsic::isVPCast
static bool isVPCast(Intrinsic::ID ID)
Definition: IntrinsicInst.cpp:597
llvm::DbgVariableIntrinsic::location_ops
iterator_range< location_op_iterator > location_ops() const
Get the locations corresponding to the variable referenced by the debug info intrinsic.
Definition: IntrinsicInst.cpp:74
llvm::ArrayRef::size
size_t size() const
size - Get the array size.
Definition: ArrayRef.h:164
llvm::LLVMContext::OB_gc_live
@ OB_gc_live
Definition: LLVMContext.h:94
llvm::iterator_range
A range adaptor for a pair of iterators.
Definition: iterator_range.h:30
llvm::BasicBlock::getTerminator
const Instruction * getTerminator() const LLVM_READONLY
Returns the terminator instruction if the block is well formed or null if the block is not well forme...
Definition: BasicBlock.h:119
llvm::Optional::value
constexpr const T & value() const &
Definition: Optional.h:313
getBasePtrIndex
static unsigned getBasePtrIndex(const MemSDNode *N)
MemSDNode::getBasePtr() does not work for intrinsics, which needs to offset by the chain and intrinsi...
Definition: SIISelLowering.cpp:9429
llvm::CmpInst::FCMP_OLE
@ FCMP_OLE
0 1 0 1 True if ordered and less than or equal
Definition: InstrTypes.h:726
llvm::ValueAsMetadata
Value wrapper in the Metadata hierarchy.
Definition: Metadata.h:345
llvm::StringSwitch::Default
R Default(T Value)
Definition: StringSwitch.h:182
llvm::ConstrainedFPIntrinsic::getRoundingMode
Optional< RoundingMode > getRoundingMode() const
Definition: IntrinsicInst.cpp:233
llvm::StringSwitch
A switch()-like statement whose cases are string literals.
Definition: StringSwitch.h:44
llvm::User::Op
Use & Op()
Definition: User.h:133
llvm::VPIntrinsic::getMaskParam
Value * getMaskParam() const
Definition: IntrinsicInst.cpp:348
llvm::RoundingMode::NearestTiesToEven
@ NearestTiesToEven
roundTiesToEven.
llvm::Value
LLVM Value Representation.
Definition: Value.h:74
llvm::CmpInst::BAD_FCMP_PREDICATE
@ BAD_FCMP_PREDICATE
Definition: InstrTypes.h:739
llvm::ArrayRef::end
iterator end() const
Definition: ArrayRef.h:153
llvm::CmpInst::FCMP_ORD
@ FCMP_ORD
0 1 1 1 True if ordered (no nans)
Definition: InstrTypes.h:728
llvm::CmpInst::FCMP_UEQ
@ FCMP_UEQ
1 0 0 1 True if unordered or equal
Definition: InstrTypes.h:730
llvm::Intrinsic::ID
unsigned ID
Definition: TargetTransformInfo.h:38
llvm::AArch64::Rounding
Rounding
Possible values of current rounding mode, which is specified in bits 23:22 of FPCR.
Definition: AArch64ISelLowering.h:475