[PATCH] D24467: Fix an error after D21678
Vladimir Yakovlev via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 12 12:19:21 PDT 2016
vbyakovlcl created this revision.
vbyakovlcl added reviewers: ahatanak, aaron.ballman.
vbyakovlcl added subscribers: andreybokhanko, cfe-commits.
vbyakovlcl set the repository for this revision to rL LLVM.
vbyakovlcl changed the visibility of this Differential Revision from "Public (No Login Required)" to "All Users".
Herald added a subscriber: aemerson.
This fixes an error and gcc incompatibilities in vector shifts reported by Akira Hatanaka
--------------------------------------------------------------------------
From: Akira Hatanaka <ahatanak at gmail.com>
Date: Fri, Sep 2, 2016 at 3:00 AM
Subject: Re: [PATCH] D21678: Fix For pr28288 - Error message in shift of vector values
To: vladimir.1 at gmail.com, ulrich.weigand at de.ibm.com, amjad.aboud at intel.com, guy.benyei at intel.com, aaron.ballman at gmail.com
Cc: ahatanak at gmail.com, andreybokhanko at gmail.com, anastasia.stulova at arm.com, dmitry.polukhin at gmail.com, cfe-commits at lists.llvm.org
ahatanak added a subscriber: ahatanak.
ahatanak added a comment.
This patch causes clang to error out on the following code, which used to compile fine:
$ cat f2.c
typedef __attribute__((__ext_vector_type__(8))) unsigned short vector_ushort8;
vector_ushort8 foo1(void) {
return 1 << (vector_ushort8){7,6,5,4,3,2,1,0};
}
$ clang f2.c -c
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?
Repository:
rL LLVM
https://reviews.llvm.org/D21678
Repository:
rL LLVM
https://reviews.llvm.org/D24467
Files:
llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td
llvm/tools/clang/lib/Sema/SemaExpr.cpp
llvm/tools/clang/test/Sema/vecshift.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24467.71038.patch
Type: text/x-patch
Size: 9357 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160912/d9114b9c/attachment.bin>
More information about the cfe-commits
mailing list