Issue |
90929
|
Summary |
[Inline] Improving `getExpectedNumberOfCompare` for scenarios with no default branch.
|
Labels |
llvm:optimizations
|
Assignees |
|
Reporter |
DianQK
|
The compare instruction count should be less than the branch count when default branch is undefined: https://llvm.godbolt.org/z/x6ETdfY79.
Related code:
https://github.com/llvm/llvm-project/blob/fd3e7e3a1e661482f46cd0347d0fa62adef30177/llvm/lib/Analysis/InlineCost.cpp#L524-L541
Perhaps we can do these things:
1. Reduce one comparison for the default branch that is undefined.
2. The number of comparison instructions can be linear or even fewer.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs