I don't know this code and can't properly comment, but having a constant like this ("7") sounds wrong.
Why not 6, or 8, or 42?
Please regenerate the tests in a separate commit, to make it clear what this patch is actually changing. Please change the description to make it clear what this is actually fixing; as far as I can tell, we aren't generating "wrong code", just inlining memcpy and memset calls too aggressively.
+1 from me.
Address more comments from Nemanja and Hiroshi.
Do you confirm that such behavior is acceptable?
Ping. (@george.karpenkov, do you have the time to take a look?)
I would suggest switching the option (arm-promote-constant) to default to false rather than commenting out the code, so we don't have to XFAIL the unit-tests.
Thanks for your comment, Eli.
Looks like we are down to just running clang format on the code so the R"( strings don't go over 80 chars and this is good to go from me.
Very close and overall very nice, just a few implementation details to take care of.