[llvm] r308655 - Use LaneBitmask::getLane in a few more places
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 20 12:15:57 PDT 2017
Author: kparzysz
Date: Thu Jul 20 12:15:56 2017
New Revision: 308655
URL: http://llvm.org/viewvc/llvm-project?rev=308655&view=rev
Log:
Use LaneBitmask::getLane in a few more places
Modified:
llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp
llvm/trunk/lib/Target/AMDGPU/GCNRegPressure.cpp
Modified: llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp?rev=308655&r1=308654&r2=308655&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp Thu Jul 20 12:15:56 2017
@@ -2239,7 +2239,7 @@ JoinVals::analyzeValue(unsigned ValNo, J
const MachineInstr *DefMI = nullptr;
if (VNI->isPHIDef()) {
// Conservatively assume that all lanes in a PHI are valid.
- LaneBitmask Lanes = SubRangeJoin ? LaneBitmask(1)
+ LaneBitmask Lanes = SubRangeJoin ? LaneBitmask::getLane(0)
: TRI->getSubRegIndexLaneMask(SubIdx);
V.ValidLanes = V.WriteLanes = Lanes;
} else {
@@ -2247,7 +2247,7 @@ JoinVals::analyzeValue(unsigned ValNo, J
assert(DefMI != nullptr);
if (SubRangeJoin) {
// We don't care about the lanes when joining subregister ranges.
- V.WriteLanes = V.ValidLanes = LaneBitmask(1);
+ V.WriteLanes = V.ValidLanes = LaneBitmask::getLane(0);
if (DefMI->isImplicitDef()) {
V.ValidLanes = LaneBitmask::getNone();
V.ErasableImplicitDef = true;
Modified: llvm/trunk/lib/Target/AMDGPU/GCNRegPressure.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/GCNRegPressure.cpp?rev=308655&r1=308654&r2=308655&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/GCNRegPressure.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/GCNRegPressure.cpp Thu Jul 20 12:15:56 2017
@@ -201,7 +201,7 @@ static LaneBitmask getUsedRegMask(const
return MRI.getTargetRegisterInfo()->getSubRegIndexLaneMask(SubReg);
auto MaxMask = MRI.getMaxLaneMaskForVReg(MO.getReg());
- if (MaxMask.getAsInteger() == 1) // cannot have subregs
+ if (MaxMask == LaneBitmask::getLane(0)) // cannot have subregs
return MaxMask;
// For a tentative schedule LIS isn't updated yet but livemask should remain
More information about the llvm-commits
mailing list