Skip to content

Commit 11a2144

Browse files
committed
[NFC][X86][ISel] Remove the unused assert
The condition of assert is always true, so just remove it. OptForMinSize means hasMinSize(), which is hasFnAttribute(Attribute::MinSize). hasOptSize() is hasFnAttribute(Attribute::OptimizeForSize) || hasMinSize(). So, '!hasMinSize() || hasFnAttribute(Attribute::OptimizeForSize) || hasMinSize()' is awalys true.
1 parent f6417f1 commit 11a2144

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

llvm/lib/Target/X86/X86ISelDAGToDAG.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,6 @@ namespace {
184184

185185
// OptFor[Min]Size are used in pattern predicates that isel is matching.
186186
OptForMinSize = MF.getFunction().hasMinSize();
187-
assert((!OptForMinSize || MF.getFunction().hasOptSize()) &&
188-
"OptForMinSize implies OptForSize");
189187
return SelectionDAGISel::runOnMachineFunction(MF);
190188
}
191189

0 commit comments

Comments
 (0)