Fixes #133344 Proof: https://alive2.llvm.org/ce/z/X3Uh23 InstCombine couldn't optimize `i1` because `canonicalizeICmpBool()` was transforming the comparison into bitwise operations before `foldICmpTruncWithTruncOrExt()` was called. This PR solves the ordering issue by placing `foldICmpTruncWithTruncOrExt()` before `canonicalizeICmpBool()`. I believe this will not cause any regressions since all tests are passing.
332 KiB
332 KiB