Add the optimizations we have in the SelectionDAG version.
Known non-negative copies all known bits. Any known one other than
the sign bit makes result non-negative.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
| Time | Test | |
|---|---|---|
| 160 ms | windows > lld.ELF::dependency-file.s |
Event Timeline
| llvm/test/Transforms/InstCombine/abs-intrinsic.ll | ||
|---|---|---|
| 55 | This test folds, so FIXME here is confusing. Do we want a reduced test without the icmp? define i32 @abs_of_zext(i31 %x) {
%zext = zext i31 %x to i32
%abs = call i32 @llvm.abs.i32(i32 %zext, i1 false)
ret i32 %abs
} | |
Comment Actions
Add vector tests. Remove FIXME from test
| llvm/test/Transforms/InstCombine/abs-intrinsic.ll | ||
|---|---|---|
| 55 | I assume this will be covered by your InstSimplify change? | |
Comment Actions
LGTM
| llvm/test/Transforms/InstCombine/abs-intrinsic.ll | ||
|---|---|---|
| 55 | Yes, that will get it. No need to duplicate here. | |
clang-format not found in user's PATH; not linting file.