[RISCV] Implement shouldTransformSignedTruncationCheck.
This helps avoid constant materialization for the patterns InstCombine emits for something like INT_MIN <= X && x <= INT_MAX. See top of changed test files for more detailed explanation. I've enabled this for i16 when Zbb is enabled. sext.b did not seem to be a benefit due to the constants folding into addi/sltiu. This an alternative to https://reviews.llvm.org/D149814 Reviewed By: reames Differential Revision: https://reviews.llvm.org/D149977
Loading
Please sign in to comment