OSDN Git Service

[RISCV] Custom type legalize i32 fshl/fshr on RV64 with Zbt.
authorCraig Topper <craig.topper@sifive.com>
Wed, 25 Nov 2020 17:43:16 +0000 (09:43 -0800)
committerCraig Topper <craig.topper@sifive.com>
Wed, 25 Nov 2020 18:01:47 +0000 (10:01 -0800)
commitc26e8697d71eea5fa08944a2db039a2187abf27c
treecd65312178ab839f953e352fc45202fccc17a7e0
parent227c8ff189c3861c11f6e80c31274c5fa28a2ee9
[RISCV] Custom type legalize i32 fshl/fshr on RV64 with Zbt.

This adds custom opcodes for FSLW/FSRW so we can type legalize
fshl/fshr without needing to match a sign_extend_inreg.

I've used the operand order from fshl/fshr to make the isel
pattern similar to the non-W form. It was also hard to decide
another order since the register instruction has the shift amount
as the second operand, but the immediate instruction has it as
the third operand.

Differential Revision: https://reviews.llvm.org/D91479
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.h
llvm/lib/Target/RISCV/RISCVInstrInfoB.td
llvm/test/CodeGen/RISCV/rv64Zbt.ll