• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/llvm/lib/Target/SystemZ/

Lines Matching refs:AM

150   // Try to fold more of the base or index of AM into AM, where IsBase
152 bool expandAddress(SystemZAddressingMode &AM, bool IsBase) const;
154 // Try to describe N in AM, returning true on success.
155 bool selectAddress(SDValue N, SystemZAddressingMode &AM) const;
157 // Extract individual target operands from matched address AM.
158 void getAddressOperands(const SystemZAddressingMode &AM, EVT VT,
160 void getAddressOperands(const SystemZAddressingMode &AM, EVT VT,
402 // Change the base or index in AM to Value, where IsBase selects
404 static void changeComponent(SystemZAddressingMode &AM, bool IsBase,
407 AM.Base = Value;
409 AM.Index = Value;
412 // The base or index of AM is equivalent to Value + ADJDYNALLOC,
414 // ADJDYNALLOC into AM.
415 static bool expandAdjDynAlloc(SystemZAddressingMode &AM, bool IsBase,
417 if (AM.isDynAlloc() && !AM.IncludesDynAlloc) {
418 changeComponent(AM, IsBase, Value);
419 AM.IncludesDynAlloc = true;
425 // The base of AM is equivalent to Base + Index. Try to use Index as
427 static bool expandIndex(SystemZAddressingMode &AM, SDValue Base,
429 if (AM.hasIndexField() && !AM.Index.getNode()) {
430 AM.Base = Base;
431 AM.Index = Index;
437 // The base or index of AM is equivalent to Op0 + Op1, where IsBase selects
438 // between the base and index. Try to fold Op1 into AM's displacement.
439 static bool expandDisp(SystemZAddressingMode &AM, bool IsBase,
442 int64_t TestDisp = AM.Disp + Op1;
443 if (selectDisp(AM.DR, TestDisp)) {
444 changeComponent(AM, IsBase, Op0);
445 AM.Disp = TestDisp;
454 bool SystemZDAGToDAGISel::expandAddress(SystemZAddressingMode &AM,
456 SDValue N = IsBase ? AM.Base : AM.Index;
470 return expandAdjDynAlloc(AM, IsBase, Op1);
472 return expandAdjDynAlloc(AM, IsBase, Op0);
475 return expandDisp(AM, IsBase, Op1,
478 return expandDisp(AM, IsBase, Op0,
481 if (IsBase && expandIndex(AM, Op0, Op1))
490 return expandDisp(AM, IsBase, Base, Offset);
568 // Return true if Addr is suitable for AM, updating AM if so.
570 SystemZAddressingMode &AM) const {
573 AM.Base = Addr;
577 expandDisp(AM, true, SDValue(),
582 expandAdjDynAlloc(AM, true, SDValue()))
586 while (expandAddress(AM, true) ||
587 (AM.Index.getNode() && expandAddress(AM, false)))
591 if (AM.Form == SystemZAddressingMode::FormBDXLA &&
592 !shouldUseLA(AM.Base.getNode(), AM.Disp, AM.Index.getNode()))
596 if (!isValidDisp(AM.DR, AM.Disp))
600 if (AM.isDynAlloc() && !AM.IncludesDynAlloc)
603 LLVM_DEBUG(AM.dump(CurDAG));
626 void SystemZDAGToDAGISel::getAddressOperands(const SystemZAddressingMode &AM,
629 Base = AM.Base;
648 Disp = CurDAG->getTargetConstant(AM.Disp, SDLoc(Base), VT);
651 void SystemZDAGToDAGISel::getAddressOperands(const SystemZAddressingMode &AM,
655 getAddressOperands(AM, VT, Base, Disp);
657 Index = AM.Index;
666 SystemZAddressingMode AM(SystemZAddressingMode::FormBD, DR);
667 if (!selectAddress(Addr, AM))
670 getAddressOperands(AM, Addr.getValueType(), Base, Disp);
677 SystemZAddressingMode AM(SystemZAddressingMode::FormBDXNormal, DR);
678 if (!selectAddress(Addr, AM) || AM.Index.getNode())
681 getAddressOperands(AM, Addr.getValueType(), Base, Disp);
689 SystemZAddressingMode AM(Form, DR);
690 if (!selectAddress(Addr, AM))
693 getAddressOperands(AM, Addr.getValueType(), Base, Disp, Index);