[llvm] [HashRecognize] Rewrite arePHIsIntertwined (PR #144878)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 1 11:21:35 PDT 2025
artagnon wrote:
> > > > My concern is that we could miscompile this specially crafted code:
> > >
> > >
> > > Thank you for finding yet another bug! Fixed now by matching the first XOR (I think I had equivalent logic before the rewrite using count_if == 1, but missed it in the rewrite).
> > > Note that if the corrupt xor is anything else, the KnownBits propagation will fail.
> >
> >
> > Wait a second, it could be 'or'. Need to think some more about this.
>
> I believe that I have the right fix now, with a known-bits computation.
This is not a fool-proof solution, as we could perform computations eventually leading to zero, but that exceed the compute-known-bits depth. Have to think some more.
https://github.com/llvm/llvm-project/pull/144878
More information about the llvm-commits
mailing list