gandhi21299 marked an inline comment as done. gandhi21299 added inline comments.
================ Comment at: clang/test/CodeGenCUDA/fp-atomics-optremarks.cu:10 + +// GFX90A-CAS: A compare and swap loop was generated for an atomic operation at system memory scope +// GFX90A-CAS-LABEL: _Z14atomic_add_casPf ---------------- rampitec wrote: > gandhi21299 wrote: > > rampitec wrote: > > > gandhi21299 wrote: > > > > rampitec wrote: > > > > > gandhi21299 wrote: > > > > > > rampitec wrote: > > > > > > > Need tests for all scopes. > > > > > > `__atomic_fetch_add` does not take scope as an argument, how could > > > > > > I add tests with different scopes? > > > > > At least in the IR test. > > > > What do you mean by that? > > > You need to test all of that. If you cannot write a proper .cu test, then > > > write an IR test and run llc. > > Should I discard this test then since the test fp-atomics-remarks-gfx90a.ll > > already satisfies? > CU test is still needed. You also need it in the .cl test below. Alright, I am not sure how I can test for the other scopes though. ================ Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:585 + TLI->shouldExpandAtomicRMWInIR(AI, ORE); + OptimizationRemark Remark(DEBUG_TYPE, "Passed", AI->getFunction()); + switch (Kind) { ---------------- rampitec wrote: > What should this "Passed" do and why wouldn't just declare it where you use > it? https://llvm.org/docs/Remarks.html Since this is an informative pass and not that pass failed to optimize, the "Passed" argument is used. I will move it downwards, I thought it might be useful in the future for other operations. Its better below for now anyways. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106891/new/ https://reviews.llvm.org/D106891 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits