Patch enables selection of the smmls instruction for ARM targets, adding tests for thumb and arm.
Details
Diff Detail
Event Timeline
lib/Target/ARM/ARMISelDAGToDAG.cpp | ||
---|---|---|
3041–3042 | I think you need isThumb2 for the Thumb mode instruction. | |
3045–3046 | This condition could be inverted with a break to reduce indentation. | |
3054 | Don't you also need to check that the correct Subc result is being used by N? | |
lib/Target/ARM/ARMInstrThumb2.td | ||
2642 | 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 | 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 | 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 | Any explanation for these changes? |
lib/Target/ARM/ARMInstrThumb2.td | ||
---|---|---|
2642 | 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 | 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. |
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?