================ @@ -461,6 +479,27 @@ class OpLowerer { }); } + [[nodiscard]] bool lowerSplitDouble(Function &F) { + IRBuilder<> &IRB = OpBuilder.getIRB(); + return replaceFunction(F, [&](CallInst *CI) -> Error { + IRB.SetInsertPoint(CI); + + Value *Arg0 = CI->getArgOperand(0); + + Type *NewRetTy = OpBuilder.getResSplitDoubleType(M.getContext()); + + std::array<Value *, 1> Args{Arg0}; + Expected<CallInst *> OpCall = OpBuilder.tryCreateOp( ---------------- bogner wrote:
We could potentially do this in a semi-generic way by having a `replaceFunctionWithNamedStructOp(F, OpCode, NewRetTy)`. Conceptually, we could even do that automatically within `replaceFunctionWithOp` with a little bit more tablegen. For these layout-compatible-but-named-struct operations I would expect them to all be the same. https://github.com/llvm/llvm-project/pull/109331 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits