[PATCH] D98606: [NVPTX] CUDA does provide malloc/free since compute capability 2.X

Artem Belevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 15 14:37:41 PDT 2021


tra added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/malloc_free_delete_nvptx.ll:13
+; CHECK-LABEL: @malloc_then_free(
+; CHECK-NEXT:    ret void
+;
----------------
jdoerfert wrote:
> tra wrote:
> > 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.
That'd work too. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98606/new/

https://reviews.llvm.org/D98606



More information about the llvm-commits mailing list