[PATCH] D153193: [LoongArch] Optimize conditional selection of integer
hev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 17 08:04:13 PDT 2023
hev marked an inline comment as done.
hev added inline comments.
================
Comment at: llvm/lib/Target/LoongArch/LoongArchInstrInfo.td:1202
+def : Pat<(select GPR:$cond, GPR:$t, (i32 0)), (MASKEQZ GPR:$t, GPR:$cond)>;
+def : Pat<(select GPR:$cond, (i32 0), GPR:$f), (MASKNEZ GPR:$f, GPR:$cond)>;
----------------
xry111 wrote:
> Can we just write
>
> ```
> def : Pat<(select GPR:$cond, GPR:$t, 0), (MASKEQZ GPR:$t, GPR:$cond)>;
> ```
>
> here? I see RISC-V uses an untyped 0 in similar select patterns.
Yeap, thanks.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153193/new/
https://reviews.llvm.org/D153193
More information about the llvm-commits
mailing list