[llvm] [RISCV] Split TuneShiftedZExtFusion (PR #76032)
Wang Pengcheng via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 21 22:34:50 PST 2023
================
@@ -58,27 +58,74 @@ static bool isLDADD(const MachineInstr *FirstMI, const MachineInstr &SecondMI) {
return checkRegisters(FirstMI->getOperand(0).getReg(), SecondMI);
}
-// Fuse these patterns:
-//
-// slli rd, rs1, 32
-// srli rd, rd, x
-// where 0 <= x <= 32
-//
-// and
-//
+// Fuse zero extension of halfword:
// slli rd, rs1, 48
+// srli rd, rd, 48
+static bool isZExtH(const MachineInstr *FirstMI, const MachineInstr &SecondMI) {
+ if (SecondMI.getOpcode() != RISCV::SRLI)
----------------
wangpc-pp wrote:
Can I just leave it just like this? This whole file will be removed in https://github.com/llvm/llvm-project/pull/72224.
https://github.com/llvm/llvm-project/pull/76032
More information about the llvm-commits
mailing list