rampitec added inline comments.
================ Comment at: clang/test/CodeGenOpenCL/atomics-remarks-gfx90a.cl:9 +// RUN: %clang_cc1 -cl-std=CL2.0 -O0 -triple=amdgcn-amd-amdhsa -target-cpu gfx90a \ +// RUN: -Rpass=si-lower -munsafe-fp-atomics %s -S -o - 2>&1 | \ ---------------- You are compiling 2 functions with 2 different sets of options. Essentially it is unclear what are you checking because either half skips half of the remarks. Either compile a single function differently or make 2 different tests. ================ Comment at: clang/test/CodeGenOpenCL/atomics-remarks-gfx90a.cl:13 + +// RUN: %clang_cc1 %s -cl-std=CL2.0 -O0 -triple=amdgcn-amd-amdhsa -target-cpu gfx90a \ +// RUN: -Rpass=si-lower -S -emit-llvm -o - 2>&1 | \ ---------------- This line does not have -munsafe-fp-atomics option... ================ Comment at: clang/test/CodeGenOpenCL/atomics-remarks-gfx90a.cl:60 +// GFX90A-HW-LABEL: @atomic_unsafe_hw +// GFX90A-HW: atomicrmw fadd float addrspace(1)* %{{.*}}, float %{{.*}} syncscope("workgroup-one-as") monotonic, align 4 +// GFX90A-HW: atomicrmw fadd float addrspace(1)* %{{.*}}, float %{{.*}} syncscope("agent-one-as") monotonic, align 4 ---------------- ... therefor these checks must fail. ================ Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:12195 + if (!fpModeMatchesGlobalFPAtomicMode(RMW)) + return reportUnsafeHWInst(RMW, AtomicExpansionKind::None); ---------------- This is wrong. Condition is inverted and essentially tests should fail. Make sure you can pass testing before posting a diff. ================ Comment at: llvm/test/CodeGen/AMDGPU/atomics-remarks-gfx90a.ll:108 + +; GFX90A-HW: Hardware instruction generated for atomic fadd operation at memory scope system due to an unsafe request. +; GFX90A-HW: Hardware instruction generated for atomic fadd operation at memory scope agent due to an unsafe request. ---------------- Does it print a function name before the diagnostics? Label checks would be useful. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108150/new/ https://reviews.llvm.org/D108150 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits