Commit Graph

2 Commits

Author SHA1 Message Date
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
Kai Luo 5f0ae23e71 [X86][AArch64][RISCV] Pre-commit negated abs test case. NFC. 2020-11-19 02:31:45 +00:00