rampitec added inline comments.
================ Comment at: clang/test/CodeGenOpenCL/fp-atomics-optremarks-gfx90a.cl:23 + +// GFX90A-HW: A floating-point atomic instruction will generate an unsafe hardware instruction which may fail to update memory [-Rpass=si-lower] +// GFX90A-HW-LABEL: test_atomic_add ---------------- Should check other cases too. Essentially a check per every distinct emitted remark. ================ Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:12120 + OptimizationRemarkEmitter *ORE, + OptimizationRemark OptRemark) { + ORE->emit([&]() { return OptRemark; }); ---------------- Why OptRemark and not just StringRef? I really want to see as little churn as possible at the call site. ================ Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:12173 + if (RMW->use_empty()) { + if (RMW->getFunction() + ->getFnAttribute("amdgpu-unsafe-fp-atomics") ---------------- No need to check attribute. Everything below amdgpu-unsafe-fp-atomics check to the end of the block is unsafe. Just revert to original return and call reportAtomicExpand() for the AtomicExpansionKind::None case. 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