[all-commits] [llvm/llvm-project] d67d91: [RISCV] Fix issues in ORI to QC.INSBI transformati...
Sudharsan Veeravalli via All-commits
all-commits at lists.llvm.org
Tue Jul 15 12:01:54 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d67d91a9906366585162cebf292f923a3f28c8a6
https://github.com/llvm/llvm-project/commit/d67d91a9906366585162cebf292f923a3f28c8a6
Author: Sudharsan Veeravalli <quic_svs at quicinc.com>
Date: 2025-07-15 (Tue, 15 Jul 2025)
Changed paths:
M llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
M llvm/lib/Target/RISCV/RISCVInstrInfoXqci.td
M llvm/test/CodeGen/RISCV/xqcibm-cto-clo-brev.ll
M llvm/test/CodeGen/RISCV/xqcibm-insert.ll
Log Message:
-----------
[RISCV] Fix issues in ORI to QC.INSBI transformation (#148809)
The transformation done in #147349 was incorrect since we were not
passing the input node of the `OR` instruction to the `QC.INSBI`
instruction leading to the generated instruction doing the wrong thing.
In order to do this we first needed to add the output register to
`QC.INSBI` as being both an input and output.
The code produced after the above fix will need a copy (mv) to preserve
the register input to the OR instruction if it has more than one use
making the transformation net neutral ( `6-byte QC.E.ORI/ORAI` vs
`2-byte C.MV + 4-byte QC.INSB`I). Avoid doing the transformation if
there is more than one use of the input register to the OR instruction.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list