[all-commits] [llvm/llvm-project] 99ef0d: [RISCV] Fold (sub constant, (setcc x, y, eq/neq)) ...
ChunyuLiao via All-commits
all-commits at lists.llvm.org
Sat Aug 13 05:38:12 PDT 2022
Author: LiaoChunyu <chunyu at iscas.ac.cn>
Date: 2022-08-13 (Sat, 13 Aug 2022)
[RISCV] Fold (sub constant, (setcc x, y, eq/neq)) -> (add constant - 1, (setcc x, y, neq/eq))
(setcc x, y, eq/neq) are seqz, snez that set rd = 0/1.
addi is used to process immediate, which can save instructions for load immediate.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D131471
More information about the All-commits