[llvm] AMDGPU/GlobalISel: Handle G_BITCAST for 16 bit extendedLLTs (PR #208750)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 10 11:57:16 PDT 2026


================
@@ -2704,6 +2711,15 @@ bool AMDGPULegalizerInfo::legalizeAddrSpaceCast(
   return true;
 }
 
+bool AMDGPULegalizerInfo::legalizeBitcast(MachineInstr &MI,
+                                          MachineRegisterInfo &MRI,
+                                          MachineIRBuilder &B) const {
+  B.buildTrunc(MI.getOperand(0).getReg(),
----------------
arsenm wrote:

There's nothing custom about this, this is just widenScalar on the source 

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


More information about the llvm-commits mailing list