summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
diff options
context:
space:
mode:
authorJacob Gravelle <jgravelle@google.com>2017-08-24 19:53:44 +0000
committerJacob Gravelle <jgravelle@google.com>2017-08-24 19:53:44 +0000
commit690b76e13df384e6b2feccb26655762be3644cb8 (patch)
treed142c12a4ef5851f330afbc77099aee901c9546e /llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
parent6d0970f64ecf3fc9788e5d71771cbce1f520d938 (diff)
downloadbcm5719-llvm-690b76e13df384e6b2feccb26655762be3644cb8.tar.gz
bcm5719-llvm-690b76e13df384e6b2feccb26655762be3644cb8.zip
[WebAssembly] FastISel : Bail to SelectionDAG for constexpr calls
Summary: Currently FastISel lowers constexpr calls as indirect calls. We'd like those to direct calls, and falling back to SelectionDAGISel handles that. Reviewers: dschuff, sunfish Subscribers: jfb, sbc100, llvm-commits, aheejin Differential Revision: https://reviews.llvm.org/D37073 llvm-svn: 311693
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
index c980f4b87f9..f516a6b260d 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
@@ -700,9 +700,12 @@ bool WebAssemblyFastISel::selectCall(const Instruction *I) {
if (Func && Func->isIntrinsic())
return false;
+ bool IsDirect = Func != nullptr;
+ if (!IsDirect && isa<ConstantExpr>(Call->getCalledValue()))
+ return false;
+
FunctionType *FuncTy = Call->getFunctionType();
unsigned Opc;
- bool IsDirect = Func != nullptr;
bool IsVoid = FuncTy->getReturnType()->isVoidTy();
unsigned ResultReg;
if (IsVoid) {
OpenPOWER on IntegriCloud