From 690b76e13df384e6b2feccb26655762be3644cb8 Mon Sep 17 00:00:00 2001 From: Jacob Gravelle Date: Thu, 24 Aug 2017 19:53:44 +0000 Subject: [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 --- llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp') 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(Call->getCalledValue())) + return false; + FunctionType *FuncTy = Call->getFunctionType(); unsigned Opc; - bool IsDirect = Func != nullptr; bool IsVoid = FuncTy->getReturnType()->isVoidTy(); unsigned ResultReg; if (IsVoid) { -- cgit v1.2.3