Skip to content

Commit f7b34e7

Browse files
committed
ScalarConstantsAreLegal -> AllowScalarConstants and Rebase
1 parent 5451971 commit f7b34e7

File tree

3 files changed

+365
-529
lines changed

3 files changed

+365
-529
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ class CombinerHelper {
640640
/// This variant does not erase \p MI after calling the build function.
641641
void applyBuildFnNoErase(MachineInstr &MI, BuildFnTy &MatchInfo) const;
642642

643-
bool matchOrShiftToFunnelShift(MachineInstr &MI, bool ScalarConstantsAreLegal,
643+
bool matchOrShiftToFunnelShift(MachineInstr &MI, bool AllowScalarConstants,
644644
BuildFnTy &MatchInfo) const;
645645
bool matchFunnelShiftToRotate(MachineInstr &MI) const;
646646
void applyFunnelShiftToRotate(MachineInstr &MI) const;

llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4425,7 +4425,7 @@ void CombinerHelper::applyBuildFnNoErase(
44254425
}
44264426

44274427
bool CombinerHelper::matchOrShiftToFunnelShift(MachineInstr &MI,
4428-
bool ScalarConstantsAreLegal,
4428+
bool AllowScalarConstants,
44294429
BuildFnTy &MatchInfo) const {
44304430
assert(MI.getOpcode() == TargetOpcode::G_OR);
44314431

@@ -4467,7 +4467,7 @@ bool CombinerHelper::matchOrShiftToFunnelShift(MachineInstr &MI,
44674467

44684468
LLT AmtTy = MRI.getType(Amt);
44694469
if (!isLegalOrBeforeLegalizer({FshOpc, {Ty, AmtTy}}) &&
4470-
(!ScalarConstantsAreLegal || CstShlAmt == 0 || !Ty.isScalar()))
4470+
(!AllowScalarConstants || CstShlAmt == 0 || !Ty.isScalar()))
44714471
return false;
44724472

44734473
MatchInfo = [=](MachineIRBuilder &B) {

0 commit comments

Comments
 (0)