Added ISel for smlawb, smlawt, smulwb and smulwt instructions for the ARM backend, along with CodeGen tests.
A fix for the bug reported in llvm.org/bugs/show_bug.cgi?id=21297
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Hi Sam,
The patch looks good. My comments are more about the format than the contents, which seems ok.
I don't particularly like how the Opc is set down all those nested functions across the multiple branches, but I don't have a better idea. This sequence of instructions is really hard to map into a simple structure (too many orthogonal variations).
Can you re-format and re-submit with -U999 so we can have a bit more context, please?
cheers,
--renato
lib/Target/ARM/ARMISelDAGToDAG.cpp | ||
---|---|---|
94 ↗ | (On Diff #53006) | irrelevant whispace change |
2534 ↗ | (On Diff #53006) | clang format |
test/CodeGen/ARM/smul.ll | ||
39 ↗ | (On Diff #53006) | better to use CHECK-LABEL: @f4 on all of them |
Hi Renato,
Thanks for the review and sorry I forgot about the added context again, I will add the changes after further review.
cheers,
sam
lib/Target/ARM/ARMISelDAGToDAG.cpp | ||
---|---|---|
254 ↗ | (On Diff #53024) | It seems these two could be coalesced into one method with a bit more logic inside the method... They're not really that different and they both call the same private static methods anyway. |
2596 ↗ | (On Diff #53024) | Maybe you should also test the opcode here and return null? |
Combined the SelectSMLAWX and SelectSMULWX functions into one, as well as adding extra checks that Opc gets assigned before creating the new node. Also updated the test check labels.