[PATCH] D4583: don't transform splats of vector FP (PR20358)

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 21 13:36:59 PST 2015


spatel added a comment.

In http://reviews.llvm.org/D4583#294622, @aschwaighofer wrote:

> This might penalize programs that don't traffic in denormals (most programs as I understand it). Did you measure the performance impact?


I agree with the rarity of denormals assessment. Although I would alter it slightly to "most programs don't think they traffic in denormals." Every once in a while, you run into a performance or profile mystery that seems inexplicable until you discover that some op has dipped into denorm territory. It's hard enough to spot that when the program actually causes it. If the compiler is introducing the denormal hit, that's a debugging problem I don't think anyone ever wants to see.

So yes, there is a potential perf loss: we're not eliminating one splat instruction with this patch. I view this as a small price to pay for not introducing performance unpredictability into a program. That said, I don't see any perf differences using test-suite on x86-64 with this change.

> Did the bug report originate from a real program where this is an issue?


No. But I hope I never see that real program. :)

Also, I don't know what denorm penalties look like outside of x86 and some old PPC chips. If there are targets where denorm ops are free/cheap, that would be a good argument to make this target-specific.


http://reviews.llvm.org/D4583





More information about the llvm-commits mailing list