llvm-project
b71c9a43 - [RISCV] Fix issues in ORI to QC.INSBI transformation (#148809)

Commit
115 days ago
[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. (cherry picked from commit d67d91a9906366585162cebf292f923a3f28c8a6)
Author
Committer
tru tru
Parents
Loading