-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LLVM16] [LITS] Adjustment of getInstructionCost, so its calculation…
…s are consistent with getUserCost Porting IGC code to LLVM16 Refactor and adjustment of getUserCost (LLVM 14) and getInstructionCost (LLVM16), so their calculations use the same algorithm. This fixes SimplifyCFG passes for expensive_math_intrinsics LITs Because without those adjustments the instruction cost of "declare float @llvm.sqrt.f32(float) #0" was 1 instead of 4. This caused `if (Cost > Budget ...)` check in `dominatesMergePoint` method to behave differently, thus different transformations were applied. This commit originally introduced the "extra cost" for cos/sin/sqrt instructions. a7bc5c8 Fixes: SimplifyCFG/expensive_math_intrinsics-typed-pointers.ll SimplifyCFG/expensive_math_intrinsics.ll
- Loading branch information
Showing
2 changed files
with
50 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters