[llvm] [LoongArch] Adds support for vectors in OptWInstrs (PR #118935)

via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 13 07:42:00 PST 2024


================
@@ -167,18 +166,45 @@ static bool hasAllNBitUsers(const MachineInstr &OrigMI,
       case LoongArch::MOVGR2FCSR:
       case LoongArch::MOVGR2FRH_W:
       case LoongArch::MOVGR2FR_W_64:
+      case LoongArch::VINSGR2VR_W:
----------------
heiher wrote:

I've added test cases for the `vreplgr2vr.w` instruction. For vector instructions, effective optimizations often arise in cases involving complex multi-level data flow relationships.  I plan to add more test cases in the future if I identify opportunities for further simplification.

https://github.com/llvm/llvm-project/pull/118935


More information about the llvm-commits mailing list