[all-commits] [llvm/llvm-project] 62e608: [RISCV] Implement shouldTransformSignedTruncationC...
Craig Topper via All-commits
all-commits at lists.llvm.org
Mon May 8 09:53:09 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 62e6082dcc7a7ce22fb98f9a0fd98a0385001437
https://github.com/llvm/llvm-project/commit/62e6082dcc7a7ce22fb98f9a0fd98a0385001437
Author: Craig Topper <craig.topper at sifive.com>
Date: 2023-05-08 (Mon, 08 May 2023)
Changed paths:
M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
M llvm/lib/Target/RISCV/RISCVISelLowering.h
M llvm/test/CodeGen/RISCV/lack-of-signed-truncation-check.ll
M llvm/test/CodeGen/RISCV/signed-truncation-check.ll
Log Message:
-----------
[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
More information about the All-commits
mailing list