CreateAlignmentAssumption with a run-time alignment value doesn't
correctly condition based on signedness, which can cause some odd
behaviors on large unsigneds. Additionally, only powers-of-two
are valid here, add that check to the assumption to prevent UB.
Details
Details
- Reviewers
jyknight craig.topper erichkeane
Diff Detail
Diff Detail
Event Timeline
This comment was removed by erichkeane.
Comment Actions
As discussed on IRC, check sign/power of 2 correctly for the alignment assumptions.
"As discussed on IRC" is not appropriate for a commit message. The rationale must be documented here.
I hope that extra is-power-of-two won't confuse the optimizer.
Probably would unless it gets constant folded.
Comment Actions
As disscussed in D54653 (https://reviews.llvm.org/D54653#1318964),
this differential will be simply unneeded, that review will address the issue too, so abandoning.