The code currently checks whether the intersection has one of TBAA, Scope or NoAlias unset -- however, those might have already been unset in the first place, in which case we will unnecessarily report a change. Instead, compare the intersection result to the original AAInfo.
This makes for a 0.5% geomean compile-time saving: https://llvm-compile-time-tracker.com/compare.php?from=0b39d2d75275b80994dac06b7ad05031cbd09393&to=7e6dc7d267393489b12e4884641f411d375d000e&stat=instructions
The current form of the check was introduced in https://github.com/llvm/llvm-project/commit/35548e80d67dd0d6e61c489432cfb1dafe0ddb65, which is how I ran into this.