Recommit "[RISCV] Make the operand order for RISCVISD::FSL(W)/FSR(W) match the instru...
authorCraig Topper <craig.topper@sifive.com>
Tue, 18 Jan 2022 18:46:16 +0000 (10:46 -0800)
committerCraig Topper <craig.topper@sifive.com>
Tue, 18 Jan 2022 18:52:43 +0000 (10:52 -0800)
commitaa7fc02febec17ebc1fd46934ac0c90d31969d5d
tree92199598122d9842da1a23cbe26aab4388c10d41
parentb3a0ec7645dbd2978bd43f372933d1d1cd36f132
Recommit "[RISCV] Make the operand order for RISCVISD::FSL(W)/FSR(W) match the instruction register numbering."

This reverts the revert commit e32838573929ac85fc4df3058593798d10ce4cd2.

Accidental demanded bits change has been removed. The demanded bits
code itself was remove in a pre-commit since it isn't tested.

Original commit message:
Previous we used the fshl/fshr operand ordering for simplicity. This
made things confusing when D117468 proposed adding intrinsics for
the instructions. We can't just use the generic funnel shifting
intrinsics because fsl/fsr have different functionality that should
be exposed to software.

Now we use rs1, rs3, rs2/shamt order which matches the instruction
printing order and the order used in this intrinsic header
https://github.com/riscv/riscv-bitmanip/blob/main-history/cproofs/rvintrin.h
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.h
llvm/lib/Target/RISCV/RISCVInstrInfoZb.td