<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">This is urgent, so I’ve tried to come up with a patch to fix this. I tried reverting r278501 and then made changes to have Sema::CheckVectorOperands call tryVectorConvertAndSplat when the vector type is a normal gcc vector. This fixes the test case I sent and also doesn’t affect the regression tests except that clang prints different error messages in a few cases and doesn’t print an expected diagnostic in one case, which is line 63 of test/Sema/vector-cast.c. We currently expect clang to print a diagnostic when we have a compound assignment like “double += <1 X double>”, but my patch makes clang accept it.</div><div class=""><br class=""></div><div><blockquote type="cite" class=""><div class="">On Sep 5, 2016, at 6:36 AM, Vladimir Yakovlev via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" class="">cfe-commits@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><p class="MsoNormal">I'll fix this.</p><p class="MsoNormal"><br class=""></p><p class="MsoNormal">Vladimir</p><p class="MsoNormal"><br class=""></p><p class="MsoNormal">-----------------------------------------------------------------------------------</p><p class="MsoNormal">From: <b class="">Akira Hatanaka</b> <<a href="mailto:ahatanak@gmail.com" class="">ahatanak@gmail.com</a>><br class="">
Date: Fri, Sep 2, 2016 at 3:00 AM<br class="">
Subject: Re: [PATCH] D21678: Fix For pr28288 - Error message in shift of vector
values<br class="">
To: <a href="mailto:vladimir.1@gmail.com" class="">vladimir.1@gmail.com</a>, <a href="mailto:ulrich.weigand@de.ibm.com" class="">ulrich.weigand@de.ibm.com</a>, <a href="mailto:amjad.aboud@intel.com" class="">amjad.aboud@intel.com</a>, <a href="mailto:guy.benyei@intel.com" class="">guy.benyei@intel.com</a>, <a href="mailto:aaron.ballman@gmail.com" class="">aaron.ballman@gmail.com</a><br class="">
Cc: <a href="mailto:ahatanak@gmail.com" class="">ahatanak@gmail.com</a>, <a href="mailto:andreybokhanko@gmail.com" class="">andreybokhanko@gmail.com</a>, <a href="mailto:anastasia.stulova@arm.com" class="">anastasia.stulova@arm.com</a>, <a href="mailto:dmitry.polukhin@gmail.com" class="">dmitry.polukhin@gmail.com</a>, <a href="mailto:cfe-commits@lists.llvm.org" class="">cfe-commits@lists.llvm.org</a><br class="">
<br class="">
<br class="">
ahatanak added a subscriber: ahatanak.<br class="">
ahatanak added a comment.<br class="">
<br class="">
This patch causes clang to error out on the following code, which used to
compile fine:<br class="">
<br class="">
$ cat f2.c<br class="">
<br class="">
typedef __attribute__((__ext_vector_type__(8))) unsigned short
vector_ushort8;<br class="">
<br class="">
vector_ushort8 foo1(void) {<br class="">
return 1 << (vector_ushort8){7,6,5,4,3,2,1,0};<br class="">
}<br class="">
<br class="">
$ clang f2.c -c<br class="">
<br class="">
clang used to transform the scaler operand to a vector operand (similar to the
way gcc's vector is handled) when compiling for normal c/c++ (but printed an
error message when compiling for opencl), but this patch dropped the check for
LangOpts added in r230464 and changed that behavior. I don't think this was
intentional?<span class=""></span></p>
<span style="font-size:12pt;font-family:"times new roman",serif" class=""><br class="">
<br class="">
Repository:<br class="">
rL LLVM<br class="">
<br class="">
<a href="https://reviews.llvm.org/D21678" target="_blank" class="">https://reviews.llvm.org/D21678</a></span><br class=""></div>
_______________________________________________<br class="">cfe-commits mailing list<br class=""><a href="mailto:cfe-commits@lists.llvm.org" class="">cfe-commits@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits<br class=""></div></blockquote></div><br class=""></div></body></html>