[llvm] 17f0aaa - [TTI] Assert that TargetIRAnalyis is not requested for intrinsics
    via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Mar  4 08:50:41 PST 2025
    
    
  
Author: Alexander Richardson
Date: 2025-03-04T08:50:38-08:00
New Revision: 17f0aaac57d006cb1aef09be8eaf2bbdd6f5d0b6
URL: https://github.com/llvm/llvm-project/commit/17f0aaac57d006cb1aef09be8eaf2bbdd6f5d0b6
DIFF: https://github.com/llvm/llvm-project/commit/17f0aaac57d006cb1aef09be8eaf2bbdd6f5d0b6.diff
LOG: [TTI] Assert that TargetIRAnalyis is not requested for intrinsics
This catches the bug fixed in https://github.com/llvm/llvm-project/pull/127760
and also finds another call in LowerTypeTests where we request the TTI
for instrinsics instead of skipping them.
Reviewed By: nikic
Pull Request: https://github.com/llvm/llvm-project/pull/129600
Added: 
    
Modified: 
    llvm/lib/Analysis/TargetTransformInfo.cpp
Removed: 
    
################################################################################
diff  --git a/llvm/lib/Analysis/TargetTransformInfo.cpp b/llvm/lib/Analysis/TargetTransformInfo.cpp
index 1c54395909f10..067b3ec10fc7a 100644
--- a/llvm/lib/Analysis/TargetTransformInfo.cpp
+++ b/llvm/lib/Analysis/TargetTransformInfo.cpp
@@ -1476,6 +1476,7 @@ TargetIRAnalysis::TargetIRAnalysis(
 
 TargetIRAnalysis::Result TargetIRAnalysis::run(const Function &F,
                                                FunctionAnalysisManager &) {
+  assert(!F.isIntrinsic() && "Should not request TTI for intrinsics");
   return TTICallback(F);
 }
 
        
    
    
More information about the llvm-commits
mailing list