[PATCH] D101871: [GlobalISel] Fix buildZExtInReg creating new register.

Vang Thao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 5 08:22:44 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGa3d273c9ff4c: [GlobalISel] Fix buildZExtInReg creating new register. (authored by vangthao).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101871/new/

https://reviews.llvm.org/D101871

Files:
  llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp


Index: llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
===================================================================
--- llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
+++ llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
@@ -492,7 +492,7 @@
   LLT ResTy = Res.getLLTTy(*getMRI());
   auto Mask = buildConstant(
       ResTy, APInt::getLowBitsSet(ResTy.getScalarSizeInBits(), ImmOp));
-  return buildAnd(ResTy, Op, Mask);
+  return buildAnd(Res, Op, Mask);
 }
 
 MachineInstrBuilder MachineIRBuilder::buildCast(const DstOp &Dst,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101871.343057.patch
Type: text/x-patch
Size: 537 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210505/364b3b30/attachment.bin>


More information about the llvm-commits mailing list