[PATCH] D129757: [RISCV] Optimize SELECT_CC when the true value of select is Constant

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 19 01:04:23 PDT 2022


asb added a comment.

In D129757#3661387 <https://reviews.llvm.org/D129757#3661387>, @liaolucy wrote:

> 1. Address @frasercrmck's comments
> 2. Address @asb's comments. Fix negative optimization of 20100416-1.c from the GCC torture suite. No optimization is required when TrueV and FalseV are both constants.
>
> selectcc-to-shiftand.ll has an example already covering this type.

Thanks, that fixes that regression. I also see increased instruction counts for other tests including: pr20100-1, pr25125, pr37102, pr68506, pr83383, pr89634 (O3 <https://reviews.llvm.org/owners/package/3/>, rv64imafdc, lp64d). The overall impact across the suite seems positive, but it's likely worth taking a look.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129757



More information about the llvm-commits mailing list