LLVM  15.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 
35 //===----------------------------------------------------------------------===//
36 /// DbgVariableIntrinsic - This is the common base class for debug info
37 /// intrinsics for variables.
38 ///
39 
42  auto *MD = getRawLocation();
43  assert(MD && "First operand of DbgVariableIntrinsic should be non-null.");
44 
45  // If operand is ValueAsMetadata, return a range over just that operand.
46  if (auto *VAM = dyn_cast<ValueAsMetadata>(MD)) {
47  return {location_op_iterator(VAM), location_op_iterator(VAM + 1)};
48  }
49  // If operand is DIArgList, return a range over its args.
50  if (auto *AL = dyn_cast<DIArgList>(MD))
51  return {location_op_iterator(AL->args_begin()),
52  location_op_iterator(AL->args_end())};
53  // Operand must be an empty metadata tuple, so return empty iterator.
54  return {location_op_iterator(static_cast<ValueAsMetadata *>(nullptr)),
55  location_op_iterator(static_cast<ValueAsMetadata *>(nullptr))};
56 }
57 
59  auto *MD = getRawLocation();
60  assert(MD && "First operand of DbgVariableIntrinsic should be non-null.");
61  if (auto *AL = dyn_cast<DIArgList>(MD))
62  return AL->getArgs()[OpIdx]->getValue();
63  if (isa<MDNode>(MD))
64  return nullptr;
65  assert(
66  isa<ValueAsMetadata>(MD) &&
67  "Attempted to get location operand from DbgVariableIntrinsic with none.");
68  auto *V = cast<ValueAsMetadata>(MD);
69  assert(OpIdx == 0 && "Operand Index must be 0 for a debug intrinsic with a "
70  "single location operand.");
71  return V->getValue();
72 }
73 
75  return isa<MetadataAsValue>(V) ? dyn_cast<ValueAsMetadata>(
76  cast<MetadataAsValue>(V)->getMetadata())
78 }
79 
81  Value *NewValue) {
82  assert(NewValue && "Values must be non-null");
83  auto Locations = location_ops();
84  auto OldIt = find(Locations, OldValue);
85  assert(OldIt != Locations.end() && "OldValue must be a current location");
86  if (!hasArgList()) {
87  Value *NewOperand = isa<MetadataAsValue>(NewValue)
88  ? NewValue
90  getContext(), ValueAsMetadata::get(NewValue));
91  return setArgOperand(0, NewOperand);
92  }
94  ValueAsMetadata *NewOperand = getAsMetadata(NewValue);
95  for (auto *VMD : Locations)
96  MDs.push_back(VMD == *OldIt ? NewOperand : getAsMetadata(VMD));
97  setArgOperand(
99 }
101  Value *NewValue) {
102  assert(OpIdx < getNumVariableLocationOps() && "Invalid Operand Index");
103  if (!hasArgList()) {
104  Value *NewOperand = isa<MetadataAsValue>(NewValue)
105  ? NewValue
107  getContext(), ValueAsMetadata::get(NewValue));
108  return setArgOperand(0, NewOperand);
109  }
111  ValueAsMetadata *NewOperand = getAsMetadata(NewValue);
112  for (unsigned Idx = 0; Idx < getNumVariableLocationOps(); ++Idx)
113  MDs.push_back(Idx == OpIdx ? NewOperand
115  setArgOperand(
117 }
118 
121  assert(NewExpr->hasAllLocationOps(getNumVariableLocationOps() +
122  NewValues.size()) &&
123  "NewExpr for debug variable intrinsic does not reference every "
124  "location operand.");
125  assert(!is_contained(NewValues, nullptr) && "New values must be non-null");
126  setArgOperand(2, MetadataAsValue::get(getContext(), NewExpr));
128  for (auto *VMD : location_ops())
129  MDs.push_back(getAsMetadata(VMD));
130  for (auto *VMD : NewValues)
131  MDs.push_back(getAsMetadata(VMD));
132  setArgOperand(
134 }
135 
137  if (auto Fragment = getExpression()->getFragmentInfo())
138  return Fragment->SizeInBits;
139  return getVariable()->getSizeInBits();
140 }
141 
143  StringRef Name) {
144  assert(Name.startswith("llvm."));
145 
146  // Do successive binary searches of the dotted name components. For
147  // "llvm.gc.experimental.statepoint.p1i8.p1i32", we will find the range of
148  // intrinsics starting with "llvm.gc", then "llvm.gc.experimental", then
149  // "llvm.gc.experimental.statepoint", and then we will stop as the range is
150  // size 1. During the search, we can skip the prefix that we already know is
151  // identical. By using strncmp we consider names with differing suffixes to
152  // be part of the equal range.
153  size_t CmpEnd = 4; // Skip the "llvm" component.
154  const char *const *Low = NameTable.begin();
155  const char *const *High = NameTable.end();
156  const char *const *LastLow = Low;
157  while (CmpEnd < Name.size() && High - Low > 0) {
158  size_t CmpStart = CmpEnd;
159  CmpEnd = Name.find('.', CmpStart + 1);
160  CmpEnd = CmpEnd == StringRef::npos ? Name.size() : CmpEnd;
161  auto Cmp = [CmpStart, CmpEnd](const char *LHS, const char *RHS) {
162  return strncmp(LHS + CmpStart, RHS + CmpStart, CmpEnd - CmpStart) < 0;
163  };
164  LastLow = Low;
165  std::tie(Low, High) = std::equal_range(Low, High, Name.data(), Cmp);
166  }
167  if (High - Low > 0)
168  LastLow = Low;
169 
170  if (LastLow == NameTable.end())
171  return -1;
172  StringRef NameFound = *LastLow;
173  if (Name == NameFound ||
174  (Name.startswith(NameFound) && Name[NameFound.size()] == '.'))
175  return LastLow - NameTable.begin();
176  return -1;
177 }
178 
181  llvm_unreachable("InstrProfValueProfileInst does not have counters!");
182  return cast<ConstantInt>(const_cast<Value *>(getArgOperand(2)));
183 }
184 
187  llvm_unreachable("Please use InstrProfValueProfileInst::getIndex()");
188  return cast<ConstantInt>(const_cast<Value *>(getArgOperand(3)));
189 }
190 
193  return const_cast<Value *>(getArgOperand(4));
194  }
195  const Module *M = getModule();
196  LLVMContext &Context = M->getContext();
198 }
199 
201  unsigned NumOperands = arg_size();
202  Metadata *MD = nullptr;
203  auto *MAV = dyn_cast<MetadataAsValue>(getArgOperand(NumOperands - 2));
204  if (MAV)
205  MD = MAV->getMetadata();
206  if (!MD || !isa<MDString>(MD))
207  return None;
208  return convertStrToRoundingMode(cast<MDString>(MD)->getString());
209 }
210 
213  unsigned NumOperands = arg_size();
214  Metadata *MD = nullptr;
215  auto *MAV = dyn_cast<MetadataAsValue>(getArgOperand(NumOperands - 1));
216  if (MAV)
217  MD = MAV->getMetadata();
218  if (!MD || !isa<MDString>(MD))
219  return None;
220  return convertStrToExceptionBehavior(cast<MDString>(MD)->getString());
221 }
222 
225  if (Except) {
226  if (Except.getValue() != fp::ebIgnore)
227  return false;
228  }
229 
231  if (Rounding) {
232  if (Rounding.getValue() != RoundingMode::NearestTiesToEven)
233  return false;
234  }
235 
236  return true;
237 }
238 
240  Metadata *MD = cast<MetadataAsValue>(Op)->getMetadata();
241  if (!MD || !isa<MDString>(MD))
243  return StringSwitch<FCmpInst::Predicate>(cast<MDString>(MD)->getString())
244  .Case("oeq", FCmpInst::FCMP_OEQ)
245  .Case("ogt", FCmpInst::FCMP_OGT)
246  .Case("oge", FCmpInst::FCMP_OGE)
247  .Case("olt", FCmpInst::FCMP_OLT)
248  .Case("ole", FCmpInst::FCMP_OLE)
249  .Case("one", FCmpInst::FCMP_ONE)
250  .Case("ord", FCmpInst::FCMP_ORD)
251  .Case("uno", FCmpInst::FCMP_UNO)
252  .Case("ueq", FCmpInst::FCMP_UEQ)
253  .Case("ugt", FCmpInst::FCMP_UGT)
254  .Case("uge", FCmpInst::FCMP_UGE)
255  .Case("ult", FCmpInst::FCMP_ULT)
256  .Case("ule", FCmpInst::FCMP_ULE)
257  .Case("une", FCmpInst::FCMP_UNE)
259 }
260 
263 }
264 
266  switch (getIntrinsicID()) {
267  default:
268  return false;
269 #define INSTRUCTION(NAME, NARG, ROUND_MODE, INTRINSIC) \
270  case Intrinsic::INTRINSIC: \
271  return NARG == 1;
272 #include "llvm/IR/ConstrainedOps.def"
273  }
274 }
275 
277  switch (getIntrinsicID()) {
278  default:
279  return false;
280 #define INSTRUCTION(NAME, NARG, ROUND_MODE, INTRINSIC) \
281  case Intrinsic::INTRINSIC: \
282  return NARG == 3;
283 #include "llvm/IR/ConstrainedOps.def"
284  }
285 }
286 
288  switch (I->getIntrinsicID()) {
289 #define INSTRUCTION(NAME, NARGS, ROUND_MODE, INTRINSIC) \
290  case Intrinsic::INTRINSIC:
291 #include "llvm/IR/ConstrainedOps.def"
292  return true;
293  default:
294  return false;
295  }
296 }
297 
299  auto GetVectorLengthOfType = [](const Type *T) -> ElementCount {
300  const auto *VT = cast<VectorType>(T);
301  auto ElemCount = VT->getElementCount();
302  return ElemCount;
303  };
304 
305  Value *VPMask = getMaskParam();
306  if (!VPMask) {
307  assert((getIntrinsicID() == Intrinsic::vp_merge ||
308  getIntrinsicID() == Intrinsic::vp_select) &&
309  "Unexpected VP intrinsic without mask operand");
310  return GetVectorLengthOfType(getType());
311  }
312  return GetVectorLengthOfType(VPMask->getType());
313 }
314 
316  if (auto MaskPos = getMaskParamPos(getIntrinsicID()))
317  return getArgOperand(MaskPos.getValue());
318  return nullptr;
319 }
320 
322  auto MaskPos = getMaskParamPos(getIntrinsicID());
323  setArgOperand(*MaskPos, NewMask);
324 }
325 
327  if (auto EVLPos = getVectorLengthParamPos(getIntrinsicID()))
328  return getArgOperand(EVLPos.getValue());
329  return nullptr;
330 }
331 
333  auto EVLPos = getVectorLengthParamPos(getIntrinsicID());
334  setArgOperand(*EVLPos, NewEVL);
335 }
336 
338  switch (IntrinsicID) {
339  default:
340  return None;
341 
342 #define BEGIN_REGISTER_VP_INTRINSIC(VPID, MASKPOS, VLENPOS) \
343  case Intrinsic::VPID: \
344  return MASKPOS;
345 #include "llvm/IR/VPIntrinsics.def"
346  }
347 }
348 
351  switch (IntrinsicID) {
352  default:
353  return None;
354 
355 #define BEGIN_REGISTER_VP_INTRINSIC(VPID, MASKPOS, VLENPOS) \
356  case Intrinsic::VPID: \
357  return VLENPOS;
358 #include "llvm/IR/VPIntrinsics.def"
359  }
360 }
361 
362 /// \return the alignment of the pointer used by this load/store/gather or
363 /// scatter.
366  assert(PtrParamOpt.hasValue() && "no pointer argument!");
367  return getParamAlign(PtrParamOpt.getValue());
368 }
369 
370 /// \return The pointer operand of this load,store, gather or scatter.
372  if (auto PtrParamOpt = getMemoryPointerParamPos(getIntrinsicID()))
373  return getArgOperand(PtrParamOpt.getValue());
374  return nullptr;
375 }
376 
378  switch (VPID) {
379  default:
380  break;
381 #define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) case Intrinsic::VPID:
382 #define VP_PROPERTY_MEMOP(POINTERPOS, ...) return POINTERPOS;
383 #define END_REGISTER_VP_INTRINSIC(VPID) break;
384 #include "llvm/IR/VPIntrinsics.def"
385  }
386  return None;
387 }
388 
389 /// \return The data (payload) operand of this store or scatter.
391  auto DataParamOpt = getMemoryDataParamPos(getIntrinsicID());
392  if (!DataParamOpt.hasValue())
393  return nullptr;
394  return getArgOperand(DataParamOpt.getValue());
395 }
396 
398  switch (VPID) {
399  default:
400  break;
401 #define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) case Intrinsic::VPID:
402 #define VP_PROPERTY_MEMOP(POINTERPOS, DATAPOS) return DATAPOS;
403 #define END_REGISTER_VP_INTRINSIC(VPID) break;
404 #include "llvm/IR/VPIntrinsics.def"
405  }
406  return None;
407 }
408 
410  switch (ID) {
411  default:
412  break;
413 #define BEGIN_REGISTER_VP_INTRINSIC(VPID, MASKPOS, VLENPOS) \
414  case Intrinsic::VPID: \
415  return true;
416 #include "llvm/IR/VPIntrinsics.def"
417  }
418  return false;
419 }
420 
421 // Equivalent non-predicated opcode
423  switch (ID) {
424  default:
425  break;
426 #define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) case Intrinsic::VPID:
427 #define VP_PROPERTY_FUNCTIONAL_OPC(OPC) return Instruction::OPC;
428 #define END_REGISTER_VP_INTRINSIC(VPID) break;
429 #include "llvm/IR/VPIntrinsics.def"
430  }
431  return None;
432 }
433 
435  switch (IROPC) {
436  default:
437  break;
438 
439 #define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) break;
440 #define VP_PROPERTY_FUNCTIONAL_OPC(OPC) case Instruction::OPC:
441 #define END_REGISTER_VP_INTRINSIC(VPID) return Intrinsic::VPID;
442 #include "llvm/IR/VPIntrinsics.def"
443  }
445 }
446 
448  using namespace PatternMatch;
449 
451 
452  // No vlen param - no lanes masked-off by it.
453  auto *VLParam = getVectorLengthParam();
454  if (!VLParam)
455  return true;
456 
457  // Note that the VP intrinsic causes undefined behavior if the Explicit Vector
458  // Length parameter is strictly greater-than the number of vector elements of
459  // the operation. This function returns true when this is detected statically
460  // in the IR.
461 
462  // Check whether "W == vscale * EC.getKnownMinValue()"
463  if (EC.isScalable()) {
464  // Undig the DL
465  const auto *ParMod = this->getModule();
466  if (!ParMod)
467  return false;
468  const auto &DL = ParMod->getDataLayout();
469 
470  // Compare vscale patterns
471  uint64_t VScaleFactor;
472  if (match(VLParam, m_c_Mul(m_ConstantInt(VScaleFactor), m_VScale(DL))))
473  return VScaleFactor >= EC.getKnownMinValue();
474  return (EC.getKnownMinValue() == 1) && match(VLParam, m_VScale(DL));
475  }
476 
477  // standard SIMD operation
478  const auto *VLConst = dyn_cast<ConstantInt>(VLParam);
479  if (!VLConst)
480  return false;
481 
482  uint64_t VLNum = VLConst->getZExtValue();
483  if (VLNum >= EC.getKnownMinValue())
484  return true;
485 
486  return false;
487 }
488 
490  Type *ReturnType,
491  ArrayRef<Value *> Params) {
492  assert(isVPIntrinsic(VPID) && "not a VP intrinsic");
493  Function *VPFunc;
494  switch (VPID) {
495  default: {
496  Type *OverloadTy = Params[0]->getType();
498  OverloadTy =
499  Params[*VPReductionIntrinsic::getVectorParamPos(VPID)]->getType();
500 
501  VPFunc = Intrinsic::getDeclaration(M, VPID, OverloadTy);
502  break;
503  }
504  case Intrinsic::vp_trunc:
505  case Intrinsic::vp_sext:
506  case Intrinsic::vp_zext:
507  case Intrinsic::vp_fptoui:
508  case Intrinsic::vp_fptosi:
509  case Intrinsic::vp_uitofp:
510  case Intrinsic::vp_sitofp:
511  case Intrinsic::vp_fptrunc:
512  case Intrinsic::vp_fpext:
513  case Intrinsic::vp_ptrtoint:
514  case Intrinsic::vp_inttoptr:
515  VPFunc =
516  Intrinsic::getDeclaration(M, VPID, {ReturnType, Params[0]->getType()});
517  break;
518  case Intrinsic::vp_merge:
519  case Intrinsic::vp_select:
520  VPFunc = Intrinsic::getDeclaration(M, VPID, {Params[1]->getType()});
521  break;
522  case Intrinsic::vp_load:
523  VPFunc = Intrinsic::getDeclaration(
524  M, VPID, {ReturnType, Params[0]->getType()});
525  break;
526  case Intrinsic::experimental_vp_strided_load:
527  VPFunc = Intrinsic::getDeclaration(
528  M, VPID, {ReturnType, Params[0]->getType(), Params[1]->getType()});
529  break;
530  case Intrinsic::vp_gather:
531  VPFunc = Intrinsic::getDeclaration(
532  M, VPID, {ReturnType, Params[0]->getType()});
533  break;
534  case Intrinsic::vp_store:
535  VPFunc = Intrinsic::getDeclaration(
536  M, VPID, {Params[0]->getType(), Params[1]->getType()});
537  break;
538  case Intrinsic::experimental_vp_strided_store:
539  VPFunc = Intrinsic::getDeclaration(
540  M, VPID,
541  {Params[0]->getType(), Params[1]->getType(), Params[2]->getType()});
542  break;
543  case Intrinsic::vp_scatter:
544  VPFunc = Intrinsic::getDeclaration(
545  M, VPID, {Params[0]->getType(), Params[1]->getType()});
546  break;
547  }
548  assert(VPFunc && "Could not declare VP intrinsic");
549  return VPFunc;
550 }
551 
553  switch (ID) {
554  default:
555  break;
556 #define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) case Intrinsic::VPID:
557 #define VP_PROPERTY_REDUCTION(STARTPOS, ...) return true;
558 #define END_REGISTER_VP_INTRINSIC(VPID) break;
559 #include "llvm/IR/VPIntrinsics.def"
560  }
561  return false;
562 }
563 
565  switch (ID) {
566  default:
567  break;
568 #define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) case Intrinsic::VPID:
569 #define VP_PROPERTY_CASTOP return true;
570 #define END_REGISTER_VP_INTRINSIC(VPID) break;
571 #include "llvm/IR/VPIntrinsics.def"
572  }
573  return false;
574 }
575 
577  switch (ID) {
578  default:
579  break;
580 #define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) case Intrinsic::VPID:
581 #define VP_PROPERTY_CMP(CCPOS, ...) return true;
582 #define END_REGISTER_VP_INTRINSIC(VPID) break;
583 #include "llvm/IR/VPIntrinsics.def"
584  }
585  return false;
586 }
587 
589  Metadata *MD = cast<MetadataAsValue>(Op)->getMetadata();
590  if (!MD || !isa<MDString>(MD))
592  return StringSwitch<ICmpInst::Predicate>(cast<MDString>(MD)->getString())
593  .Case("eq", ICmpInst::ICMP_EQ)
594  .Case("ne", ICmpInst::ICMP_NE)
595  .Case("ugt", ICmpInst::ICMP_UGT)
596  .Case("uge", ICmpInst::ICMP_UGE)
597  .Case("ult", ICmpInst::ICMP_ULT)
598  .Case("ule", ICmpInst::ICMP_ULE)
599  .Case("sgt", ICmpInst::ICMP_SGT)
600  .Case("sge", ICmpInst::ICMP_SGE)
601  .Case("slt", ICmpInst::ICMP_SLT)
602  .Case("sle", ICmpInst::ICMP_SLE)
604 }
605 
607  bool IsFP = true;
608  Optional<unsigned> CCArgIdx;
609  switch (getIntrinsicID()) {
610  default:
611  break;
612 #define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) case Intrinsic::VPID:
613 #define VP_PROPERTY_CMP(CCPOS, ISFP) \
614  CCArgIdx = CCPOS; \
615  IsFP = ISFP; \
616  break;
617 #define END_REGISTER_VP_INTRINSIC(VPID) break;
618 #include "llvm/IR/VPIntrinsics.def"
619  }
620  assert(CCArgIdx.hasValue() && "Unexpected vector-predicated comparison");
621  return IsFP ? getFPPredicateFromMD(getArgOperand(*CCArgIdx))
622  : getIntPredicateFromMD(getArgOperand(*CCArgIdx));
623 }
624 
627 }
628 
631 }
632 
634  switch (ID) {
635 #define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) case Intrinsic::VPID:
636 #define VP_PROPERTY_REDUCTION(STARTPOS, VECTORPOS) return VECTORPOS;
637 #define END_REGISTER_VP_INTRINSIC(VPID) break;
638 #include "llvm/IR/VPIntrinsics.def"
639  default:
640  break;
641  }
642  return None;
643 }
644 
646  switch (ID) {
647 #define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) case Intrinsic::VPID:
648 #define VP_PROPERTY_REDUCTION(STARTPOS, VECTORPOS) return STARTPOS;
649 #define END_REGISTER_VP_INTRINSIC(VPID) break;
650 #include "llvm/IR/VPIntrinsics.def"
651  default:
652  break;
653  }
654  return None;
655 }
656 
658  switch (getIntrinsicID()) {
659  case Intrinsic::uadd_with_overflow:
660  case Intrinsic::sadd_with_overflow:
661  case Intrinsic::uadd_sat:
662  case Intrinsic::sadd_sat:
663  return Instruction::Add;
664  case Intrinsic::usub_with_overflow:
665  case Intrinsic::ssub_with_overflow:
666  case Intrinsic::usub_sat:
667  case Intrinsic::ssub_sat:
668  return Instruction::Sub;
669  case Intrinsic::umul_with_overflow:
670  case Intrinsic::smul_with_overflow:
671  return Instruction::Mul;
672  default:
673  llvm_unreachable("Invalid intrinsic");
674  }
675 }
676 
678  switch (getIntrinsicID()) {
679  case Intrinsic::sadd_with_overflow:
680  case Intrinsic::ssub_with_overflow:
681  case Intrinsic::smul_with_overflow:
682  case Intrinsic::sadd_sat:
683  case Intrinsic::ssub_sat:
684  return true;
685  default:
686  return false;
687  }
688 }
689 
691  if (isSigned())
693  else
695 }
696 
698  const Value *Token = getArgOperand(0);
699 
700  // This takes care both of relocates for call statepoints and relocates
701  // on normal path of invoke statepoint.
702  if (!isa<LandingPadInst>(Token))
703  return cast<GCStatepointInst>(Token);
704 
705  // This relocate is on exceptional path of an invoke statepoint
706  const BasicBlock *InvokeBB =
707  cast<Instruction>(Token)->getParent()->getUniquePredecessor();
708 
709  assert(InvokeBB && "safepoints should have unique landingpads");
710  assert(InvokeBB->getTerminator() &&
711  "safepoint block should be well formed");
712 
713  return cast<GCStatepointInst>(InvokeBB->getTerminator());
714 }
715 
717  if (auto Opt = getStatepoint()->getOperandBundle(LLVMContext::OB_gc_live))
718  return *(Opt->Inputs.begin() + getBasePtrIndex());
719  return *(getStatepoint()->arg_begin() + getBasePtrIndex());
720 }
721 
723  if (auto Opt = getStatepoint()->getOperandBundle(LLVMContext::OB_gc_live))
724  return *(Opt->Inputs.begin() + getDerivedPtrIndex());
725  return *(getStatepoint()->arg_begin() + getDerivedPtrIndex());
726 }
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:258
llvm::LLVMContext::OB_gc_live
@ OB_gc_live
Definition: LLVMContext.h:95
llvm::BinaryOpIntrinsic::getBinaryOp
Instruction::BinaryOps getBinaryOp() const
Returns the binary operation underlying the intrinsic.
Definition: IntrinsicInst.cpp:657
llvm::VPIntrinsic::getVectorLengthParamPos
static Optional< unsigned > getVectorLengthParamPos(Intrinsic::ID IntrinsicID)
Definition: IntrinsicInst.cpp:350
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::InstrProfIncrementInst::getStep
Value * getStep() const
Definition: IntrinsicInst.cpp:191
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::CallBase::getOperandBundle
Optional< OperandBundleUse > getOperandBundle(StringRef Name) const
Return an operand bundle by name, if present.
Definition: InstrTypes.h:2027
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:1410
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:390
DebugInfoMetadata.h
T
llvm::OverflowingBinaryOperator::NoSignedWrap
@ NoSignedWrap
Definition: Operator.h:77
llvm::Function
Definition: Function.h:60
llvm::StringSwitch::Default
LLVM_NODISCARD R Default(T Value)
Definition: StringSwitch.h:183
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:60
llvm::SmallVector
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1185
llvm::DIVariable::getSizeInBits
Optional< uint64_t > getSizeInBits() const
Determines the size of the variable's type.
Definition: DebugInfoMetadata.cpp:1176
llvm::InstrProfIncrementInstStep::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.h:1259
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:332
llvm::VPCmpIntrinsic::getPredicate
CmpInst::Predicate getPredicate() const
Definition: IntrinsicInst.cpp:606
llvm::CmpInst::ICMP_NE
@ ICMP_NE
not equal
Definition: InstrTypes.h:741
llvm::DbgVariableIntrinsic::replaceVariableLocationOp
void replaceVariableLocationOp(Value *OldValue, Value *NewValue)
Definition: IntrinsicInst.cpp:80
llvm::VPIntrinsic::canIgnoreVectorLengthParam
bool canIgnoreVectorLengthParam() const
Definition: IntrinsicInst.cpp:447
llvm::ConstrainedFPIntrinsic::isDefaultFPEnvironment
bool isDefaultFPEnvironment() const
Definition: IntrinsicInst.cpp:223
NewExpr
Definition: ItaniumDemangle.h:1922
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:489
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:142
Module.h
llvm::VPIntrinsic::getMemoryDataParam
Value * getMemoryDataParam() const
Definition: IntrinsicInst.cpp:390
llvm::InstrProfInstBase::getIndex
ConstantInt * getIndex() const
Definition: IntrinsicInst.cpp:185
llvm::DbgVariableIntrinsic::getVariable
DILocalVariable * getVariable() const
Definition: IntrinsicInst.h:254
llvm::InstrProfInstBase::getNumCounters
ConstantInt * getNumCounters() const
Definition: IntrinsicInst.cpp:179
llvm::VPIntrinsic::getFunctionalOpcodeForVP
static Optional< unsigned > getFunctionalOpcodeForVP(Intrinsic::ID ID)
Definition: IntrinsicInst.cpp:422
llvm::Optional< uint64_t >
Operator.h
llvm::ConstrainedFPIntrinsic::classof
static bool classof(const IntrinsicInst *I)
Definition: IntrinsicInst.cpp:287
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:394
llvm::Intrinsic::not_intrinsic
@ not_intrinsic
Definition: Intrinsics.h:45
llvm::DIExpression
DWARF expression.
Definition: DebugInfoMetadata.h:2548
RHS
Value * RHS
Definition: X86PartialReduction.cpp:76
llvm::PatternMatch::m_VScale
VScaleVal_match m_VScale(const DataLayout &DL)
Definition: PatternMatch.h:2495
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:58
llvm::MDNode::get
static MDTuple * get(LLVMContext &Context, ArrayRef< Metadata * > MDs)
Definition: Metadata.h:1289
llvm::VPIntrinsic::setMaskParam
void setMaskParam(Value *)
Definition: IntrinsicInst.cpp:321
llvm::BasicBlock
LLVM Basic Block Representation.
Definition: BasicBlock.h:55
llvm::Optional::hasValue
constexpr bool hasValue() const
Definition: Optional.h:283
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::GCStatepointInst
Represents a gc.statepoint intrinsic call.
Definition: Statepoint.h:62
llvm::VPReductionIntrinsic::isVPReduction
static bool isVPReduction(Intrinsic::ID ID)
Definition: IntrinsicInst.cpp:552
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:119
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:690
llvm::MaybeAlign
This struct is a compact representation of a valid (power of two) or undefined (0) alignment.
Definition: Alignment.h:109
llvm::PatternMatch::m_ConstantInt
class_match< ConstantInt > m_ConstantInt()
Match an arbitrary ConstantInt and ignore it.
Definition: PatternMatch.h:145
llvm::CmpInst::FCMP_UNO
@ FCMP_UNO
1 0 0 0 True if unordered: isnan(X) | isnan(Y)
Definition: InstrTypes.h:729
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:919
llvm::VPIntrinsic::getForOpcode
static Intrinsic::ID getForOpcode(unsigned OC)
The llvm.vp.* intrinsics for this instruction Opcode.
Definition: IntrinsicInst.cpp:434
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:228
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::DbgVariableIntrinsic::getNumVariableLocationOps
unsigned getNumVariableLocationOps() const
Definition: IntrinsicInst.h:222
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:576
getFPPredicateFromMD
static FCmpInst::Predicate getFPPredicateFromMD(const Value *Op)
Definition: IntrinsicInst.cpp:239
llvm::VPIntrinsic::getMemoryPointerParamPos
static Optional< unsigned > getMemoryPointerParamPos(Intrinsic::ID)
Definition: IntrinsicInst.cpp:377
llvm::VPIntrinsic::getVectorLengthParam
Value * getVectorLengthParam() const
Definition: IntrinsicInst.cpp:326
llvm::VPIntrinsic::getStaticVectorLength
ElementCount getStaticVectorLength() const
Definition: IntrinsicInst.cpp:298
llvm::BinaryOpIntrinsic::isSigned
bool isSigned() const
Whether the intrinsic is signed or unsigned.
Definition: IntrinsicInst.cpp:677
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:1625
llvm::VPIntrinsic::getPointerAlignment
MaybeAlign getPointerAlignment() const
Definition: IntrinsicInst.cpp:364
llvm::GCRelocateInst::getDerivedPtr
Value * getDerivedPtr() const
Definition: IntrinsicInst.cpp:722
llvm::LLVMContext
This is an important class for using LLVM in a threaded context.
Definition: LLVMContext.h:68
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:1670
llvm::VPIntrinsic::isVPIntrinsic
static bool isVPIntrinsic(Intrinsic::ID)
Definition: IntrinsicInst.cpp:409
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::Optional::getValue
constexpr const T & getValue() const &
Definition: Optional.h:279
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:588
llvm::VPIntrinsic::getMemoryDataParamPos
static Optional< unsigned > getMemoryDataParamPos(Intrinsic::ID)
Definition: IntrinsicInst.cpp:397
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:261
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:212
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:58
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:262
llvm::Value::getContext
LLVMContext & getContext() const
All values hold a context through their type.
Definition: Value.cpp:991
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:136
llvm::VPReductionIntrinsic::getStartParamPos
unsigned getStartParamPos() const
Definition: IntrinsicInst.cpp:629
llvm::CallBase::setArgOperand
void setArgOperand(unsigned i, Value *v)
Definition: InstrTypes.h:1346
getAsMetadata
static ValueAsMetadata * getAsMetadata(Value *V)
Definition: IntrinsicInst.cpp:74
llvm::StringRef::size
constexpr LLVM_NODISCARD size_t size() const
size - Get the string size.
Definition: StringRef.h:157
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:716
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:1270
llvm::ConstrainedFPIntrinsic::isUnaryOp
bool isUnaryOp() const
Definition: IntrinsicInst.cpp:265
llvm::VPIntrinsic::getMemoryPointerParam
Value * getMemoryPointerParam() const
Definition: IntrinsicInst.cpp:371
llvm::MetadataAsValue::get
static MetadataAsValue * get(LLVMContext &Context, Metadata *MD)
Definition: Metadata.cpp:102
llvm::AMDGPU::SendMsg::Op
Op
Definition: SIDefines.h:341
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:625
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:2250
StringSwitch.h
llvm::fp::ebIgnore
@ ebIgnore
This corresponds to "fpexcept.ignore".
Definition: FPEnv.h:39
llvm::ConstrainedFPIntrinsic::isTernaryOp
bool isTernaryOp() const
Definition: IntrinsicInst.cpp:276
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:337
llvm::MCID::Add
@ Add
Definition: MCInstrDesc.h:185
llvm::IntrinsicInst
A wrapper class for inspecting calls to intrinsic functions.
Definition: IntrinsicInst.h:46
llvm::Instruction::BinaryOps
BinaryOps
Definition: Instruction.h:786
llvm::DbgVariableIntrinsic::location_op_iterator
Definition: IntrinsicInst.h:154
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:564
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:41
llvm::ArrayRef::size
size_t size() const
size - Get the array size.
Definition: ArrayRef.h:164
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
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:9261
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::ConstrainedFPIntrinsic::getRoundingMode
Optional< RoundingMode > getRoundingMode() const
Definition: IntrinsicInst.cpp:200
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:315
llvm::OverflowingBinaryOperator::NoUnsignedWrap
@ NoUnsignedWrap
Definition: Operator.h:76
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::GCProjectionInst::getStatepoint
const GCStatepointInst * getStatepoint() const
The statepoint with which this gc.relocate is associated.
Definition: IntrinsicInst.cpp:697
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:37
llvm::AArch64::Rounding
Rounding
Possible values of current rounding mode, which is specified in bits 23:22 of FPCR.
Definition: AArch64ISelLowering.h:478