jhuber6 added inline comments.

================
Comment at: clang/lib/Driver/Driver.cpp:789
+      (C.getInputArgs().hasArg(options::OPT_fopenmp_targets_EQ) ||
+       C.getInputArgs().hasArg(options::OPT_offload_arch_EQ));
+  if (IsOpenMPOffloading) {
----------------
yaxunl wrote:
> probably should be
> 
> C.getInputArgs().hasArg(options::OPT_offload_arch_EQ) && !IsHIP && !IsCUDA
> 
> otherwise a HIP program may get both HIP offloading and OpenMP offloading at 
> the same time. Currently it is not supported.
I do that below, line 815. The logic states that we only take 
`--offloading-arch` to imply OpenMP offloading if it's not currently CUDA or 
HIP. I'm pretty sure there's an existing test that covers this as it used to 
fail one of those HIP-interop tests until I added `!IsHIP && !IsCUDA` below.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125050

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

Reply via email to