summaryrefslogtreecommitdiff
path: root/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-08-06 19:11:24 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-08-06 19:11:24 +0000
commit0faeaeed40a4c42a778a088cbdad0bc54468eef4 (patch)
tree62d084de9ed8b89c9a882bac12f64d05b109cf09 /contrib/llvm-project/clang/lib/AST/ExprConstant.cpp
parente8141ad1df2098dd3f6d627c49ce99307315f5fd (diff)
Notes
Diffstat (limited to 'contrib/llvm-project/clang/lib/AST/ExprConstant.cpp')
-rw-r--r--contrib/llvm-project/clang/lib/AST/ExprConstant.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp b/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp
index 41a4ae4b91c8..97d5d7bb2180 100644
--- a/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp
+++ b/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp
@@ -11529,6 +11529,13 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E,
}
}
+ // Avoid emiting call for runtime decision on PowerPC 32-bit
+ // The lock free possibilities on this platform are covered by the lines
+ // above and we know in advance other cases require lock
+ if (Info.Ctx.getTargetInfo().getTriple().getArch() == llvm::Triple::ppc) {
+ return Success(0, E);
+ }
+
return BuiltinOp == Builtin::BI__atomic_always_lock_free ?
Success(0, E) : Error(E);
}