Skip to content

Commit 56dfed9

Browse files
committed
Fix up
1 parent 63c7775 commit 56dfed9

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,18 @@ class CombinerHelper {
115115

116116
public:
117117
CombinerHelper(GISelChangeObserver &Observer, MachineIRBuilder &B,
118-
bool IsPreLegalize, GISelKnownBits *KB = nullptr,
118+
bool IsPreLegalize,
119+
GISelKnownBits *KB = nullptr,
119120
MachineDominatorTree *MDT = nullptr,
120121
const LegalizerInfo *LI = nullptr);
121122

122-
GISelKnownBits *getKnownBits() const { return KB; }
123+
GISelKnownBits *getKnownBits() const {
124+
return KB;
125+
}
123126

124-
MachineIRBuilder &getBuilder() const { return Builder; }
127+
MachineIRBuilder &getBuilder() const {
128+
return Builder;
129+
}
125130

126131
const TargetLowering &getTargetLowering() const;
127132

@@ -145,10 +150,8 @@ class CombinerHelper {
145150
/// is a legal integer constant type on the target.
146151
bool isConstantLegalOrBeforeLegalizer(const LLT Ty) const;
147152

148-
/// MachineRegisterInfo::replaceRegWith() and inform the observer of the
149-
/// changes
150-
void replaceRegWith(MachineRegisterInfo &MRI, Register FromReg,
151-
Register ToReg) const;
153+
/// MachineRegisterInfo::replaceRegWith() and inform the observer of the changes
154+
void replaceRegWith(MachineRegisterInfo &MRI, Register FromReg, Register ToReg) const;
152155

153156
/// Replace a single register operand with a new register and inform the
154157
/// observer of the changes.
@@ -479,12 +482,12 @@ class CombinerHelper {
479482
bool matchEqualDefs(const MachineOperand &MOP1,
480483
const MachineOperand &MOP2) const;
481484

482-
/// Return true if \p MOP is defined by a G_CONSTANT or splat with a value
483-
/// equal to \p C.
485+
/// Return true if \p MOP is defined by a G_CONSTANT or splat with a value equal to
486+
/// \p C.
484487
bool matchConstantOp(const MachineOperand &MOP, int64_t C) const;
485488

486-
/// Return true if \p MOP is defined by a G_FCONSTANT or splat with a value
487-
/// exactly equal to \p C.
489+
/// Return true if \p MOP is defined by a G_FCONSTANT or splat with a value exactly
490+
/// equal to \p C.
488491
bool matchConstantFPOp(const MachineOperand &MOP, double C) const;
489492

490493
/// @brief Checks if constant at \p ConstIdx is larger than \p MI 's bitwidth
@@ -837,7 +840,8 @@ class CombinerHelper {
837840
bool matchRedundantBinOpInEquality(MachineInstr &MI,
838841
BuildFnTy &MatchInfo) const;
839842

840-
/// Match shifts greater or equal to the bitwidth of the operation.
843+
/// Match shifts greater or equal to the range (bitwidth of the operation, or
844+
/// the source value).
841845
bool matchShiftsTooBig(MachineInstr &MI,
842846
std::optional<int64_t> &MatchInfo) const;
843847

llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
#include "llvm/Support/Casting.h"
3636
#include "llvm/Support/DivisionByConstantInfo.h"
3737
#include "llvm/Support/ErrorHandling.h"
38-
#include "llvm/Support/KnownBits.h"
3938
#include "llvm/Support/MathExtras.h"
4039
#include "llvm/Target/TargetMachine.h"
4140
#include <cmath>

0 commit comments

Comments
 (0)