The ARM backend can use a loop to implement copying byval parameters before
a call. In non-thumb2 mode it uses a constant pool load to materialize the
trip count. For targets that need movt instead (e.g. Native Client), use
the same code as in thumb2 mode to materialize the trip count.
Details
Diff Detail
Event Timeline
Couple of minor points:
lib/Target/ARM/ARMISelLowering.cpp | ||
---|---|---|
7143 | Couldn't this be simplified to just Subtarget->useMovt(*MF)? | |
test/CodeGen/ARM/struct_byval.ll | ||
10 | Not tests like this are a bit sketchy. There's a massive range of incorrect behaviour that could be produced but get past. Especially as you've actually added ARM code, I think you should be testing that's correct. It'd also be good to make sure we don't try to produce movw/movt on CPUs that don't actually have them. That's surprisingly easy to do with C++ code manually using BuildMI. |
Couldn't this be simplified to just Subtarget->useMovt(*MF)?