[llvm] [X86][GISel] Fix crash on bitcasting i16 <-> half with gisel enabled. (PR #168456)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 18 11:59:17 PST 2025


================
@@ -4366,6 +4367,30 @@ void X86InstrInfo::copyPhysReg(MachineBasicBlock &MBB,
   else if (X86::VK16RegClass.contains(DestReg, SrcReg))
     Opc = Subtarget.hasBWI() ? (HasEGPR ? X86::KMOVQkk_EVEX : X86::KMOVQkk)
                              : (HasEGPR ? X86::KMOVQkk_EVEX : X86::KMOVWkk);
+
+  else if (X86::GR16RegClass.contains(DestReg) &&
----------------
arsenm wrote:

A globalisel patch probably shouldn't need to touch this low level copyPhysReg stuff? 

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


More information about the llvm-commits mailing list