[llvm-commits] [PATCH] Compress Repeated Byte Output
David A. Greene
greened at obbligato.org
Fri Aug 26 12:52:28 PDT 2011
David Greene <dag at cray.com> writes:
> + else if (const ConstantArray *CA = dyn_cast<ConstantArray>(V)) {
> + // Make sure all array elements are sequences of the same repeated
> + // byte.
> + int Byte = -1;
> + for (int i = 0, e = CA->getNumOperands(); i != e; ++i) {
> + int ThisByte = isRepeatedByteSequence(CA->getOperand(i), TM);
> + if (ThisByte == -1)
> + return -1;
> + if (Byte == -1)
> + Byte = ThisByte;
> + if (Byte != ThisByte)
> + return -1;
> + }
> + }
Gah. I missed a return of Byte here. Will fix.
-Dave
More information about the llvm-commits
mailing list