mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-15 23:57:48 +00:00
Do not apply the transformation if the target does not support DestTy natively.
llvm-svn: 55433
This commit is contained in:
parent
c4040a69b7
commit
7abe1944ae
@ -1735,8 +1735,15 @@ void LoopStrengthReduce::OptimizeShadowIV(Loop *L) {
|
||||
DestTy = UCast->getDestTy();
|
||||
else if (SIToFPInst *SCast = dyn_cast<SIToFPInst>(CandidateUI->User))
|
||||
DestTy = SCast->getDestTy();
|
||||
if (!DestTy) continue;
|
||||
|
||||
if (!DestTy) continue;
|
||||
|
||||
if (TLI) {
|
||||
/* If target does not support DestTy natively then do not apply
|
||||
this transformation. */
|
||||
MVT DVT = TLI->getValueType(DestTy);
|
||||
if (!TLI->isTypeLegal(DVT)) continue;
|
||||
}
|
||||
|
||||
PHINode *PH = dyn_cast<PHINode>(ShadowUse->getOperand(0));
|
||||
if (!PH) continue;
|
||||
if (PH->getNumIncomingValues() != 2) continue;
|
||||
|
Loading…
Reference in New Issue
Block a user