Index: llvm/include/llvm/Transforms/IPO/Attributor.h =================================================================== --- llvm/include/llvm/Transforms/IPO/Attributor.h +++ llvm/include/llvm/Transforms/IPO/Attributor.h @@ -3427,15 +3427,20 @@ /// "Clamp" this state with \p PVS. PotentialValuesState operator^=(const PotentialValuesState &PVS) { + IsValidState ^= PVS.IsValidState; unionAssumed(PVS); return *this; } PotentialValuesState operator&=(const PotentialValuesState &PVS) { + IsValidState &= PVS.IsValidState; unionAssumed(PVS); return *this; } + /// A helper state which indicate whether this state is valid or not. + BooleanState IsValidState; + private: /// Check the size of this set, and invalidate when the size is no /// less than \p MaxPotentialValues threshold. @@ -3485,9 +3490,6 @@ Set = IntersectSet; } - /// A helper state which indicate whether this state is valid or not. - BooleanState IsValidState; - /// Container for potential values SetTy Set; };