diff options
| author | Owen Anderson <resistor@mac.com> | 2014-08-07 21:07:35 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2014-08-07 21:07:35 +0000 |
| commit | 6c19ab1b5d47466974a6965a1e9dfe5907e60117 (patch) | |
| tree | b721f03f4c12cb63f0ed5cd99b5e46248aa63d87 /llvm/lib/Transforms | |
| parent | d6db68c181b9774ea4a3f02fd2cb3f22d93e0095 (diff) | |
| download | bcm5719-llvm-6c19ab1b5d47466974a6965a1e9dfe5907e60117.tar.gz bcm5719-llvm-6c19ab1b5d47466974a6965a1e9dfe5907e60117.zip | |
Fix a case in SROA where lifetime intrinsics could inhibit alloca promotion. In
this case, the code path dealing with vector promotion was missing the explicit
checks for lifetime intrinsics that were present on the corresponding integer
promotion path.
llvm-svn: 215148
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/SROA.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/SROA.cpp b/llvm/lib/Transforms/Scalar/SROA.cpp index 735dd632f01..2ed4c371618 100644 --- a/llvm/lib/Transforms/Scalar/SROA.cpp +++ b/llvm/lib/Transforms/Scalar/SROA.cpp @@ -1659,6 +1659,10 @@ static bool isVectorPromotionViableForSlice( return false; if (!I->isSplittable()) return false; // Skip any unsplittable intrinsics. + } else if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(U->getUser())) { + if (II->getIntrinsicID() != Intrinsic::lifetime_start && + II->getIntrinsicID() != Intrinsic::lifetime_end) + return false; } else if (U->get()->getType()->getPointerElementType()->isStructTy()) { // Disable vector promotion when there are loads or stores of an FCA. return false; |

