[PATCH] D112645: [OpenMP] Fix: opposite attributes could be set by -fno-inline

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 1 12:00:05 PDT 2021


jhuber6 added inline comments.


================
Comment at: clang/test/OpenMP/parallel_for_noinline.cpp:1
+// RUN: %clang -O0 -fopenmp -fno-inline %s -S -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,CHECK-O0
+// RUN: %clang -O1 -fopenmp -fno-inline %s -S -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,CHECK-O1
----------------
igor.kirillov wrote:
> jhuber6 wrote:
> > This can probably be merged with the other test added in D107649 since it's the same problem, just add another run line and run the update script.
> It was my first thought too but I don't see how to check this bug with `#pragma omp parallel if(0)`. If I add function with `#pragma omp parallel for` there it goes contrary to the test file name (parallel_**if**_codegen_PR51349). More than that, checks generated by `update_cc_test_checks.py` are too overwhelming and hide whatever we were going to test there. I can do it this way or may be you have any other ideas?
> 
> What if I rename my file this test file name to parallel_**for**_codegen_PR51349.cpp instead? They are related and thus we don't loose sight of them.
Just adding this triggered the bug for me and hardly generates anything.
```
#pragma omp parallel
  ;
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112645



More information about the cfe-commits mailing list