File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -96,8 +96,10 @@ FunctionPass *llvm::createAlignmentFromAssumptionsPass() {
96
96
97
97
// Given an expression for the (constant) alignment, AlignSCEV, and an
98
98
// expression for the displacement between a pointer and the aligned address,
99
- // DiffSCEV, compute the alignment of the displaced pointer if it can be
100
- // reduced to a constant.
99
+ // DiffSCEV, compute the alignment of the displaced pointer if it can be reduced
100
+ // to a constant. Using SCEV to compute alignment handles the case where
101
+ // DiffSCEV is a recurrence with constant start such that the aligned offset
102
+ // is constant. e.g. {16,+,32} % 32 -> 16.
101
103
static unsigned getNewAlignmentDiff (const SCEV *DiffSCEV,
102
104
const SCEV *AlignSCEV,
103
105
ScalarEvolution *SE) {
You can’t perform that action at this time.
0 commit comments