forked from OSchip/llvm-project
[Hexagon] Do not promote terminator instructions in Hexagon loop idioms
llvm-svn: 351369
This commit is contained in:
parent
86285d2e17
commit
4121eaf0a5
|
@ -1001,6 +1001,7 @@ bool PolynomialMultiplyRecognize::isPromotableTo(Value *Val,
|
|||
void PolynomialMultiplyRecognize::promoteTo(Instruction *In,
|
||||
IntegerType *DestTy, BasicBlock *LoopB) {
|
||||
Type *OrigTy = In->getType();
|
||||
assert(!OrigTy->isVoidTy() && "Invalid instruction to promote");
|
||||
|
||||
// Leave boolean values alone.
|
||||
if (!In->getType()->isIntegerTy(1))
|
||||
|
@ -1081,7 +1082,8 @@ bool PolynomialMultiplyRecognize::promoteTypes(BasicBlock *LoopB,
|
|||
std::transform(LoopB->begin(), LoopB->end(), std::back_inserter(LoopIns),
|
||||
[](Instruction &In) { return &In; });
|
||||
for (Instruction *In : LoopIns)
|
||||
promoteTo(In, DestTy, LoopB);
|
||||
if (!In->isTerminator())
|
||||
promoteTo(In, DestTy, LoopB);
|
||||
|
||||
// Fix up the PHI nodes in the exit block.
|
||||
Instruction *EndI = ExitB->getFirstNonPHI();
|
||||
|
|
Loading…
Reference in New Issue