[Attributor][FIX] Ensure loop PHI replacements are dynamically unique
Similar to loads, PHIs can be used to introduce non-dynamically unique values into the simplification "algorithm". We need to check that PHIs do not carry such a value from one iteration into the next as can cause downstream reasoning to fail, e.g., downstream could think a comparison is equal because the simplified values are equal while they are defined in different loop iterations. Similarly, instructions in cycles are now conservatively treated as non-dynamically unique. We could do better but I'll leave that for the future. The change in AAUnderlyingObjects allows us to ignore dynamically unique when we simply look for underlying objects. The user of that AA should be aware that the result might not be a dynamically unique value.
Loading
Please sign in to comment