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

Sanjay Patel spatel at rotateright.com
Wed Sep 10 15:49:02 PDT 2014


I'm now wondering if this patch is necessary. I'd rather not bloat up DAGCombiner any more if there's no reason to.

The constant reassociations in all 3 of the test cases that I created here are already done by -instcombine if 'fast' is specified on each fmul inst. And in http://reviews.llvm.org/D5222, I've said that 'fast' will be specified for any function produced by clang with -ffast-math.

Matt, what was the motivation for r215820? Is there some scenario you were seeing where we can't do these folds in -instcombine?

http://reviews.llvm.org/D5254






More information about the llvm-commits mailing list