Skip to content

Commit b0bacf7

Browse files
committed
[𝘀𝗽𝗿] initial version
Created using spr 1.3.6-beta.1
2 parents da293b8 + ad3c490 commit b0bacf7

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

llvm/lib/Analysis/TargetTransformInfo.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1476,6 +1476,7 @@ TargetIRAnalysis::TargetIRAnalysis(
14761476

14771477
TargetIRAnalysis::Result TargetIRAnalysis::run(const Function &F,
14781478
FunctionAnalysisManager &) {
1479+
assert(!F.isIntrinsic() && "Should not request TTI for intrinsics");
14791480
return TTICallback(F);
14801481
}
14811482

llvm/lib/Transforms/IPO/LowerTypeTests.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1847,6 +1847,10 @@ LowerTypeTestsModule::LowerTypeTestsModule(
18471847
auto &FAM =
18481848
AM.getResult<FunctionAnalysisManagerModuleProxy>(M).getManager();
18491849
for (Function &F : M) {
1850+
// Skip intrinsics since we should not query the TTI for them.
1851+
// TODO: Can we skip all declarations and only look at definitions?
1852+
if (F.isIntrinsic())
1853+
continue;
18501854
auto &TTI = FAM.getResult<TargetIRAnalysis>(F);
18511855
if (TTI.hasArmWideBranch(false))
18521856
CanUseArmJumpTable = true;

0 commit comments

Comments
 (0)