[PATCH] D42100: Fix codegen of stores of vectors with non byte-sized elements.

Mikael Holmén via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 05:46:36 PST 2018


uabelho added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/TargetLowering.cpp:3466
+                        ST->getAlignment(), ST->getMemOperand()->getFlags(),
+                        ST->getAAInfo());
+  }
----------------
efriedma wrote:
> I just realized there's a problem here.  I guess I've spent too much time on little-endian targets.
> 
> Specifically, the problem is that this code will store the elements in the wrong order on big-endian targets.  This will lead to inconsistent, and generally messy, results.
> 
> I think you can solve this by reversing the loop on big-endian targets, so high element of the vector is in the low bits of the integer.
So we have a bug for big-endian targets on trunk now?

Will you deal with this Jonas?


https://reviews.llvm.org/D42100





More information about the llvm-commits mailing list