[LLVMdev] Shuffle combine
nicolas at capens.net
Wed Apr 1 04:34:08 PDT 2009
I'm having some trouble understanding the following lines in
InstructionCombining.cpp, which possibly contain a bug:
if (Mask[i] >= 2*e)
When Mask[i] is bigger than the size of LHSMask it reads out of bounds on
that last line. I believe the first line is there to try to prevent that but
then it should be comparing to LHSMask.size() not 2*e (e being Mask.size()).
And when Mask[i] is bigger than the mask size the shuffle combine won't work
anyway so I would replace these lines with:
if (Mask[i] >= LHSMask.size())
But I'm not sure if I fully understand the implications. Could someone check
this for me and possibly patch it?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev