[llvm-bugs] [Bug 40156] New: OpenMP/declare_reduction_codegen.cpp, OpenMP/parallel_copyin_codegen.cpp fail on targets that have no TLS
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Dec 25 16:57:39 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=40156
Bug ID: 40156
Summary: OpenMP/declare_reduction_codegen.cpp,
OpenMP/parallel_copyin_codegen.cpp fail on targets
that have no TLS
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: OpenMP
Assignee: unassignedclangbugs at nondot.org
Reporter: nicolasweber at gmx.de
CC: llvm-bugs at lists.llvm.org
When LLVM_DEFAULT_TARGET_TRIPLE is set to a target that doesn't support TLS
(for example x86_64-apple-darwin instead of x86_64-apple-darwin16.7.0), then
OpenMP/declare_reduction_codegen.cpp and OpenMP/parallel_copyin_codegen.cpp
fail.
They check for the presence of
; Function Attrs: noinline
define internal void @__cxx_global_var_init() #6 section
"__TEXT,__StaticInit,regular,pure_instructions" {
entry:
call void @_ZN3SSSIiEC1Ev(%struct.SSS* @d)
ret void
}
; Function Attrs: noinline nounwind optnone
define linkonce_odr void @_ZN3SSSIiEC1Ev(%struct.SSS* %this) unnamed_addr #0
align 2 {
entry:
%this.addr = alloca %struct.SSS*, align 4
store %struct.SSS* %this, %struct.SSS** %this.addr, align 4
%this1 = load %struct.SSS*, %struct.SSS** %this.addr, align 4
call void @_ZN3SSSIiEC2Ev(%struct.SSS* %this1)
ret void
}
in this order, but without TLS these pieces get emitted a lot later, in
different order, and with a lot of code in between.
VarDecl::getTLSKind() contains
if (!hasAttr<ThreadAttr>() &&
!(getASTContext().getLangOpts().OpenMPUseTLS &&
getASTContext().getTargetInfo().isTLSSupported() &&
hasAttr<OMPThreadPrivateDeclAttr>()))
return TLS_None;
and the two tests don't pass -fnoopenmp-use-tls. The probably should, to make
sure the expectations are independent of the default target triple.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181226/a87054bd/attachment.html>
More information about the llvm-bugs
mailing list