mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
LoopVectorizer: Only allow vectorization of intrinsics. We can't know for sure that the functions 'abs' or 'round' are the functions from libm.
rdar://15012650 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191122 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2925,9 +2925,18 @@ bool LoopVectorizationLegality::canVectorizeInstrs() {
|
||||
// We still don't handle functions. However, we can ignore dbg intrinsic
|
||||
// calls and we do handle certain intrinsic and libm functions.
|
||||
CallInst *CI = dyn_cast<CallInst>(it);
|
||||
if (CI && !getIntrinsicIDForCall(CI, TLI) && !isa<DbgInfoIntrinsic>(CI)) {
|
||||
if (CI) {
|
||||
DEBUG(dbgs() << "LV: Found a call site.\n");
|
||||
return false;
|
||||
|
||||
if (!isa<IntrinsicInst>(it)) {
|
||||
DEBUG(dbgs() << "LV: We only vectorize intrinsics.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!getIntrinsicIDForCall(CI, TLI) && !isa<DbgInfoIntrinsic>(CI)) {
|
||||
DEBUG(dbgs() << "LV: Found an unknown intrinsic.\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Check that the instruction return type is vectorizable.
|
||||
|
Reference in New Issue
Block a user