Lines Matching refs:Root
2919 static bool getMaddPatterns(MachineInstr &Root, in getMaddPatterns() argument
2921 unsigned Opc = Root.getOpcode(); in getMaddPatterns()
2922 MachineBasicBlock &MBB = *Root.getParent(); in getMaddPatterns()
2928 int Cmp_NZCV = Root.findRegisterDefOperandIdx(AArch64::NZCV, true); in getMaddPatterns()
2932 unsigned NewOpc = convertFlagSettingOpcode(Root); in getMaddPatterns()
2944 assert(Root.getOperand(1).isReg() && Root.getOperand(2).isReg() && in getMaddPatterns()
2946 if (canCombineWithMUL(MBB, Root.getOperand(1), AArch64::MADDWrrr, in getMaddPatterns()
2951 if (canCombineWithMUL(MBB, Root.getOperand(2), AArch64::MADDWrrr, in getMaddPatterns()
2958 if (canCombineWithMUL(MBB, Root.getOperand(1), AArch64::MADDXrrr, in getMaddPatterns()
2963 if (canCombineWithMUL(MBB, Root.getOperand(2), AArch64::MADDXrrr, in getMaddPatterns()
2970 if (canCombineWithMUL(MBB, Root.getOperand(1), AArch64::MADDWrrr, in getMaddPatterns()
2975 if (canCombineWithMUL(MBB, Root.getOperand(2), AArch64::MADDWrrr, in getMaddPatterns()
2982 if (canCombineWithMUL(MBB, Root.getOperand(1), AArch64::MADDXrrr, in getMaddPatterns()
2987 if (canCombineWithMUL(MBB, Root.getOperand(2), AArch64::MADDXrrr, in getMaddPatterns()
2994 if (canCombineWithMUL(MBB, Root.getOperand(1), AArch64::MADDWrrr, in getMaddPatterns()
3001 if (canCombineWithMUL(MBB, Root.getOperand(1), AArch64::MADDXrrr, in getMaddPatterns()
3008 if (canCombineWithMUL(MBB, Root.getOperand(1), AArch64::MADDWrrr, in getMaddPatterns()
3015 if (canCombineWithMUL(MBB, Root.getOperand(1), AArch64::MADDXrrr, in getMaddPatterns()
3027 static bool getFMAPatterns(MachineInstr &Root, in getFMAPatterns() argument
3030 if (!isCombineInstrCandidateFP(Root)) in getFMAPatterns()
3033 MachineBasicBlock &MBB = *Root.getParent(); in getFMAPatterns()
3036 switch (Root.getOpcode()) { in getFMAPatterns()
3041 assert(Root.getOperand(1).isReg() && Root.getOperand(2).isReg() && in getFMAPatterns()
3043 if (canCombineWithFMUL(MBB, Root.getOperand(1), AArch64::FMULSrr)) { in getFMAPatterns()
3046 } else if (canCombineWithFMUL(MBB, Root.getOperand(1), in getFMAPatterns()
3051 if (canCombineWithFMUL(MBB, Root.getOperand(2), AArch64::FMULSrr)) { in getFMAPatterns()
3054 } else if (canCombineWithFMUL(MBB, Root.getOperand(2), in getFMAPatterns()
3061 if (canCombineWithFMUL(MBB, Root.getOperand(1), AArch64::FMULDrr)) { in getFMAPatterns()
3064 } else if (canCombineWithFMUL(MBB, Root.getOperand(1), in getFMAPatterns()
3069 if (canCombineWithFMUL(MBB, Root.getOperand(2), AArch64::FMULDrr)) { in getFMAPatterns()
3072 } else if (canCombineWithFMUL(MBB, Root.getOperand(2), in getFMAPatterns()
3079 if (canCombineWithFMUL(MBB, Root.getOperand(1), in getFMAPatterns()
3083 } else if (canCombineWithFMUL(MBB, Root.getOperand(1), in getFMAPatterns()
3088 if (canCombineWithFMUL(MBB, Root.getOperand(2), in getFMAPatterns()
3092 } else if (canCombineWithFMUL(MBB, Root.getOperand(2), in getFMAPatterns()
3099 if (canCombineWithFMUL(MBB, Root.getOperand(1), in getFMAPatterns()
3103 } else if (canCombineWithFMUL(MBB, Root.getOperand(1), in getFMAPatterns()
3108 if (canCombineWithFMUL(MBB, Root.getOperand(2), in getFMAPatterns()
3112 } else if (canCombineWithFMUL(MBB, Root.getOperand(2), in getFMAPatterns()
3119 if (canCombineWithFMUL(MBB, Root.getOperand(1), in getFMAPatterns()
3123 } else if (canCombineWithFMUL(MBB, Root.getOperand(1), in getFMAPatterns()
3128 if (canCombineWithFMUL(MBB, Root.getOperand(2), in getFMAPatterns()
3132 } else if (canCombineWithFMUL(MBB, Root.getOperand(2), in getFMAPatterns()
3140 if (canCombineWithFMUL(MBB, Root.getOperand(1), AArch64::FMULSrr)) { in getFMAPatterns()
3144 if (canCombineWithFMUL(MBB, Root.getOperand(2), AArch64::FMULSrr)) { in getFMAPatterns()
3147 } else if (canCombineWithFMUL(MBB, Root.getOperand(2), in getFMAPatterns()
3154 if (canCombineWithFMUL(MBB, Root.getOperand(1), AArch64::FMULDrr)) { in getFMAPatterns()
3158 if (canCombineWithFMUL(MBB, Root.getOperand(2), AArch64::FMULDrr)) { in getFMAPatterns()
3161 } else if (canCombineWithFMUL(MBB, Root.getOperand(2), in getFMAPatterns()
3168 if (canCombineWithFMUL(MBB, Root.getOperand(2), in getFMAPatterns()
3172 } else if (canCombineWithFMUL(MBB, Root.getOperand(2), in getFMAPatterns()
3179 if (canCombineWithFMUL(MBB, Root.getOperand(2), in getFMAPatterns()
3183 } else if (canCombineWithFMUL(MBB, Root.getOperand(2), in getFMAPatterns()
3190 if (canCombineWithFMUL(MBB, Root.getOperand(2), in getFMAPatterns()
3194 } else if (canCombineWithFMUL(MBB, Root.getOperand(2), in getFMAPatterns()
3254 MachineInstr &Root, in getMachineCombinerPatterns() argument
3257 if (getMaddPatterns(Root, Patterns)) in getMachineCombinerPatterns()
3260 if (getFMAPatterns(Root, Patterns)) in getMachineCombinerPatterns()
3263 return TargetInstrInfo::getMachineCombinerPatterns(Root, Patterns); in getMachineCombinerPatterns()
3281 const TargetInstrInfo *TII, MachineInstr &Root, in genFusedMultiply() argument
3288 MachineInstr *MUL = MRI.getUniqueVRegDef(Root.getOperand(IdxMulOpd).getReg()); in genFusedMultiply()
3289 unsigned ResultReg = Root.getOperand(0).getReg(); in genFusedMultiply()
3294 unsigned SrcReg2 = Root.getOperand(IdxOtherOpd).getReg(); in genFusedMultiply()
3295 bool Src2IsKill = Root.getOperand(IdxOtherOpd).isKill(); in genFusedMultiply()
3308 MIB = BuildMI(MF, Root.getDebugLoc(), TII->get(MaddOpc), ResultReg) in genFusedMultiply()
3313 MIB = BuildMI(MF, Root.getDebugLoc(), TII->get(MaddOpc), ResultReg) in genFusedMultiply()
3319 MIB = BuildMI(MF, Root.getDebugLoc(), TII->get(MaddOpc), ResultReg) in genFusedMultiply()
3346 const TargetInstrInfo *TII, MachineInstr &Root, in genMaddR() argument
3352 MachineInstr *MUL = MRI.getUniqueVRegDef(Root.getOperand(IdxMulOpd).getReg()); in genMaddR()
3353 unsigned ResultReg = Root.getOperand(0).getReg(); in genMaddR()
3368 MachineInstrBuilder MIB = BuildMI(MF, Root.getDebugLoc(), TII->get(MaddOpc), in genMaddR()
3382 MachineInstr &Root, MachineCombinerPattern Pattern, in genAlternativeCodeSequence() argument
3386 MachineBasicBlock &MBB = *Root.getParent(); in genAlternativeCodeSequence()
3397 TargetInstrInfo::genAlternativeCodeSequence(Root, Pattern, InsInstrs, in genAlternativeCodeSequence()
3413 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 1, Opc, RC); in genAlternativeCodeSequence()
3428 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 2, Opc, RC); in genAlternativeCodeSequence()
3455 uint64_t Imm = Root.getOperand(2).getImm(); in genAlternativeCodeSequence()
3457 if (Root.getOperand(3).isImm()) { in genAlternativeCodeSequence()
3458 unsigned Val = Root.getOperand(3).getImm(); in genAlternativeCodeSequence()
3465 BuildMI(MF, Root.getDebugLoc(), TII->get(OrrOpc), NewVR) in genAlternativeCodeSequence()
3470 MUL = genMaddR(MF, MRI, TII, Root, InsInstrs, 1, Opc, NewVR, RC); in genAlternativeCodeSequence()
3499 BuildMI(MF, Root.getDebugLoc(), TII->get(SubOpc), NewVR) in genAlternativeCodeSequence()
3501 .addOperand(Root.getOperand(2)); in genAlternativeCodeSequence()
3504 MUL = genMaddR(MF, MRI, TII, Root, InsInstrs, 1, Opc, NewVR, RC); in genAlternativeCodeSequence()
3520 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 2, Opc, RC); in genAlternativeCodeSequence()
3547 int Imm = Root.getOperand(2).getImm(); in genAlternativeCodeSequence()
3548 if (Root.getOperand(3).isImm()) { in genAlternativeCodeSequence()
3549 unsigned Val = Root.getOperand(3).getImm(); in genAlternativeCodeSequence()
3556 BuildMI(MF, Root.getDebugLoc(), TII->get(OrrOpc), NewVR) in genAlternativeCodeSequence()
3561 MUL = genMaddR(MF, MRI, TII, Root, InsInstrs, 1, Opc, NewVR, RC); in genAlternativeCodeSequence()
3579 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 1, Opc, RC); in genAlternativeCodeSequence()
3594 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 2, Opc, RC); in genAlternativeCodeSequence()
3600 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 1, Opc, RC, in genAlternativeCodeSequence()
3606 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 2, Opc, RC, in genAlternativeCodeSequence()
3613 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 1, Opc, RC, in genAlternativeCodeSequence()
3619 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 2, Opc, RC, in genAlternativeCodeSequence()
3628 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 1, Opc, RC, in genAlternativeCodeSequence()
3632 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 1, Opc, RC, in genAlternativeCodeSequence()
3641 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 2, Opc, RC, in genAlternativeCodeSequence()
3645 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 2, Opc, RC, in genAlternativeCodeSequence()
3655 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 1, Opc, RC, in genAlternativeCodeSequence()
3659 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 1, Opc, RC, in genAlternativeCodeSequence()
3668 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 2, Opc, RC, in genAlternativeCodeSequence()
3672 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 2, Opc, RC, in genAlternativeCodeSequence()
3682 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 1, Opc, RC, in genAlternativeCodeSequence()
3686 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 1, Opc, RC, in genAlternativeCodeSequence()
3696 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 2, Opc, RC, in genAlternativeCodeSequence()
3700 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 2, Opc, RC, in genAlternativeCodeSequence()
3718 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 1, Opc, RC); in genAlternativeCodeSequence()
3734 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 2, Opc, RC); in genAlternativeCodeSequence()
3740 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 2, Opc, RC, in genAlternativeCodeSequence()
3747 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 2, Opc, RC, in genAlternativeCodeSequence()
3756 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 2, Opc, RC, in genAlternativeCodeSequence()
3760 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 2, Opc, RC, in genAlternativeCodeSequence()
3770 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 2, Opc, RC, in genAlternativeCodeSequence()
3774 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 2, Opc, RC, in genAlternativeCodeSequence()
3784 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 2, Opc, RC, in genAlternativeCodeSequence()
3788 MUL = genFusedMultiply(MF, MRI, TII, Root, InsInstrs, 2, Opc, RC, in genAlternativeCodeSequence()
3796 DelInstrs.push_back(&Root); in genAlternativeCodeSequence()