[all-commits] [llvm/llvm-project] 3bd067: [MS] Fix double evaluation of MSVC builtin arguments
Reid Kleckner via All-commits
all-commits at lists.llvm.org
Wed Nov 25 12:02:13 PST 2020
Branch: refs/heads/temp-test-main
Home: https://github.com/llvm/llvm-project
Commit: 3bd06727267184223464f11d4e2470048ac40cb1
https://github.com/llvm/llvm-project/commit/3bd06727267184223464f11d4e2470048ac40cb1
Author: Reid Kleckner <rnk at google.com>
Date: 2020-11-25 (Wed, 25 Nov 2020)
Changed paths:
M clang/lib/CodeGen/CGBuiltin.cpp
M clang/lib/CodeGen/CodeGenFunction.h
M clang/test/CodeGen/ms-intrinsics.c
Log Message:
-----------
[MS] Fix double evaluation of MSVC builtin arguments
This code got quite twisted because we consider some MSVC builtins to be
target agnostic, and some to be target specific. Target specific
intrinsics have a pattern of doing up-front argument evaluation, while
general intrinsics do not evaluate their arguments up front. As we tried
to share codepaths between the target-specific and target-agnostic
handling, we ended up doing double evaluation.
Instead, have each target handle MSVC intrinsics consistently before up
front argument evaluation. This requires passing less data around and is
more consistent with target independent intrinsic handling.
See D50979 for past examples of this bug. I noticed this while looking
into adding some more intrinsics.
Differential Revision: https://reviews.llvm.org/D92061
More information about the All-commits
mailing list