[PATCH] Combine fmul vector FP constants when unsafe math is allowed

Sanjay Patel spatel at rotateright.com
Mon Sep 8 18:09:29 PDT 2014


Hi arsenm,

This is an extension of the change made with r215820:
http://llvm.org/viewvc/llvm-project?view=revision&revision=215820

That patch allowed combining of splatted vector FP constants that are multiplied. 

This patch allows combining non-uniform vector FP constants too by relaxing the check on the type of vector. I've also tried to canonicalize a vector fmul in the same way that we already do for scalars - if only one operand of the fmul is a constant, make it operand 1. Otherwise, we miss potential folds.

http://reviews.llvm.org/D5254

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  test/CodeGen/X86/fmul-combines.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5254.13432.patch
Type: text/x-patch
Size: 3643 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140909/3035e6ac/attachment.bin>


More information about the llvm-commits mailing list