@@ -115,13 +115,18 @@ class CombinerHelper {
115
115
116
116
public:
117
117
CombinerHelper (GISelChangeObserver &Observer, MachineIRBuilder &B,
118
- bool IsPreLegalize, GISelKnownBits *KB = nullptr ,
118
+ bool IsPreLegalize,
119
+ GISelKnownBits *KB = nullptr ,
119
120
MachineDominatorTree *MDT = nullptr ,
120
121
const LegalizerInfo *LI = nullptr );
121
122
122
- GISelKnownBits *getKnownBits () const { return KB; }
123
+ GISelKnownBits *getKnownBits () const {
124
+ return KB;
125
+ }
123
126
124
- MachineIRBuilder &getBuilder () const { return Builder; }
127
+ MachineIRBuilder &getBuilder () const {
128
+ return Builder;
129
+ }
125
130
126
131
const TargetLowering &getTargetLowering () const ;
127
132
@@ -145,10 +150,8 @@ class CombinerHelper {
145
150
// / is a legal integer constant type on the target.
146
151
bool isConstantLegalOrBeforeLegalizer (const LLT Ty) const ;
147
152
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 ;
152
155
153
156
// / Replace a single register operand with a new register and inform the
154
157
// / observer of the changes.
@@ -479,12 +482,12 @@ class CombinerHelper {
479
482
bool matchEqualDefs (const MachineOperand &MOP1,
480
483
const MachineOperand &MOP2) const ;
481
484
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.
484
487
bool matchConstantOp (const MachineOperand &MOP, int64_t C) const ;
485
488
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.
488
491
bool matchConstantFPOp (const MachineOperand &MOP, double C) const ;
489
492
490
493
// / @brief Checks if constant at \p ConstIdx is larger than \p MI 's bitwidth
@@ -837,7 +840,8 @@ class CombinerHelper {
837
840
bool matchRedundantBinOpInEquality (MachineInstr &MI,
838
841
BuildFnTy &MatchInfo) const ;
839
842
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).
841
845
bool matchShiftsTooBig (MachineInstr &MI,
842
846
std::optional<int64_t > &MatchInfo) const ;
843
847
0 commit comments