[PATCH] D37451: [x86] enable storeOfVectorConstantIsCheap() target hook

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 7 12:05:14 PDT 2017


spatel added a comment.

In https://reviews.llvm.org/D37451#863708, @spatel wrote:

> big_nonzero_16_bytes() for x86-64 shows a different merging problem. We can't directly store 64-bit immediates, so we have to materialize the constants in registers and then store as a separate instruction. The test is trying to store four 32-bit imms, so we probably shouldn't have done any merging there?


On 2nd thought, that doesn't make sense. We probably should merge that case, but the hook doesn't allow us to distinguish constant values. So we don't know when an immediate can be placed directly in the store or not.

I think it's ok to only handle the larger cases in this patch and make that potential enhancement a follow-up. Fixing that might also solve the scalar imm to vector to memory bug.


https://reviews.llvm.org/D37451





More information about the llvm-commits mailing list