Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
Tests? NVPTX used to have issues lowering libcalls at all. It would be great to verify that it works now.
We use malloc in the OpenMP runtime, it works, albeit slow. Where do I put a test for this?
Add tests, merge D98607 into this as comment.
TBH. This patch doesn't impact the CodeGen test but only the instcombine test.
LGTM module couple of test nits.
llvm/test/CodeGen/NVPTX/libcall-fulfilled.ll | ||
---|---|---|
42–48 | 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. | |
llvm/test/Transforms/InstCombine/malloc_free_delete_nvptx.ll | ||
14 | 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. |
llvm/test/Transforms/InstCombine/malloc_free_delete_nvptx.ll | ||
---|---|---|
14 | 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. |
llvm/test/Transforms/InstCombine/malloc_free_delete_nvptx.ll | ||
---|---|---|
14 | That'd work too. |
I'd explicitly check that malloc/free are missing to make it obvious.
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.