Skip to content

Commit c6c4b3e

Browse files
committed
fix comments
1 parent 2e587f5 commit c6c4b3e

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4288,8 +4288,7 @@ enum srcStatus {
42884288
IS_LOWER_HALF,
42894289
IS_NEG,
42904290
IS_UPPER_HALF_NEG,
4291-
IS_LOWER_HALF_NEG,
4292-
INVALID
4291+
IS_LOWER_HALF_NEG
42934292
};
42944293

42954294
static bool isTruncHalf(const MachineInstr *MI,
@@ -4334,9 +4333,6 @@ static bool isShlHalf(const MachineInstr *MI, const MachineRegisterInfo &MRI) {
43344333

43354334
static bool retOpStat(const MachineOperand *Op, srcStatus stat,
43364335
std::pair<const MachineOperand *, srcStatus> &curr) {
4337-
if (stat == INVALID) {
4338-
return false;
4339-
}
43404336
if ((Op->isReg() && !(Op->getReg().isPhysical())) || Op->isImm() ||
43414337
Op->isCImm() || Op->isFPImm()) {
43424338
curr = {Op, stat};
@@ -4360,7 +4356,7 @@ srcStatus getNegStatus(srcStatus S) {
43604356
case IS_LOWER_HALF_NEG:
43614357
return IS_LOWER_HALF;
43624358
}
4363-
return INVALID;
4359+
llvm_unreachable("unexpected srcStatus");
43644360
}
43654361

43664362
static bool calcNextStatus(std::pair<const MachineOperand *, srcStatus> &curr,
@@ -4477,7 +4473,7 @@ static bool isSameOperand(const MachineOperand *Op1,
44774473
return Op1->isIdenticalTo(*Op2);
44784474
}
44794475

4480-
static bool validToPack(int HiStat, int LoStat, unsigned int &Mods,
4476+
static bool validToPack(srcStatus HiStat, srcStatus LoStat, unsigned int &Mods,
44814477
const MachineOperand *newOp,
44824478
const MachineOperand *RootOp, const SIInstrInfo &TII,
44834479
const MachineRegisterInfo &MRI) {

llvm/test/lit.cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ def have_cxx_shared_library():
466466
print("could not exec llvm-readobj")
467467
return False
468468

469-
readobj_out = readobj_cmd.stdout.read().decode("utf-8")
469+
readobj_out = readobj_cmd.stdout.read().decode("ascii")
470470
readobj_cmd.wait()
471471

472472
regex = re.compile(r"(libc\+\+|libstdc\+\+|msvcp).*\.(so|dylib|dll)")

0 commit comments

Comments
 (0)