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

Sanjay Patel spatel at rotateright.com
Tue Sep 9 14:16:15 PDT 2014


Thanks very much for the prompt review, Andrea!

I agree with both of your comments. Please see the updated patch which:
1. Confirms that a build vector is a constant before canonicalizing.
2. Removes the hasOneUse() restriction on the fold.
3. Adds a minimal test case for the multiple use scenario; it has the same number of fmuls, but we can confirm that the optimization occurs by checking the constant pool values.

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.13497.patch
Type: text/x-patch
Size: 4022 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140909/fc598893/attachment.bin>


More information about the llvm-commits mailing list