https://bugs.llvm.org/show_bug.cgi?id=42563

Roman Lebedev <lebedev...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #4 from Roman Lebedev <lebedev...@gmail.com> ---
Actually, i'm missing the point here.
While indeed if the mask does not touch any bits that will remain
after the shift means we can drop the mask, we still can trivially do
the fold if it *does* touch some bits - that legality check also tells
us how many high bits to clear.

https://rise4fun.com/Alive/x2Cq
Obviously, that won't work if we had `ashr`.

The mask is constant, so we only need one extra instruction.
I guess that means the input to `%r` needs to be one-use (or %x a constant.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to