andjo403 wrote: Have rebased and fixed the comments so this is ready for a new review. have excluded the fold `not (trunc to i1)` to avoid the "ephemeral value" issue that was present before in this PR. https://github.com/llvm/llvm-project/pull/118406