aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/IRObjectFile.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2022-02-06 10:44:05 -0800
committerCraig Topper <craig.topper@sifive.com>2022-02-06 10:58:12 -0800
commitc35ccd2ac852bec22c5eafb65bf0e9adb1451df0 (patch)
tree109c99b1a76e639a327af2a008b87c52a5e117a3 /llvm/lib/Object/IRObjectFile.cpp
parenteb65f971f2aa55526c5a58e40261f2a9add9d1ae (diff)
downloadllvm-c35ccd2ac852bec22c5eafb65bf0e9adb1451df0.zip
llvm-c35ccd2ac852bec22c5eafb65bf0e9adb1451df0.tar.gz
llvm-c35ccd2ac852bec22c5eafb65bf0e9adb1451df0.tar.bz2
[DAGCombiner][RISCV] Allow rotates by non-constant to be matched for i32 on riscv64 with Zbb.
rv64izbb has a RORW/ROLW instructions that operate on the lower 32-bits of a 64-bit value and sign extend bit 31 of the result. DAGCombiner won't match rotate idioms because the i32 type isn't Legal on riscv64. This patch teaches DAGCombiner to allow it if the type is going to be promoted and the target has Custom type legalization for ISD::ROTL or ISD::ROTR. I've restricted this to scalar types. It doesn't appear any in tree targets other than riscv64 have custom type legalization for rotates. If this patch isn't acceptable, I guess I can match SRLW, SLLW, and OR after type legalization, but I'd like to avoid that if possible. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D119062
Diffstat (limited to 'llvm/lib/Object/IRObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions