[PATCH] D24956: [SelectionDAG] Add expansion and promotion of [US]MUL_LOHI

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 7 06:52:23 PST 2016


nhaehnle added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:2210
     // Hacker's Delight (itself derived from Knuth's Algorithm M from section
     // 4.3.1).
     unsigned Bits = NVT.getSizeInBits();
----------------
efriedma wrote:
> Can you replace this code with a call to expandMUL?
I played around with that, but I'd rather not do it in this patch. The generated code sequences are different, and in particular we'd generate non-legal instructions that at least the X86 target doesn't expect and doesn't handle properly. This is visible in test/CodeGen/X86/imul-256/512/1024.ll.


https://reviews.llvm.org/D24956





More information about the llvm-commits mailing list