DAGCombiner: Allow the DAGCombiner to combine multiple FDIVs with the same divisor...
authorHao Liu <Hao.Liu@arm.com>
Fri, 21 Nov 2014 06:39:58 +0000 (06:39 +0000)
committerHao Liu <Hao.Liu@arm.com>
Fri, 21 Nov 2014 06:39:58 +0000 (06:39 +0000)
commit09ad94decbd23c28378b529a76cbf1950e064111
tree4494cb647c60449d35bc58929b32737da2100823
parente0ed7df6b001194dcef431792bfeb0dc4d969756
DAGCombiner: Allow the DAGCombiner to combine multiple FDIVs with the same divisor info FMULs by the reciprocal.
E.g., ( a / D; b / D ) -> ( recip = 1.0 / D; a * recip; b * recip)

A hook is added to allow the target to control whether it needs to do such combine.

Reviewed in http://reviews.llvm.org/D6334

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222510 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/Target/AArch64/AArch64ISelLowering.cpp
lib/Target/AArch64/AArch64ISelLowering.h
test/CodeGen/AArch64/fdiv-combine.ll [new file with mode: 0644]