================
@@ -131,6 +131,40 @@ void RegBankLegalizeHelper::widenLoad(MachineInstr &MI, 
LLT WideTy,
   MI.eraseFromParent();
 }
 
+void RegBankLegalizeHelper::lowerVccExtToSel(MachineInstr &MI) {
+  Register Dst = MI.getOperand(0).getReg();
+  LLT Ty = MRI.getType(Dst);
+  Register Src = MI.getOperand(1).getReg();
+  unsigned Opc = MI.getOpcode();
+  if (Ty == S32 || Ty == S16) {
+    auto True = B.buildConstant({VgprRB, Ty}, Opc == G_SEXT ? -1 : 1);
----------------
Pierre-vh wrote:

The `Opc == G_SEXT ? -1 : 1` can go in a variable and be reused in both cases 
to remove repetitions

https://github.com/llvm/llvm-project/pull/132383
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to