@@ -991,25 +991,13 @@ bool Analyzer::deconstructSCEV(const SCEV *S, Analyzer::DeconstructedSCEV &Resul
991
991
return true ;
992
992
}
993
993
994
- // Expect SCEV expression:
995
- // { start, +, step }
996
- // where step is constant
997
- if (auto *Add = dyn_cast<SCEVAddRecExpr>(S)) {
998
- // Consider the following SCEV as a mul pattern:
999
- // {(%val * %multiplier),+,%multiplier}
1000
- auto *Op0 = Add->getOperand (0 );
1001
- auto *Op1 = Add->getOperand (1 );
1002
- bool Conv = false ;
1003
- if (auto *Mul = dyn_cast<SCEVMulExpr>(Op0)) {
1004
- auto *MulOp0 = Mul->getOperand (0 );
1005
- auto *MulOp1 = Mul->getOperand (1 );
1006
- if (MulOp0 == Op1 || MulOp1 == Op1) {
1007
- Conv = true ;
1008
- }
1009
- }
1010
-
1011
- if (!Add->isAffine ())
1012
- return false ;
994
+ // Expect SCEV expression:
995
+ // { start, +, step }
996
+ // where step is constant
997
+ if (auto *Add = dyn_cast<SCEVAddRecExpr>(S))
998
+ {
999
+ if (!Add->isAffine ())
1000
+ return false ;
1013
1001
1014
1002
if (Add->getNumOperands () != 2 )
1015
1003
return false ;
@@ -1027,9 +1015,8 @@ bool Analyzer::deconstructSCEV(const SCEV *S, Analyzer::DeconstructedSCEV &Resul
1027
1015
if (!SE.isLoopInvariant (OpStep, &L))
1028
1016
return false ;
1029
1017
1030
- Result.Start = Add->getStart ();
1031
- Result.Step = OpStep;
1032
- Result.ConvertedMulExpr = Conv;
1018
+ Result.Start = Add->getStart ();
1019
+ Result.Step = OpStep;
1033
1020
1034
1021
return IGCLLVM::isSafeToExpandAt (Result.Start , &L.getLoopPreheader ()->back (), &SE, &E);
1035
1022
}
0 commit comments