[llvm] [LLVM][SCEV] Look through common vscale multiplicand when simplifying compares. (PR #141798)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 18 03:09:34 PDT 2025
artagnon wrote:
> [good] https://alive2.llvm.org/ce/z/rxeaG8 - uicmp (mul nuw %a, vscale), (mul nuw %b, vscale) -> uicmp %a, %b https://alive2.llvm.org/ce/z/gk2UvC - uicmp (mul nsw %a, vscale), (mul nsw %b, vscale) -> uicmp %a, %b https://alive2.llvm.org/ce/z/gZmQDH - sicmp (mul nsw %a, vscale), (mul nsw %b, vscale) -> sicmp %a, %b
>
> [bad] https://alive2.llvm.org/ce/z/-nomNo - sicmp (mul nuw %a, vscale), (mul nuw %b, vscale) != sicmp %a, %b
Btw, you can combine these proofs into a single Alive2 link: simply add {src, tgt}_uicmp_{nuw, nsw} and {src, tgt}_sicmp_{nsw, nuw_bad} to the same proof script.
https://github.com/llvm/llvm-project/pull/141798
More information about the llvm-commits
mailing list