From 91becca5601284483874b2508fdf3d1accf6a0b2 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 9 Jul 2025 12:43:28 -0700 Subject: [PATCH] [RISCV] Remove BREV8 and ORC_B from hasAllNBitUsers in RISCVOptWInstrs. These instructions operate on bytes so we need to round the demanded bits up to the nearest byte which we aren't doing. I think we forgot to update this when we changed from hasAllWUsers to hasNBitUsers. We don't have any test case for these instruction so remove them until we can put together a test. --- llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp b/llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp index ed61236415ccf..24c05a2f807d0 100644 --- a/llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp +++ b/llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp @@ -311,9 +311,7 @@ static bool hasAllNBitUsers(const MachineInstr &OrigMI, case RISCV::XORI: case RISCV::ANDN: - case RISCV::BREV8: case RISCV::CLMUL: - case RISCV::ORC_B: case RISCV::ORN: case RISCV::SH1ADD: case RISCV::SH2ADD: