[llvm] AMDGPU/GlobalISel: Run redundant_and combine in RegBankCombiner (PR #112353)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 15 06:54:10 PDT 2024


================
@@ -178,7 +178,7 @@ void CombinerHelper::replaceRegWith(MachineRegisterInfo &MRI, Register FromReg,
   if (MRI.constrainRegAttrs(ToReg, FromReg))
     MRI.replaceRegWith(FromReg, ToReg);
   else
-    Builder.buildCopy(ToReg, FromReg);
+    Builder.buildCopy(FromReg, ToReg);
----------------
arsenm wrote:

Looks backwards? Can you precommit this fix with a mir test? 

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


More information about the llvm-commits mailing list