This patch includes EVA instructions in Std2MicroMips mapping tables required for direct object emission.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Can you provide a test case for this? You can generate a .mir file with the stop-after option of llc, then modify by hand the stores and loads to use the MIPS eva instructions. The test case should then use start-after= with -mattr=+micromips, produce an object file, then disassemble the object for and check that the resulting object file contains only micromips instructions.
I forgot to mention that I didn't succeed to provoke generation of CACHEE and PREFE, although I did succeed in inserting them manually.
If that's ok I can add them just like this to test
CACHEE %1, 5, 2
PREFE %1, 5, 2
and add additional CHECKs.
Yes, adding them manually is fine. We haven't implemented support for _builtin_prefetch or _builtin_mips_cache, so that's the only way to test them.
test/CodeGen/Mips/micromips-eva.mir | ||
---|---|---|
4–7 ↗ | (On Diff #130913) | This can be removed from the test case. |
55–61 ↗ | (On Diff #130913) | All this and the "#0"s from the function definitions can be removed from the test case. |
LGTM.
During review, I spotted that the left/right eva stores and loads are not in the instruction mapping tables and that they have incorrect DAG patterns associated with them but that can be submitted as a separate patch.
lib/Target/Mips/MicroMipsInstrInfo.td | ||
---|---|---|
786–796 ↗ | (On Diff #131787) | Nit: These lines are overly long. |
test/CodeGen/Mips/micromips-eva.mir | ||
211–212 ↗ | (On Diff #131787) | Nit: align the instruction text with the other instructions. |