[llvm] r222748 - [InstCombine] Change LLVM To canonicalize toward the value type being

WenHan Gu (谷汶翰) wenhan.gu at gmail.com
Thu Apr 9 01:19:01 PDT 2015


Hi Chandler,

Sorry for replying long-time-ago commit, we found a case regression on 3.6
due to this.

entry:
  %castv4i32 = bitcast <4 x i32> %input to i128
->  store i128 %castv4i32, i128* %gep
  ret void

After this transformation, it will become

 entry:
   %0 = bitcast i128* %gep to <4 x i32>*
->   store <4 x i32> %input, <4 x i32>* %0

and it will fillup the align to

->  store <4 x i32> %input, <4 x i32>* %0, align 16     (Please check:
visitStoreInst: line 619)

The problem is
i128 align is 8 on x86_64 (due to DataLayout rule), but after
transformation, it will fill up align 16 to that store.
We expect it store to i128 will be align 8, but machine code will generate
instructions only accepting align 16, that causes SEGSIGV.
(eg. movups vs movaps)

Could we regard that case as side effect of this commit?
Thank you for kindly help!



2015-02-12 10:34 GMT+08:00 Chandler Carruth <chandlerc at gmail.com>:

> After quite a bit of work for me to understand everything and craft more
> reduced test cases, fixed in r228899. Will get it integrated into 3.6 etc.
>
> On Wed, Feb 11, 2015 at 1:51 PM, Chandler Carruth <chandlerc at gmail.com>
> wrote:
>
>>
>> On Wed, Feb 11, 2015 at 8:17 AM, Joerg Sonnenberger <
>> joerg at britannica.bec.de> wrote:
>>
>>> On Tue, Nov 25, 2014 at 10:09:51AM -0000, Chandler Carruth wrote:
>>> > Author: chandlerc
>>> > Date: Tue Nov 25 04:09:51 2014
>>> > New Revision: 222748
>>> >
>>> > URL: http://llvm.org/viewvc/llvm-project?rev=222748&view=rev
>>> > Log:
>>> > [InstCombine] Change LLVM To canonicalize toward the value type being
>>> > stored rather than the pointer type.
>>>
>>> Hi Chandler,
>>> this introduced a regression from 3.5 I just now got in pkgsrc. Try to
>>> build the attached sources with -O2.
>>
>>
>> Reproduces on ToT, looks like a bug in the SLP vectorizer.
>>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>


-- 
Best Regards,
WenHan Gu (Nowar)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150409/59c3a36a/attachment.html>


More information about the llvm-commits mailing list