[llvm] [GlobalISel][AArch64][AMDGPU] Expand FPOWI into series of multiplication (PR #95217)
Thorsten Schütt via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 19 07:45:32 PDT 2024
================
@@ -7356,6 +7356,38 @@ void CombinerHelper::applyBuildFnMO(const MachineOperand &MO,
Root->eraseFromParent();
}
+void CombinerHelper::applyExpandFPowI(MachineInstr &MI, BuildFnTy &MatchInfo) {
+ auto [Dst, Base, Exp] = MI.getFirst3Regs();
+ LLT Ty = MRI.getType(Dst);
+
+ MachineRegisterInfo &MRI = *Builder.getMRI();
+ std::optional<int64_t> ConstantExpValue = getIConstantVRegSExtVal(Exp, MRI);
+ assert(ConstantExpValue && "matched non-const FPOWI?");
+
+ int64_t OriginalExprVal = *ConstantExpValue;
+ int64_t ExpVal = OriginalExprVal;
+
----------------
tschuett wrote:
Ignore that comment.
https://github.com/llvm/llvm-project/pull/95217
More information about the llvm-commits
mailing list