https://bugs.llvm.org/show_bug.cgi?id=48686
Bug ID: 48686
Summary: OpenMPOpt is illegally removing calls
Product: new-bugs
Version: 11.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedb...@nondot.org
Reporter: rscottman...@gmail.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org
The OpenMPOpt pass in opt is illegally removing the second call to
omp_get_level() in the source code below after the second call gets inlined.
Using -openmp-opt-disable resolves the issue.
clang -O2 -fopenmp test.c
#include <omp.h>
#include <assert.h>
int main()
{
omp_set_nested(1);
assert(omp_get_level() == 0);
#pragma omp parallel if(0) num_threads(2)
{
assert(omp_get_level() == 1);
}
}
I've confirmed this exists in both release/11.x and main branches
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs