Hi Kito,
On 2023/11/9 17:21, Kito Cheng wrote:
Should we need a zero-ext version as well?
It's not needed at the moment, since the sign_extend is currently used
for both int32_t and uint32_t. I can't find a case where zero_extend
would occur.
--
Best,
Lehua (RiVAI)
lehua.d...@rivai.ai
<mailto:rdapp@gmail.com>,
> > pal...@rivosinc.com <mailto:pal...@rivosinc.com>,
> > jeffreya...@gmail.com <mailto:jeffreya...@gmail.com>,
> > lehua.d...@rivai.ai <mailto:lehua.d...@rivai.ai>
> > Subject [PATCH] RISC-V: Removed unnecessary sign-extend for vsetvl
> >
>
> --
> Best,
> Lehua (RiVAI)
> lehua.d...@rivai.ai
>
.zh...@rivai.ai>,
kito.ch...@gmail.com <mailto:kito.ch...@gmail.com>,
rdapp@gmail.com <mailto:rdapp@gmail.com>,
pal...@rivosinc.com <mailto:pal...@rivosinc.com>,
jeffreya...@gmail.com <mailto:jeffreya...@gmail.com>,
lehua.d...@rivai.ai <mailto:lehua.d...@rivai.ai>
lgtm Replied Message FromLehua DingDate11/08/2023 21:27 Togcc-patches@gcc.gnu.org Ccjuzhe.zh...@rivai.ai,kito.ch...@gmail.com,rdapp@gmail.com,pal...@rivosinc.com,jeffreya...@gmail.com,lehua.d...@rivai.aiSubject[PATCH] RISC-V: Removed unnecessary sign-extend for vsetvl
Hi,
This patch try to combine bellow two insns and then further remove
unnecessary sign_extend operations. This optimization is borrowed
from LLVM (https://godbolt.org/z/4f6v56xej):
(set (reg:DI 134 [ _1 ])
(unspec:DI [
(const_int 19 [0x13])
(const_int 8