Lines Matching refs:MIRBuilder
335 MachineIRBuilder &MIRBuilder = Helper.MIRBuilder; in legalizeCustom() local
336 MachineRegisterInfo &MRI = *MIRBuilder.getMRI(); in legalizeCustom()
365 MachineFunction &MF = MIRBuilder.getMF(); in legalizeCustom()
373 Val = MIRBuilder.buildAnyExt(s32, Val).getReg(0); in legalizeCustom()
375 Val = MIRBuilder.buildAnyExt(s64, Val).getReg(0); in legalizeCustom()
377 auto C_P2HalfMemSize = MIRBuilder.buildConstant(s32, P2HalfMemSize); in legalizeCustom()
378 auto Addr = MIRBuilder.buildPtrAdd(PtrTy, BaseAddr, C_P2HalfMemSize); in legalizeCustom()
381 MIRBuilder.buildStore(Val, BaseAddr, *P2HalfMemOp); in legalizeCustom()
382 auto C_P2Half_InBits = MIRBuilder.buildConstant(s32, P2HalfMemSize * 8); in legalizeCustom()
383 auto Shift = MIRBuilder.buildLShr(s32, Val, C_P2Half_InBits); in legalizeCustom()
384 MIRBuilder.buildStore(Shift, Addr, *RemMemOp); in legalizeCustom()
386 auto Unmerge = MIRBuilder.buildUnmerge(s32, Val); in legalizeCustom()
387 MIRBuilder.buildStore(Unmerge.getReg(0), BaseAddr, *P2HalfMemOp); in legalizeCustom()
388 MIRBuilder.buildStore(Unmerge.getReg(1), Addr, *RemMemOp); in legalizeCustom()
399 MIRBuilder.buildLoad(Val, BaseAddr, *Load4MMO); in legalizeCustom()
401 auto Load = MIRBuilder.buildLoad(s32, BaseAddr, *Load4MMO); in legalizeCustom()
402 MIRBuilder.buildTrunc(Val, Load.getReg(0)); in legalizeCustom()
406 auto C_P2HalfMemSize = MIRBuilder.buildConstant(s32, P2HalfMemSize); in legalizeCustom()
407 auto Addr = MIRBuilder.buildPtrAdd(PtrTy, BaseAddr, C_P2HalfMemSize); in legalizeCustom()
409 auto Load_P2Half = MIRBuilder.buildLoad(s32, BaseAddr, *P2HalfMemOp); in legalizeCustom()
410 auto Load_Rem = MIRBuilder.buildLoad(s32, Addr, *RemMemOp); in legalizeCustom()
413 MIRBuilder.buildMerge(Val, {Load_P2Half, Load_Rem}); in legalizeCustom()
415 auto Merge = MIRBuilder.buildMerge(s64, {Load_P2Half, Load_Rem}); in legalizeCustom()
416 MIRBuilder.buildTrunc(Val, Merge); in legalizeCustom()
441 auto C_HiMask = MIRBuilder.buildConstant(s32, UINT32_C(0x43300000)); in legalizeCustom()
442 auto Bitcast = MIRBuilder.buildMerge(s64, {Src, C_HiMask.getReg(0)}); in legalizeCustom()
444 MachineInstrBuilder TwoP52FP = MIRBuilder.buildFConstant( in legalizeCustom()
448 MIRBuilder.buildFSub(Dst, Bitcast, TwoP52FP); in legalizeCustom()
450 MachineInstrBuilder ResF64 = MIRBuilder.buildFSub(s64, Bitcast, TwoP52FP); in legalizeCustom()
451 MIRBuilder.buildFPTrunc(Dst, ResF64); in legalizeCustom()
465 MachineIRBuilder &MIRBuilder, in SelectMSA3OpIntrinsic() argument
468 if (!MIRBuilder.buildInstr(Opcode) in SelectMSA3OpIntrinsic()
472 .constrainAllUses(MIRBuilder.getTII(), *ST.getRegisterInfo(), in SelectMSA3OpIntrinsic()
480 MachineIRBuilder &MIRBuilder, in MSA3OpIntrinsicToGeneric() argument
483 MIRBuilder.buildInstr(Opcode) in MSA3OpIntrinsicToGeneric()
492 MachineIRBuilder &MIRBuilder, in MSA2OpIntrinsicToGeneric() argument
495 MIRBuilder.buildInstr(Opcode) in MSA2OpIntrinsicToGeneric()
504 MachineIRBuilder &MIRBuilder = Helper.MIRBuilder; in legalizeIntrinsic() local
513 MachineInstr *Trap = MIRBuilder.buildInstr(Mips::TRAP); in legalizeIntrinsic()
520 MIRBuilder.buildLoad(LLT::pointer(0, 32), MI.getOperand(2), in legalizeIntrinsic()
523 MIRBuilder.buildStore(Tmp, MI.getOperand(1), in legalizeIntrinsic()
533 return MSA3OpIntrinsicToGeneric(MI, TargetOpcode::G_ADD, MIRBuilder, ST); in legalizeIntrinsic()
535 return SelectMSA3OpIntrinsic(MI, Mips::ADDVI_B, MIRBuilder, ST); in legalizeIntrinsic()
537 return SelectMSA3OpIntrinsic(MI, Mips::ADDVI_H, MIRBuilder, ST); in legalizeIntrinsic()
539 return SelectMSA3OpIntrinsic(MI, Mips::ADDVI_W, MIRBuilder, ST); in legalizeIntrinsic()
541 return SelectMSA3OpIntrinsic(MI, Mips::ADDVI_D, MIRBuilder, ST); in legalizeIntrinsic()
546 return MSA3OpIntrinsicToGeneric(MI, TargetOpcode::G_SUB, MIRBuilder, ST); in legalizeIntrinsic()
548 return SelectMSA3OpIntrinsic(MI, Mips::SUBVI_B, MIRBuilder, ST); in legalizeIntrinsic()
550 return SelectMSA3OpIntrinsic(MI, Mips::SUBVI_H, MIRBuilder, ST); in legalizeIntrinsic()
552 return SelectMSA3OpIntrinsic(MI, Mips::SUBVI_W, MIRBuilder, ST); in legalizeIntrinsic()
554 return SelectMSA3OpIntrinsic(MI, Mips::SUBVI_D, MIRBuilder, ST); in legalizeIntrinsic()
559 return MSA3OpIntrinsicToGeneric(MI, TargetOpcode::G_MUL, MIRBuilder, ST); in legalizeIntrinsic()
564 return MSA3OpIntrinsicToGeneric(MI, TargetOpcode::G_SDIV, MIRBuilder, ST); in legalizeIntrinsic()
569 return MSA3OpIntrinsicToGeneric(MI, TargetOpcode::G_SREM, MIRBuilder, ST); in legalizeIntrinsic()
574 return MSA3OpIntrinsicToGeneric(MI, TargetOpcode::G_UDIV, MIRBuilder, ST); in legalizeIntrinsic()
579 return MSA3OpIntrinsicToGeneric(MI, TargetOpcode::G_UREM, MIRBuilder, ST); in legalizeIntrinsic()
582 return MSA3OpIntrinsicToGeneric(MI, TargetOpcode::G_FADD, MIRBuilder, ST); in legalizeIntrinsic()
585 return MSA3OpIntrinsicToGeneric(MI, TargetOpcode::G_FSUB, MIRBuilder, ST); in legalizeIntrinsic()
588 return MSA3OpIntrinsicToGeneric(MI, TargetOpcode::G_FMUL, MIRBuilder, ST); in legalizeIntrinsic()
591 return MSA3OpIntrinsicToGeneric(MI, TargetOpcode::G_FDIV, MIRBuilder, ST); in legalizeIntrinsic()
593 return SelectMSA3OpIntrinsic(MI, Mips::FMAX_A_W, MIRBuilder, ST); in legalizeIntrinsic()
595 return SelectMSA3OpIntrinsic(MI, Mips::FMAX_A_D, MIRBuilder, ST); in legalizeIntrinsic()
597 return MSA2OpIntrinsicToGeneric(MI, TargetOpcode::G_FSQRT, MIRBuilder, ST); in legalizeIntrinsic()
599 return MSA2OpIntrinsicToGeneric(MI, TargetOpcode::G_FSQRT, MIRBuilder, ST); in legalizeIntrinsic()