[llvm] 2e88688 - [RISCV] Use bits<1> for AltFmt in RISCVVPseudo. (#182581)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 20 14:08:58 PST 2026
Author: Craig Topper
Date: 2026-02-20T14:08:53-08:00
New Revision: 2e88688ba7e048e25143117cd7b1e5697d9cec86
URL: https://github.com/llvm/llvm-project/commit/2e88688ba7e048e25143117cd7b1e5697d9cec86
DIFF: https://github.com/llvm/llvm-project/commit/2e88688ba7e048e25143117cd7b1e5697d9cec86.diff
LOG: [RISCV] Use bits<1> for AltFmt in RISCVVPseudo. (#182581)
This makes the searchable table emitter use uint8_t instead of bool in
the KeyType struct. This is needed to allow us to use a bitfield in the
PseudoInfo struct and avoid a compare between a bool and uint16_t. We
already use this same bits<1> trick in other searchable tables.
Fixes #182485
Added:
Modified:
llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td b/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
index c4f666fc3affe..8ac431bf810b6 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
@@ -564,7 +564,7 @@ class RISCVVPseudo<dag outs, dag ins, list<dag> pattern = [],
Instruction BaseInstr = !cast<Instruction>(PseudoToVInst<NAME>.VInst);
// SEW = 0 is used to denote that the Pseudo is not SEW specific (or unknown).
bits<8> SEW = 0;
- bit IsAltFmt = !eq(AltFmtType.Value, IS_ALTFMT.Value);
+ bits<1> IsAltFmt = !eq(AltFmtType.Value, IS_ALTFMT.Value);
bit IncludeInInversePseudoTable = 1;
let UseNamedOperandTable = true;
More information about the llvm-commits
mailing list