Patch enables selection of the smmls instruction for ARM targets, adding tests for thumb and arm.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Target/ARM/ARMISelDAGToDAG.cpp | ||
---|---|---|
3041–3042 ↗ | (On Diff #64650) | I think you need isThumb2 for the Thumb mode instruction. |
3045–3046 ↗ | (On Diff #64650) | This condition could be inverted with a break to reduce indentation. |
3054 ↗ | (On Diff #64650) | Don't you also need to check that the correct Subc result is being used by N? |
lib/Target/ARM/ARMInstrThumb2.td | ||
2642 ↗ | (On Diff #64650) | These changes don't appear to be related to supporting SMMLS. They're just a bit of refactoring as far as I can tell. |
test/CodeGen/ARM/smml.ll | ||
27–28 ↗ | (On Diff #64650) | I think you should test actual dataflow here too (i.e. the registers that get used). It's very easy to mess that kind of thing up with manual C++ selection. |
Updated after Tim's comments, including: checking for thumb2, what value of subc the sube node uses, reducing indentation and improving the test.
lib/Target/ARM/ARMISelDAGToDAG.cpp | ||
---|---|---|
3041 ↗ | (On Diff #64837) | This still isn't quite right, I'm afraid. We only need Thumb2 if we're in Thumb mode. The check for both Thumb mode and Thumb2 is isThumb2 by the looks of it. Could you also add an armv6-eabi line to the test to make sure it's working? |
lib/Target/ARM/ARMInstrThumb2.td | ||
2642 ↗ | (On Diff #64837) | Any explanation for these changes? |
lib/Target/ARM/ARMInstrThumb2.td | ||
---|---|---|
2642 ↗ | (On Diff #64837) | I think it's OK to review here (and have no objections), but a separate commit would definitely be appreciated. |
lib/Target/ARM/ARMISelDAGToDAG.cpp | ||
---|---|---|
3041–3042 ↗ | (On Diff #64889) | OK, I see why this works now (there will never be an SMUL_LOHI in Thumb1 code) but I think it needs at least an assertion to make clear to a reader that we have considered thumbv6. |