[PATCH] [X86] replace vinsertf128 intrinsics with generic shuffles
Andrea Di Biagio
Andrea_DiBiagio at sn.scee.net
Fri Mar 6 07:57:50 PST 2015
In http://reviews.llvm.org/D8088#135479, @spatel wrote:
> In http://reviews.llvm.org/D8088#135378, @RKSimon wrote:
>
> > The use of macros leaves these open to Wshadow warnings -
> > what is the effect of casting them directly in the __builtin_shufflevector args?
>
>
> I admit that I have no clue - I just copy pasted from the existing macros in this file.
>
> I wasn't sure why those names had double-leading-underscores, but now that you mention shadows, I assume it's precisely to avoid that problem.
The double-leading-underscores are not used to avoid the warnings. If you remove the extra underscores, you would still get the [-Wshadow] warnings.
In my experiments, you get those warnings only if you explicitly pass flags -Wshadow and -save-temps. Alternatively, you would only need to pass -Wshadow on a preprocessed file.
> As an experiment, I removed the temp values by casting the inputs directly into the shuffles, and I don't see any warnings.
>
> But I think if we want to make this change, then we should make it for all of the macros in this file in a follow-on commit. That way the code will be consistently implemented, and if we've missed some nuance of macro-fication, we can revert easily.
http://reviews.llvm.org/D8088
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list