[PATCH] D30216: GlobalISel: Translate ConstantDataVector
Daniel Sanders via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 1 01:45:58 PST 2017
dsanders added inline comments.
================
Comment at: lib/CodeGen/GlobalISel/IRTranslator.cpp:988
+ Ops.push_back(getOrCreateVReg(Elt));
+ Indices.push_back(i * (CV->getElementByteSize() * 8));
+ }
----------------
kristof.beyls wrote:
> dsanders wrote:
> > ab wrote:
> > > This isn't always a valid assumption; we can have things like v16i1.
> > >
> > > Make this size in bits instead?
> > This looks correct for ARM/AArch64/Mips, but I'm not sure this is correct for all targets. I'm thinking of big-endian targets where the highest-numbered element is stored at bit 0 (PowerPC?).
> If this is not correct for some targets, there should at list be a FIXME here explaining in what circumstances the code isn't correct?
> This isn't always a valid assumption; we can have things like v16i1.
v16i1 can't occur here. ConstantDataVector handles the common case vectors where the elements are i8/i16/i32/i64/half/float/double. The v16i1 case is handled by ConstantVector instead.
https://reviews.llvm.org/D30216
More information about the llvm-commits
mailing list