[llvm] [llvm][CodeGen] Intrinsic `llvm.powi.*` code gen for vector arguments (PR #118242)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 3 16:35:42 PST 2024
================
@@ -4648,6 +4648,24 @@ void SelectionDAGLegalize::ConvertNodeToLibcall(SDNode *Node) {
bool ExponentHasSizeOfInt =
DAG.getLibInfo().getIntSize() ==
Node->getOperand(1 + Offset).getValueType().getSizeInBits();
+ if (!ExponentHasSizeOfInt) {
+ // In some backends, such as RISCV64 and LoongArch64, the i32 type is
+ // illegal and is promoted by previous process. For such cases, the
+ // exponent actually matches with sizeof(int) and a libcall should be
----------------
topperc wrote:
Not that I know of.
I don't think we should let the vector powi get thisfar . The promotion of a libcall argument is the responsibility of call lowering and the information in TargetLowering::MakeLibCallOptions. We shouldn't promote and then try to fix it.
https://github.com/llvm/llvm-project/pull/118242
More information about the llvm-commits
mailing list