Change GuardWidening scheme from branches widening when we always
maintain br(cond && WC) form:
%wc = call i1 @widenable.condition()
%guard = and i1 %cond0, %wc
br i1 %guard ...
-->
%wide.check = and i1 %cond0, %cond1
%wc = call i1 @widenable.condition()
%guard = and i1 %%wide.check, %wc
br i1 %guard ...
...to widenable conditions widening when we replace WC by
(NewCheck && WC):
%wc = call i1 @widenable.condition()
%guard = and i1 %cond0, %wc
br i1 %guard ...
-->
%wc = call i1 @widenable.condition()
%wide.check = and i1 %cond1, %wc
%guard = and i1 %cond0, %wide.check
br i1 %guard ...
It is necessary to avoid cases when we turn loop-invarinat branch to
a loop-variant one, like in this issue:
https://github.com/llvm/llvm-project/issues/60234
Pls rebase. This was changed to return the optional result.