[PATCH] Fix interference caused by fmul 2, x -> fadd x, x combine
Matt Arsenault
Matthew.Arsenault at amd.com
Fri Jul 25 15:56:10 PDT 2014
This solves 2 variants of this problem. First, change the order things are tried so that fmul (fmul x, c1) c2 -> fmul x, (fmul c1, c2) before fadd x, x.
Also add a variant of the fmul constant combine that understands fadd x, x as a multiply by 2. This is necessary because a multiply by 2 that exists originally will be transformed into the fadd by one of the early runs of DAG combiner, and not folded with new fmuls inserted during lowering.
http://reviews.llvm.org/D4678
Files:
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/R600/llvm.sin.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4678.11901.patch
Type: text/x-patch
Size: 5642 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140725/a8dd298f/attachment.bin>
More information about the llvm-commits
mailing list