[llvm] [llvm][CodeGen] Intrinsic `llvm.powi.*` code gen for vector arguments (PR #118242)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 3 16:03:03 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
----------------
arsenm wrote:

So DAG.getLibInfo().getIntSize() should be 8?

https://github.com/llvm/llvm-project/pull/118242


More information about the llvm-commits mailing list