OSDN Git Service

[X86] Replace custom scalar integer absolute matching with ISD::ABS lowering.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 19 Oct 2017 15:02:24 +0000 (15:02 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 19 Oct 2017 15:02:24 +0000 (15:02 +0000)
commit0ecb8857e93beea2b2853241dda8dac1f0219b57
tree152a29a4041df7f272ae2091fbb015bd7a7ab1b0
parenta9278fb1d87893bc2dfc0ac87ddb4daf47052dda
[X86] Replace custom scalar integer absolute matching with ISD::ABS lowering.

x86 has its own copy of integer absolute pattern matching to combine directly to a SUB+CMOV.

This patch removes the x86 combine and adds custom lowering support for ISD::ABS instead, allowing us to use the DAGCombiner version.

Additional test cases are already covered by iabs.ll (rL315706 and rL315711).

Differential Revision: https://reviews.llvm.org/D38895

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316162 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/combine-abs.ll