Displaying 2 results from an estimated 2 matches for "stripandcomputeconstantoffset".
Did you mean:
stripandcomputeconstantoffsets
2017 Mar 03
2
Optionally using value numbering in Simplify*
...aren't we calling SimplifyCmpInst(pred, live, live2, ...)?
We do.
The example is a bit contrived, the real example has a phi in the way of
computing the gep offset, and SimplifyCmpInst does walking and matching, so
this won't work anyway.
See computePointerICmp:
Constant *LHSOffset = stripAndComputeConstantOffsets(DL, LHS);
Constant *RHSOffset = stripAndComputeConstantOffsets(DL, RHS);
This in turn walks and collects the offsets. One of those is a phi we know
to be equivalent to a constant ...
Or are you expecting SimplifyCmpInst(pred, live, dead, ...) to call back
into GVN to find values equivalent t...
2017 Mar 03
4
Optionally using value numbering in Simplify*
So i have a testcase (see PR31792, and cond_br2.llin GVN) that current GVN
can simplify because it replaces instructions as it goes. It's an example
of a larger issue that pops up quite a lot
I would appreciate thoughts on what to do about it
it amounts to something like this (but again, it happens a lot):
live = gep thing, 0
live2 = gep thing, 1
branch i1 provablytrue,, mergeblock, otherbb