[llvm] SystemZ: Fold copy of vector immediate to gr128 (PR #90706)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri May 3 01:19:28 PDT 2024
================
@@ -640,6 +640,48 @@ bool SystemZInstrInfo::foldImmediate(MachineInstr &UseMI, MachineInstr &DefMI,
Register Reg,
MachineRegisterInfo *MRI) const {
unsigned DefOpc = DefMI.getOpcode();
+
+ if (DefOpc == SystemZ::VGBM) {
+ // Fold gr128 = COPY (vr128 VGBM imm)
+ //
+ // %tmp:gr64 = LGHI 0
+ // to gr128 = REG_SEQUENCE %tmp, %tmp
----------------
arsenm wrote:
Changed to only handle 0. Generalizing this is left as an exercise for whoever wants to pick up https://github.com/arsenm/llvm-project/tree/systemz-legal-v2i64
https://github.com/llvm/llvm-project/pull/90706
More information about the llvm-commits
mailing list