[PATCH] D26066: [PowerPC] Improvements for BUILD_VECTOR Vol. 4

Ehsan Amiri via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 28 13:46:07 PDT 2016


amehsan added a comment.

> Yeah, when I was implementing some of the https://reviews.llvm.org/P9 instructions that naturally fit the BUILD_VECTOR nodes, I realized that we produce poor code for some patterns. I wanted to see how bad this situation is so I wrote the C test case that is added as a comment to `build-vector-tests.ll` and examined the assembly. Then I picked off the patterns that produce poor code and fixed them one by one.

Some thoughts about this.
(1) How do we know that these pieces of code has any significance? Some are clearly contrived: `(vector unsigned long long) 4.74`. For others I do not think they are going to be common patterns in the user code. It will be more interesting if we know that the compiler is likely to generate a pattern of that kind. How did you make that judgement?

(2) How did you concluded that the fixes that you are making is in the right place. For example, maybe for some of these patterns we need to change something in InstCombine.  Is there an explanation for the approach that you have taken?


Repository:
  rL LLVM

https://reviews.llvm.org/D26066





More information about the llvm-commits mailing list