[llvm] r225597 - X86: Properly decode shuffle masks when the constant pool type is weird
Chandler Carruth
chandlerc at google.com
Sat Jan 10 23:09:41 PST 2015
On Sat, Jan 10, 2015 at 9:08 PM, David Majnemer <david.majnemer at gmail.com>
wrote:
> - assert((NumElements == 16 || NumElements == 32) &&
> - "Only 128-bit and 256-bit vectors supported!");
> + if (!DestTy)
> + return;
> +
> + if (DestTy != MaskTy) {
> + if (!CastInst::castIsValid(Instruction::BitCast, const_cast<Constant
> *>(C),
> + DestTy))
> + return;
> +
> + C = ConstantFoldInstOperands(Instruction::BitCast, DestTy,
> + const_cast<Constant *>(C), TD);
> + MaskTy = DestTy;
> + }
>
No no no, you don't get to play fast and loose by constant folding here. =]
You may not have a module, your context may be very different than you
expect. =/
I would just do the bit math manually.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150110/ca73d2ad/attachment.html>
More information about the llvm-commits
mailing list