Split the estimate() interface into separate functions for each type. NFC.
authorSanjay Patel <spatel@rotateright.com>
Tue, 30 Sep 2014 20:28:48 +0000 (20:28 +0000)
committerSanjay Patel <spatel@rotateright.com>
Tue, 30 Sep 2014 20:28:48 +0000 (20:28 +0000)
commitcafc85bf1ed5a70351c8040ad7c6be32cab712f2
tree9f9d9624cfc544758ae7b49c814e3eaf36b21a5c
parent9952c922c2b5cf27fc75a148902c8ac0042b8bb2
Split the estimate() interface into separate functions for each type. NFC.

It was hacky to use an opcode as a switch because it won't always match
(rsqrte != sqrte), and it looks like we'll need to add more special casing
per arch than I had hoped for. Eg, x86 will prefer a different NR estimate
implementation. ARM will want to use it's 'step' instructions. There also
don't appear to be any new estimate instructions in any arch in a long,
long time. Altivec vloge and vexpte may have been the first and last in
that field...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218698 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/PowerPC/PPCISelLowering.h