[PATCH] D129980: [RISCV] Optimize (seteq (i64 (and X, 0xffffffff)), C1)

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 18 09:20:48 PDT 2022


reames added a comment.

In D129980#3660107 <https://reviews.llvm.org/D129980#3660107>, @craig.topper wrote:

> In D129980#3660043 <https://reviews.llvm.org/D129980#3660043>, @reames wrote:
>
>> LGTM
>>
>> Correct me if I'm wrong, but this should improve the idiomatic icmp eq i32 patterns for ELEN=64 right?  If so, have you thought about analogous cases for 16 and 8 bits w/Zb*?  On the surface, using a sext.h/b over a zext.h/b wouldn't seem to matter, but the constant simplifications are potentially interesting.  Should we be canonicalizing towards sext anyways?
>
> I don't think I understand this question. ELEN=64 is a vector term, but we're talking about scalar instructions here. Unless you meant XLEN=64?

Oops, yes.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129980



More information about the llvm-commits mailing list