Skip to content

Commit 3d864c4

Browse files
authored
[LowerTypeTests] Skip declarations when determining Thumb support
When looping over all functions in a module to determine whether any of them is built with support for B.W, we can skip declarations since those do not have an associated target-feature attribute. This was found by the assertion from #129600 Reviewed By: statham-arm Pull Request: #129599
1 parent 03677f6 commit 3d864c4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/Transforms/IPO/LowerTypeTests.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1847,6 +1847,9 @@ LowerTypeTestsModule::LowerTypeTestsModule(
18471847
auto &FAM =
18481848
AM.getResult<FunctionAnalysisManagerModuleProxy>(M).getManager();
18491849
for (Function &F : M) {
1850+
// Skip declarations since we should not query the TTI for them.
1851+
if (F.isDeclaration())
1852+
continue;
18501853
auto &TTI = FAM.getResult<TargetIRAnalysis>(F);
18511854
if (TTI.hasArmWideBranch(false))
18521855
CanUseArmJumpTable = true;

0 commit comments

Comments
 (0)