We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 880014b commit dbe6d85Copy full SHA for dbe6d85
polly/lib/CodeGen/PPCGCodeGeneration.cpp
@@ -3443,13 +3443,11 @@ class PPCGCodeGeneration : public ScopPass {
3443
continue;
3444
3445
for (Value *Op : Inst.operands())
3446
- // Look for (<func-type>*) among operands of Inst
3447
- if (auto PtrTy = dyn_cast<PointerType>(Op->getType())) {
3448
- if (isa<FunctionType>(PtrTy->getPointerElementType())) {
3449
- LLVM_DEBUG(dbgs()
3450
- << Inst << " has illegal use of function in kernel.\n");
3451
- return true;
3452
- }
+ // Look for functions among operands of Inst.
+ if (isa<Function>(Op->stripPointerCasts())) {
+ LLVM_DEBUG(dbgs()
+ << Inst << " has illegal use of function in kernel.\n");
+ return true;
3453
}
3454
3455
return false;
0 commit comments