Craig Topper
2d6042937b
[SelectionDAGBuilder] Add SPF_NABS support to visitSelect
...
We currently don't match this which limits the effectiveness of D91120 until
InstCombine starts canonicalizing to llvm.abs. This should be easy to remove
if/when we remove the SPF_ABS handling.
Differential Revision: https://reviews.llvm.org/D92118
2020-11-25 14:54:26 -08:00
Craig Topper
5654a3dd0a
[RISCV] Add test cases showing that we don't recognize the select form of NABS in SelectionDAGBuilder so we end up with branches. NFC
...
There's a FIXME that it should produce (sub 0, (abs)).
2020-11-25 10:45:39 -08:00
Kai Luo
5931be60b5
[DAGCombine][PowerPC] Convert negated abs to trivial arithmetic ops
...
This patch converts `0 - abs(x)` to `Y = sra (X, size(X)-1); sub (Y, xor (X, Y))` for better codegen.
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D91120
2020-11-24 09:43:35 +00:00
Simon Pilgrim
9374e7b178
[RISCV] Extend 32-bit test coverage of neg-abs tests for D91120
2020-11-19 13:59:18 +00:00
Kai Luo
5f0ae23e71
[X86][AArch64][RISCV] Pre-commit negated abs test case. NFC.
2020-11-19 02:31:45 +00:00