[PATCH] D108842: [ARMISelLowering] avoid emitting libcalls to __mulodi4()

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 27 14:28:14 PDT 2021


nickdesaulniers added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARMISelLowering.cpp:547
   setLibcallName(RTLIB::SRA_I128, nullptr);
   setLibcallName(RTLIB::MUL_I128, nullptr);
+  setLibcallName(RTLIB::MULO_I64, nullptr);
----------------
craig.topper wrote:
> Can you go ahead and add MULO_I128 here as well? C code probably can't hit it assuming __int128 isn't legal on ARM, but good to block other users.
Done. Indeed __int128 produces an error in clang for this target.

Want me to adapt the test to cover this as well? I don't suspect this will ever change for this target, so not sure test coverage is very interesting for this input, but happy to do so if you disagree.


================
Comment at: llvm/test/CodeGen/ARM/overflow-intrinsic-optimizations.ll:241
+entry:
+  %a.addr = alloca i32, align 4
+  %b.addr = alloca i64, align 8
----------------
craig.topper wrote:
> Can you run this through mem2reg?
If I do, then the test is no longer red before this change. Perhaps there is some other way to make this test less brittle?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108842/new/

https://reviews.llvm.org/D108842



More information about the llvm-commits mailing list