LGTM module couple of test nits.
I'd just leave
CHECK: call.uni CHECK: malloc CHECK: call-uni CHECK: free
The surrounding call setup machinery is not particularly interesting and can potentially morph due to unrelated backend changes.
I'd explicitly check that malloc/free are missing to make it obvious.
CHECK-NOT: malloc CHECK-NOT: free CHECK: ret void
Otherwise the test looks somewhat odd -- it's supposedly about mallof and free, but the CHECK lines don't mention either. The optimize them properly in the comment above could also be more specific about what we expect to happen.
would it be ok to just improve the comment? CHECK-NEXT does the heavy lifting here and we might want to keep the auto-generated check lines.