tianshilei1992 added a comment.

@ABataev @jdoerfert I got a question about writing the test. `atomic compare` 
is supported from 5.1. Basically we have three ways to guard those `atomic 
compare` code:

1. Use macro `_OPENMP`. This pretty much works with one exception: we don't set 
the macro for `-fopenmp-simd`. Then we cannot test `-fopenmp-simd`.
2. Use those `omp50-error` and `omp50-note` which are shown in this patch. 
`-fopenmp-simd` can be tested now. However, it doesn't work with `-emit-pch`. 
The compiler emits errors that `unexpected OpenMP clause 'compare' in directive 
'#pragma omp atomic'` for the lower version tests. If we add `-verify` to the 
`-emit-pch` line, then the pch will not be generated.
3. Put `atomic compare` tests in another file.

For now only the 3rd method could work, but I'm not sure if there are ways to 
work around the limitation in the first two approaches.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116637

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to