Skip to content

Commit 2fdf196

Browse files
author
Thorsten Schütt
committed
return true;
1 parent 3892315 commit 2fdf196

File tree

3 files changed

+1
-9
lines changed

3 files changed

+1
-9
lines changed

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,6 @@ class CombinerHelper {
150150
/// is a legal integer constant type on the target.
151151
bool isConstantLegalOrBeforeLegalizer(const LLT Ty) const;
152152

153-
/// \return true if the combine is running prior to legalization, or if \p Ty
154-
/// is a legal undef type on the target.
155-
bool isUndefLegalOrBeforeLegalizer(const LLT Ty) const;
156-
157153
/// MachineRegisterInfo::replaceRegWith() and inform the observer of the changes
158154
void replaceRegWith(MachineRegisterInfo &MRI, Register FromReg, Register ToReg) const;
159155

llvm/include/llvm/Target/GlobalISel/Combine.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1861,7 +1861,7 @@ def anyext_undef: GICombineRule<
18611861
(defs root:$root),
18621862
(match (G_IMPLICIT_DEF $undef),
18631863
(G_ANYEXT $root, $undef):$Aext,
1864-
[{ return Helper.isUndefLegalOrBeforeLegalizer(MRI.getType(${Aext}->getOperand(0).getReg())); }]),
1864+
[{ return true; }]),
18651865
(apply [{ Helper.replaceInstWithUndef(*${Aext}); }])>;
18661866

18671867
def zext_undef: GICombineRule<

llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,6 @@ bool CombinerHelper::isConstantLegalOrBeforeLegalizer(const LLT Ty) const {
171171
isLegal({TargetOpcode::G_CONSTANT, {EltTy}});
172172
}
173173

174-
bool CombinerHelper::isUndefLegalOrBeforeLegalizer(const LLT Ty) const {
175-
return isPreLegalize() || isLegal({TargetOpcode::G_IMPLICIT_DEF, {Ty}});
176-
}
177-
178174
void CombinerHelper::replaceRegWith(MachineRegisterInfo &MRI, Register FromReg,
179175
Register ToReg) const {
180176
Observer.changingAllUsesOfReg(MRI, FromReg);

0 commit comments

Comments
 (0)