projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0034197
)
[GlobalISel] Fix buildZExtInReg creating new register.
author
Vang Thao
<Vang.Thao@amd.com>
Tue, 4 May 2021 23:43:07 +0000
(16:43 -0700)
committer
Vang Thao
<Vang.Thao@amd.com>
Wed, 5 May 2021 15:19:52 +0000
(08:19 -0700)
Fix a bug where buildZExtInReg will create and use a new register instead of using the register from parameter DstOp Res.
Reviewed By: arsenm, foad
Differential Revision: https://reviews.llvm.org/D101871
llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
b/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
index
bde442a
..
1f86bfa
100644
(file)
--- a/
llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
+++ b/
llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
@@
-492,7
+492,7
@@
MachineInstrBuilder MachineIRBuilder::buildZExtInReg(const DstOp &Res,
LLT ResTy = Res.getLLTTy(*getMRI());
auto Mask = buildConstant(
ResTy, APInt::getLowBitsSet(ResTy.getScalarSizeInBits(), ImmOp));
- return buildAnd(Res
Ty
, Op, Mask);
+ return buildAnd(Res, Op, Mask);
}
MachineInstrBuilder MachineIRBuilder::buildCast(const DstOp &Dst,