Skip to content

Commit

Permalink
removed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tschuett committed Aug 3, 2024
1 parent 3dbd3c2 commit 490ef26
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7443,12 +7443,10 @@ bool CombinerHelper::matchFoldAPlusC1MinusC2(const MachineInstr &MI,
if (!MRI.hasOneNonDBGUse(Add->getReg(0)))
return false;

// Cannot fail due to pattern.
std::optional<APInt> MaybeC2 = getIConstantVRegVal(Sub->getRHSReg(), MRI);
if (!MaybeC2)
return false;

// Cannot fail due to pattern.
std::optional<APInt> MaybeC1 = getIConstantVRegVal(Add->getRHSReg(), MRI);
if (!MaybeC1)
return false;
Expand All @@ -7473,12 +7471,10 @@ bool CombinerHelper::matchFoldC2MinusAPlusC1(const MachineInstr &MI,
if (!MRI.hasOneNonDBGUse(Add->getReg(0)))
return false;

// Cannot fail due to pattern.
std::optional<APInt> MaybeC2 = getIConstantVRegVal(Sub->getLHSReg(), MRI);
if (!MaybeC2)
return false;

// Cannot fail due to pattern.
std::optional<APInt> MaybeC1 = getIConstantVRegVal(Add->getRHSReg(), MRI);
if (!MaybeC1)
return false;
Expand All @@ -7503,12 +7499,10 @@ bool CombinerHelper::matchFoldAMinusC1MinusC2(const MachineInstr &MI,
if (!MRI.hasOneNonDBGUse(Sub2->getReg(0)))
return false;

// Cannot fail due to pattern.
std::optional<APInt> MaybeC2 = getIConstantVRegVal(Sub1->getRHSReg(), MRI);
if (!MaybeC2)
return false;

// Cannot fail due to pattern.
std::optional<APInt> MaybeC1 = getIConstantVRegVal(Sub2->getRHSReg(), MRI);
if (!MaybeC1)
return false;
Expand All @@ -7533,12 +7527,10 @@ bool CombinerHelper::matchFoldC1Minus2MinusC2(const MachineInstr &MI,
if (!MRI.hasOneNonDBGUse(Sub2->getReg(0)))
return false;

// Cannot fail due to pattern.
std::optional<APInt> MaybeC2 = getIConstantVRegVal(Sub1->getRHSReg(), MRI);
if (!MaybeC2)
return false;

// Cannot fail due to pattern.
std::optional<APInt> MaybeC1 = getIConstantVRegVal(Sub2->getLHSReg(), MRI);
if (!MaybeC1)
return false;
Expand All @@ -7563,12 +7555,10 @@ bool CombinerHelper::matchFoldAMinusC2PlusC2(const MachineInstr &MI,
if (!MRI.hasOneNonDBGUse(Sub->getReg(0)))
return false;

// Cannot fail due to pattern.
std::optional<APInt> MaybeC2 = getIConstantVRegVal(Add->getRHSReg(), MRI);
if (!MaybeC2)
return false;

// Cannot fail due to pattern.
std::optional<APInt> MaybeC1 = getIConstantVRegVal(Sub->getRHSReg(), MRI);
if (!MaybeC1)
return false;
Expand Down

0 comments on commit 490ef26

Please sign in to comment.