Avoid fetching pointer element type...
if (IntrinsicInst *II = findInitTrampoline(Callee))
return transformCallThroughTrampoline(Call, *II);
- PointerType *PTy = cast<PointerType>(Callee->getType());
- FunctionType *FTy = cast<FunctionType>(PTy->getElementType());
+ FunctionType *FTy = Call.getFunctionType();
if (FTy->isVarArg()) {
int ix = FTy->getNumParams();
// See if we can optimize any arguments passed through the varargs area of
%d = bitcast i8* %c to ptr
ret ptr %d
}
+
+define void @call(ptr %a) {
+; CHECK-LABEL: @call(
+; CHECK-NEXT: call void [[A:%.*]]()
+; CHECK-NEXT: ret void
+;
+ call void %a()
+ ret void
+}