If the basic block of the instruction passed to getUniqueReachingMIDef
is a transitive predecessor of itself and has a definition of the
register, the function will return that definition even if it is after
the instruction given to the function. This patch stops the function
from scanning the instruction's basic block to prevent this.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I have also stumbled across this bug while making a change so I also have this fix downstream! The existing test cases will cover this once I upload another change, so I think this is fine. Thanks!
Comment Actions
I was just writing that I understood that creating a test for this one was very difficult? I.e., creating a small test case, was that this case? Looks like Sam has one now......should it not be part of this change? But anyway, it's fine I guess.
Comment Actions
Yeah creating a small test case for this was difficult. I believe that Sam Parker's test depends on both his changes and mine, so would be a chicken and egg problem if we were to include that into this patch.