Cast instructions are important to handle since induction variables are often extended to 64-bits.
This patch is intended to be applied after D10205 (though it could be applied independently with minor changes).
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
- Don't try to const-prop casts if the simplified value is just an offset from a base pointer.
Comment Actions
- Fallback to Base visitor if failed to constant fold (and only then call simplifyInstWithSCEV).
- Add TODO to visitCast.
Comment Actions
This patch looks fine, but I'd like to have a test case that specifically exercises it. Is that possible given the current state, or does that come in a subsequent patch?
lib/Transforms/Scalar/LoopUnrollPass.cpp | ||
---|---|---|
444 | This comment still seems stale (referring to ptrtoint). |
Comment Actions
Just as a note, this LGTM provided a minimal test change is included when it is committed.
Comment Actions
Thanks!
I added a new test here and committed the patch (with comment fixed too) in r242257.
This comment still seems stale (referring to ptrtoint).