abs() should be rare enough that using value tracking is not going to be a compile-time cost burden, so use it to reduce a variety of potential patterns. We do this in DAGCombiner too.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Yes, we should be fine compile-time wise. The icmp + select representation of abs implicitly did this as well, because we fold comparisons against zero more aggressively than others.
llvm/lib/Analysis/InstructionSimplify.cpp | ||
---|---|---|
5260 | We should also pass through Q.AC, Q.CxtI, Q.DT. |
Comment Actions
Patch updated:
Pass in more info from the SimplifyQuery to ValueTracking.
Not sure what it takes to show the benefit, so no test diffs, but if there are suggestions, let me know.