[PATCH] D154953: [InstSimplify] Remove the remainder loop if we know the mask is always true

Allen zhong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 25 00:02:04 PDT 2023


Allen marked an inline comment as done.
Allen added a comment.

> Can you
>
> 1. Add some tests that aren't reliant on vscale (just some simple cases is fine).
> 2. would still like alive2 link.
>
> Code change looks fine to me.

hi @goldstein.w.n, I added 2 new cases and_add_shl and and_add_shl_overlap with alive2 link according your comment.
Because the canonicalizeLowbitMask always fold 1 << x into ~(-1 << x), so I also add extra code to match this.
I also try to debug something like https://alive2.llvm.org/ce/z/r5XLZj, and find the assume works on op0_p2 instead of pow2 itself, so it is more difficult to handle that case.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154953/new/

https://reviews.llvm.org/D154953



More information about the llvm-commits mailing list