[llvm] SystemZ: Implement copyPhysReg between vr128 and gr128 (PR #90616)

Ulrich Weigand via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 09:46:23 PDT 2024


================
@@ -840,6 +840,41 @@ void SystemZInstrInfo::copyPhysReg(MachineBasicBlock &MBB,
     return;
   }
 
+  if (SystemZ::GR128BitRegClass.contains(DestReg) &&
+      SystemZ::VR128BitRegClass.contains(SrcReg)) {
+    MCRegister DestH64 = RI.getSubReg(DestReg, SystemZ::subreg_h64);
+    MCRegister DestL64 = RI.getSubReg(DestReg, SystemZ::subreg_l64);
+
+    BuildMI(MBB, MBBI, DL, get(SystemZ::VLGVG), DestL64)
----------------
uweigand wrote:

This should be DestH64 (vector element order on SystemZ is big-endian, so the high part of an i128 in a VR is in the 64-bit element number 0, and the low part is in element number 1).

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


More information about the llvm-commits mailing list