Similar to D87168, but for abs. If we have a dominating x >= 0 condition, then we know that abs(x) is x. This fold is in InstCombine, because we need to create a sub instruction for the x < 0 case.
Details
Details
Diff Detail
Diff Detail
Paths
| Differential D87184
[InstCombine] Fold abs with dominating condition ClosedPublic Authored by nikic on Sep 5 2020, 2:12 AM.
Details Summary Similar to D87168, but for abs. If we have a dominating x >= 0 condition, then we know that abs(x) is x. This fold is in InstCombine, because we need to create a sub instruction for the x < 0 case.
Diff Detail Event TimelineThis revision is now accepted and ready to land.Sep 5 2020, 6:11 AM Closed by commit rG4892d3a1983b: [InstCombine] Fold abs with dominating condition (authored by nikic). · Explain WhySep 5 2020, 7:19 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 290076 llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/test/Transforms/InstCombine/abs-intrinsic.ll
|