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

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 30 04:00:53 PST 2018


jonpa marked 3 inline comments as done.
jonpa added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/TargetLowering.cpp:3466
+                        ST->getAlignment(), ST->getMemOperand()->getFlags(),
+                        ST->getAAInfo());
+  }
----------------
uabelho wrote:
> 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?
sorry for delay (vacation). Yes, I will propose a patch soon.


https://reviews.llvm.org/D42100





More information about the llvm-commits mailing list