Sanjay Patel [Fri, 27 Jul 2018 16:21:56 +0000 (16:21 +0000)]
[AArch64] add more tests for signbit math; NFC
llvm-svn: 338129
Fangrui Song [Fri, 27 Jul 2018 16:01:09 +0000 (16:01 +0000)]
[Support] Use unsigned char for xxHash 64-bit
Before, the last 3 bytes were char-signedness dependent.
llvm-svn: 338128
Jan Vesely [Fri, 27 Jul 2018 15:00:13 +0000 (15:00 +0000)]
AMDGPU/R600: Add MOV instructions to BFE patterns
R600 can't handle immediates for BFE, these will be eliminated later.
Fixes powr/pow regressions n r600 since r334817
Differential Revision: https://reviews.llvm.org/D49641
llvm-svn: 338127
Sander de Smalen [Fri, 27 Jul 2018 14:24:55 +0000 (14:24 +0000)]
[AArch64][SVE] Asm: Predicated integer reductions.
This patch adds support for various integer reduction operations:
SADDV signed add reduction to scalar
UADDV unsigned add reduction to scalar
SMAXV signed maximum reduction to scalar
SMINV signed minimum reduction to scalar
UMAXV unsigned maximum reduction to scalar
UMINV unsigned minimum reduction to scalar
ANDV logical AND reduction to scalar
ORV logical OR reduction to scalar
EORV logical EOR reduction to scalar
The reduction is predicated, e.g.
smaxv s0, p0, z1.s
performs a signed maximum reduction on active elements in z1,
and stores the (signed max value) result in s0.
llvm-svn: 338126
Dmitry Preobrazhensky [Fri, 27 Jul 2018 14:17:15 +0000 (14:17 +0000)]
[AMDGPU][MC][DOC] Updated AMD GPU assembler description
llvm-svn: 338125
Ilya Biryukov [Fri, 27 Jul 2018 14:05:39 +0000 (14:05 +0000)]
[clang-tidy] Fix a crash in fuchsia-multiple-inheritance
Summary: See the test case for a repro.
Reviewers: juliehockett, ioeric, hokein, aaron.ballman
Reviewed By: hokein
Subscribers: lebedev.ri, xazax.hun, cfe-commits
Differential Revision: https://reviews.llvm.org/D49862
llvm-svn: 338124
Sander de Smalen [Fri, 27 Jul 2018 13:58:48 +0000 (13:58 +0000)]
[AArch64][SVE] Asm: Predicated floating point reductions.
This patch adds support for various floating-point
reduction operations:
FADDA strictly-ordered add reduction, accumulating in scalar
FADDV recursive add reduction to scalar
FMAXV recursive max reduction to scalar
FMINV recursive min reduction to scalar
FMAXNMV recursive max number reduction to scalar
FMINNMV recursive min number reduction to scalar
The reduction is predicated, e.g.
fadda d0, p0, d0, z1.d
performs the add-reduction in strict order on active elements
in z1, accumulating into d0.
faddv d0, p0, z1.d
performs the add-reduction (not in strict order)
on active elements in z1, storing the result in d0.
llvm-svn: 338123
Louis Dionne [Fri, 27 Jul 2018 12:46:03 +0000 (12:46 +0000)]
[libc++] Introduce _LIBCPP_HIDE_FROM_ABI to replace _LIBCPP_INLINE_VISIBILITY
Summary:
This commit introduces a new macro, _LIBCPP_HIDE_FROM_ABI, whose goal is to
mark functions that shouldn't be part of libc++'s ABI. It marks the functions
as being hidden for dylib visibility purposes, and as having internal linkage
using Clang's __attribute__((internal_linkage)) when available, and
__always_inline__ otherwise.
It replaces _LIBCPP_INLINE_VISIBILITY, which was always using __always_inline__
to achieve similar goals, but suffered from debuggability and code size problems.
The full proposal, along with more background information, can be found here:
http://lists.llvm.org/pipermail/cfe-dev/2018-July/058419.html
This commit does not rename uses of _LIBCPP_INLINE_VISIBILITY to
_LIBCPP_HIDE_FROM_ABI: this wide reaching but mechanical change can
be done later when we've confirmed we're happy with the new macro.
In the future, it would be nice if we could optionally allow dropping
any internal_linkage or __always_inline__ attribute, which could result
in code size improvements. However, this is currently impossible for
reasons explained here: http://lists.llvm.org/pipermail/cfe-dev/2018-July/058450.html
Reviewers: EricWF, dexonsmith, mclow.lists
Subscribers: christof, dexonsmith, llvm-commits, mclow.lists
Differential Revision: https://reviews.llvm.org/D49240
llvm-svn: 338122
Sander de Smalen [Fri, 27 Jul 2018 12:40:09 +0000 (12:40 +0000)]
[AArch64][SVE] Asm: Support for FEXPA and FTSSEL.
This patch adds support for transcendental acceleration
instructions 'FEXPA' (exponential accelerator) and 'FTSSEL'
(trigonometric select coefficient).
llvm-svn: 338121
Sander de Smalen [Fri, 27 Jul 2018 12:26:24 +0000 (12:26 +0000)]
[AArch64][SVE] Asm: Support for FRECPE and FRSQRTE.
Support for floating-point instructions for reciprocal
estimate (FRECPE) and reciprocal square root estimate (FRSQRTE).
llvm-svn: 338120
Philip Pfaffe [Fri, 27 Jul 2018 10:57:51 +0000 (10:57 +0000)]
[CMake] Followup for r337366: Only export LLVM_LINK_LLVM_DYLIB if it's set to ON
Summary:
As it was, always exporting LLVM_LINK_LLVM_DYLIB caused out-of-tree
clients to lose the ability to link against the dylib, even if in-tree tools did
not. By only exporting the setting if it is enabled, out-of-tree clients get the
correct default, but may still choose if they can.
Reviewers: mgorny, beanz, labath, bogner, chandlerc
Reviewed By: bogner, chandlerc
Subscribers: bollu, llvm-commits
Differential Revision: https://reviews.llvm.org/D49843
llvm-svn: 338119
Sanjay Patel [Fri, 27 Jul 2018 10:54:48 +0000 (10:54 +0000)]
[InstCombine] not(sub X, Y) --> add (not X), Y
The tests with constants show a missing optimization.
Analysis for adds is better than subs, so this can also
help with other transforms. And codegen is better with
adds for targets like x86 (destructive ops, no sub-from).
https://rise4fun.com/Alive/llK
llvm-svn: 338118
Sanjay Patel [Fri, 27 Jul 2018 10:45:04 +0000 (10:45 +0000)]
[InstCombine] add tests for not+sub; NFC
llvm-svn: 338117
Kirill Bobyrev [Fri, 27 Jul 2018 09:54:27 +0000 (09:54 +0000)]
[clangd] Return Dex Iterators
The original Dex Iterators patch (https://reviews.llvm.org/rL338017)
caused problems for Clang 3.6 and Clang 3.7 due to the compiler bug
which prevented inferring template parameter (`Size`) in create(And|Or)?
functions. It was reverted in https://reviews.llvm.org/rL338054.
In this revision the mentioned helper functions were replaced with
variadic templated versions.
Proposed changes were tested on multiple compiler versions, including
Clang 3.6 which originally caused the failure.
llvm-svn: 338116
Max Kazantsev [Fri, 27 Jul 2018 09:43:39 +0000 (09:43 +0000)]
[SimplifyIndVar] Canonicalize comparisons to unsigned while eliminating truncs
This is a follow-up for the patch rL335020. When we replace compares against
trunc with compares against wide IV, we can also replace signed predicates with
unsigned where it is legal.
Reviewed By: reames
Differential Revision: https://reviews.llvm.org/D48763
llvm-svn: 338115
Victor Leschuk [Fri, 27 Jul 2018 09:15:05 +0000 (09:15 +0000)]
[Support] Bring std::errc::not_supported to llvm::errc.
llvm-svn: 338114
Matt Arsenault [Fri, 27 Jul 2018 09:15:03 +0000 (09:15 +0000)]
AMDGPU: Fix code size for return_to_epilog pseudo
llvm-svn: 338113
Matt Arsenault [Fri, 27 Jul 2018 09:04:41 +0000 (09:04 +0000)]
DAG: Remove unnecessary .str()
llvm-svn: 338112
Matt Arsenault [Fri, 27 Jul 2018 09:04:35 +0000 (09:04 +0000)]
PatternMatch: Add wrappers for fabs and canonicalize
llvm-svn: 338111
Ilya Biryukov [Fri, 27 Jul 2018 09:01:03 +0000 (09:01 +0000)]
Revert "ELF: Make --print-icf-sections output deterministic."
This reverts commit r338088. To unbreak our integrate.
The resulting lld output is different if compiled with '-funsigned-char'.
llvm-svn: 338110
Anastasis Grammenos [Fri, 27 Jul 2018 08:22:54 +0000 (08:22 +0000)]
Revert "[LV][DebugInfo] Set DL to the middle block Icmp instruction"
This reverts commit r338106.
llvm-svn: 338109
Roman Lebedev [Fri, 27 Jul 2018 07:27:14 +0000 (07:27 +0000)]
[AST] Sink 'part of explicit cast' down into ImplicitCastExpr
Summary:
As discussed in IRC with @rsmith, it is slightly not good to keep that in the `CastExpr` itself:
Given the explicit cast, which is represented in AST as an `ExplicitCastExpr` + `ImplicitCastExpr`'s,
only the `ImplicitCastExpr`'s will be marked as `PartOfExplicitCast`, but not the `ExplicitCastExpr` itself.
Thus, it is only ever `true` for `ImplicitCastExpr`'s, so we don't need to write/read/dump it for `ExplicitCastExpr`'s.
We don't need to worry that we write the `PartOfExplicitCast` in PCH after `CastExpr::path_iterator`,
since the `ExprImplicitCastAbbrev` is only used when the `NumBaseSpecs == 0`, i.e. there is no 'path'.
Reviewers: rsmith, rjmccall, erichkeane, aaron.ballman
Reviewed By: rsmith, erichkeane
Subscribers: vsk, cfe-commits, rsmith
Tags: #clang
Differential Revision: https://reviews.llvm.org/D49838
llvm-svn: 338108
Hiroshi Inoue [Fri, 27 Jul 2018 07:21:02 +0000 (07:21 +0000)]
[InstSimplify] tests for D48828: fold extraction from std::pair
This commit includes unit tests for D48828, which enhances InstSimplify to enable jump threading with a method whose return type is std::pair<int, bool> or std::pair<bool, int>.
I am going to commit the actual transformation later.
llvm-svn: 338107
Anastasis Grammenos [Fri, 27 Jul 2018 07:12:44 +0000 (07:12 +0000)]
[LV][DebugInfo] Set DL to the middle block Icmp instruction
Reviewers: hsaito
Differential Revision: https://reviews.llvm.org/D49746
llvm-svn: 338106
Craig Topper [Fri, 27 Jul 2018 06:54:13 +0000 (06:54 +0000)]
[Docs] Remove hard tab character from code block in optbisect documentation
llvm-svn: 338105
Xin Tong [Fri, 27 Jul 2018 06:50:45 +0000 (06:50 +0000)]
[NFC] Remove an empty line.
llvm-svn: 338104
Eric Fiselier [Fri, 27 Jul 2018 06:12:46 +0000 (06:12 +0000)]
Move Filesystem namespace definition out of a clang specific ifdef block.
llvm-svn: 338103
Tom Stellard [Fri, 27 Jul 2018 06:04:40 +0000 (06:04 +0000)]
AMDGPU/GlobalISel: Fix crash in regbankselect on non-power-of-2 types
Reviewers: arsenm
Reviewed By: arsenm
Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, dstuttard, tpr, llvm-commits, t-tye
Differential Revision: https://reviews.llvm.org/D49624
llvm-svn: 338102
Craig Topper [Fri, 27 Jul 2018 05:56:27 +0000 (05:56 +0000)]
[X86] Remove an unnecessary 'if' that prevented treating INT64_MAX and -INT64_MAX as power of 2 minus 1 in the multiply expansion code.
Not sure why they were being explicitly excluded, but I believe all the math inside the if works. I changed the absolute value to be uint64_t instead of int64_t so INT64_MIN+1 wouldn't be signed wrap.
llvm-svn: 338101
Bob Haarman [Fri, 27 Jul 2018 05:40:29 +0000 (05:40 +0000)]
[LTO] Don't internalize declarations
Summary:
Some links were failing with "Global is external, but doesn't have
external or weak linkage!" in ThinLTO builds with debug
information. This happened when we elide the body of a global that is
referenced by debug info. This results in a declaration, which we
would then internalize - but declarations cannot be internal. This
change avoids the problem by not internalizing these declarations.
Fixes PR38046.
Reviewers: pcc, tejohnson
Subscribers: mehdi_amini, aprantl, hiraditya, JDevlieghere, steven_wu, dexonsmith, llvm-commits
Differential Revision: https://reviews.llvm.org/D49777
llvm-svn: 338100
Fangrui Song [Fri, 27 Jul 2018 05:38:14 +0000 (05:38 +0000)]
Replace LLVM_ALIGNAS with alignas as a follow-up of r337330
The minimum required GCC version was raised to 4.8 (which started to support alignas) in r284497.
llvm-svn: 338099
Mike Edwards [Fri, 27 Jul 2018 04:41:37 +0000 (04:41 +0000)]
[WWW] Fixing file permissions for the .html pages.
llvm-svn: 338098
Craig Topper [Fri, 27 Jul 2018 04:29:10 +0000 (04:29 +0000)]
[X86] Add matching for another pattern of PMADDWD.
Summary:
This is the pattern you get from the loop vectorizer for something like this
int16_t A[1024];
int16_t B[1024];
int32_t C[512];
void pmaddwd() {
for (int i = 0; i != 512; ++i)
C[i] = (A[2*i]*B[2*i]) + (A[2*i+1]*B[2*i+1]);
}
In this case we will have (add (mul (build_vector), (build_vector)), (mul (build_vector), (build_vector))). This is different than the pattern we currently match which has the build_vectors between an add and a single multiply. I'm not sure what C code would get you that pattern.
Reviewers: RKSimon, spatel, zvi
Reviewed By: zvi
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D49636
llvm-svn: 338097
Eric Fiselier [Fri, 27 Jul 2018 03:47:46 +0000 (03:47 +0000)]
Add libc++fs to the test deps, and not to the target 'cxx'.
llvm-svn: 338096
Eric Fiselier [Fri, 27 Jul 2018 03:42:58 +0000 (03:42 +0000)]
Attempt to unbreak *all the bots*
The bots were failing to build the cxx_filesystem target, so the
tests were failing. Though this does lead me to wonder how it
was ever working with c++experimental.
llvm-svn: 338095
Eric Fiselier [Fri, 27 Jul 2018 03:16:02 +0000 (03:16 +0000)]
Correctly mark the Filesystem status as complete.
llvm-svn: 338094
Eric Fiselier [Fri, 27 Jul 2018 03:07:09 +0000 (03:07 +0000)]
Implement <filesystem>
This patch implements the <filesystem> header and uses that
to provide <experimental/filesystem>.
Unlike other standard headers, the symbols needed for <filesystem>
have not yet been placed in libc++.so. Instead they live in the
new libc++fs.a library. Users of filesystem are required to link this
library. (Also note that libc++experimental no longer contains the
definition of <experimental/filesystem>, which now requires linking libc++fs).
The reason for keeping <filesystem> out of the dylib for now is that
it's still somewhat experimental, and the possibility of requiring an
ABI breaking change is very real. In the future the symbols will likely
be moved into the dylib, or the dylib will be made to link libc++fs automagically).
Note that moving the symbols out of libc++experimental may break user builds
until they update to -lc++fs. This should be OK, because the experimental
library provides no stability guarantees. However, I plan on looking into
ways we can force libc++experimental to automagically link libc++fs.
In order to use a single implementation and set of tests for <filesystem>, it
has been placed in a special `__fs` namespace. This namespace is inline in
C++17 onward, but not before that. As such implementation is available
in C++11 onward, but no filesystem namespace is present "directly", and
as such name conflicts shouldn't occur in C++11 or C++14.
llvm-svn: 338093
Chen Zheng [Fri, 27 Jul 2018 01:49:51 +0000 (01:49 +0000)]
[InstCombine] canonicalize abs pattern
Differential Revision: https://reviews.llvm.org/D48754
llvm-svn: 338092
Emmett Neyman [Fri, 27 Jul 2018 00:43:26 +0000 (00:43 +0000)]
added shared library to fix buildbot
Summary: added shared library to fix buildbot
Subscribers: mgorny, cfe-commits
Differential Revision: https://reviews.llvm.org/D49895
llvm-svn: 338091
Craig Topper [Fri, 27 Jul 2018 00:00:30 +0000 (00:00 +0000)]
[X86] When removing sign extends from gather/scatter indices, make sure we handle UpdateNodeOperands finding an existing node to CSE with.
If this happens the operands aren't updated and the existing node is returned. Make sure we pass this existing node up to the DAG combiner so that a proper replacement happens. Otherwise we get stuck in an infinite loop with an unoptimized node.
llvm-svn: 338090
Erik Pilkington [Thu, 26 Jul 2018 23:40:42 +0000 (23:40 +0000)]
[Sema] Fix a crash by completing a type before using it
Only apply this exception on a type that we're able to check.
rdar://
41903969
Differential revision: https://reviews.llvm.org/D49868
llvm-svn: 338089
Peter Collingbourne [Thu, 26 Jul 2018 23:34:35 +0000 (23:34 +0000)]
ELF: Make --print-icf-sections output deterministic.
The icf-safe.s test currently fails on 32-bit platforms because it uses
the --print-icf-sections flag and depends on the output appearing in
a specific order. However, this flag causes the output to depend on
the order of the sections in the Sections array, which depends on the
hash values returned from hash_combine, which happen to be different
for that test between 32-bit and 64-bit platforms.
This change makes the output deterministic by using xxHash64 instead of
hash_combine.
Differential Revision: https://reviews.llvm.org/D49877
llvm-svn: 338088
Mike Edwards [Thu, 26 Jul 2018 23:29:54 +0000 (23:29 +0000)]
[WWW] Removing my test file as the auto-deployment script has been fixed.
llvm-svn: 338087
Mike Edwards [Thu, 26 Jul 2018 23:23:40 +0000 (23:23 +0000)]
[WWW] Adding a test page to work out an auto-deployment issue.
llvm-svn: 338086
Craig Topper [Thu, 26 Jul 2018 23:22:11 +0000 (23:22 +0000)]
[SelectionDAGBuilder] Add masked loads to PendingLoads rather than calling DAG.setRoot.
Masked loads are calling DAG.getRoot rather than calling SelectionDAGBuilder::getRoot, which means the PendingLoads weren't emptied to update the root and create any needed TokenFactor. So it would be incorrect to call setRoot for the masked load.
This patch instead adds the masked load to PendingLoads so that the root doesn't get update until a store or scatter or something happens.. Alternatively, we could call SelectionDAGBuilder::getRoot before it, but that would create unnecessary serialization.
llvm-svn: 338085
Reid Kleckner [Thu, 26 Jul 2018 23:21:51 +0000 (23:21 +0000)]
Revert r338057 "[VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name"
This broke clang/test/PCH/case-insensitive-include.c on Windows.
llvm-svn: 338084
Reid Kleckner [Thu, 26 Jul 2018 23:18:44 +0000 (23:18 +0000)]
[MS] Add L__FUNCSIG__ for compatibility
Clang already has L__FUNCTION__ as a workaround for dealing with
pre-processor code that expects to be able to do L##__FUNCTION__ in a
macro. This patch implements the same logic for __FUNCSIG__.
Fixes PR38295.
llvm-svn: 338083
Reid Kleckner [Thu, 26 Jul 2018 22:59:17 +0000 (22:59 +0000)]
[InstrProf] Use comdats on COFF for available_externally functions
Summary:
r262157 added ELF-specific logic to put a comdat on the __profc_*
globals created for available_externally functions. We should be able to
generalize that logic to all object file formats that support comdats,
i.e. everything other than MachO. This fixes duplicate symbol errors,
since on COFF, linkonce_odr doesn't make the symbol weak.
Fixes PR38251.
Reviewers: davidxl, xur
Subscribers: hiraditya, dmajor, llvm-commits, aheejin
Differential Revision: https://reviews.llvm.org/D49882
llvm-svn: 338082
Wolfgang Pieb [Thu, 26 Jul 2018 22:48:52 +0000 (22:48 +0000)]
[DWARF v5] Reposting r337981, which was reverted in r337997 due to a test failure in debuginfo_tests.
The test failure was caused by the compiler not emitting a __debug_ranges section with DWARF 4 and
earlier when no ranges are needed. The test checks for the existence regardless.
llvm-svn: 338081
Craig Topper [Thu, 26 Jul 2018 22:40:24 +0000 (22:40 +0000)]
[SelectionDAG] Add MLOAD/MSTORE/MGATHER/MSCATTER to AddNodeIDCustom to properly calculate their folding set ID to allow them to be CSEd.
llvm-svn: 338080
Craig Topper [Thu, 26 Jul 2018 22:40:22 +0000 (22:40 +0000)]
[DAGCombiner] Remove some calls to AddToWorklist that should be unnecessary.
The DAGCombiner has a system for ensuring all nodes are visited. It doesn't require an AddToWorkList for every node that is created by a combine.
llvm-svn: 338079
Zachary Turner [Thu, 26 Jul 2018 22:24:01 +0000 (22:24 +0000)]
Fix -Wsign-compare warning.
llvm-svn: 338078
Emmett Neyman [Thu, 26 Jul 2018 22:23:25 +0000 (22:23 +0000)]
Updated llvm-proto-fuzzer to execute the compiled code
Summary:
Made changes to the llvm-proto-fuzzer
- Added loop vectorizer optimization pass in order to have two IR versions
- Updated old fuzz target to handle two different IR versions
- Wrote code to execute both versions in memory
Reviewers: morehouse, kcc, alexshap
Reviewed By: morehouse
Subscribers: pcc, mgorny, cfe-commits, llvm-commits
Differential Revision: https://reviews.llvm.org/D49526
llvm-svn: 338077
Sanjin Sijaric [Thu, 26 Jul 2018 22:18:28 +0000 (22:18 +0000)]
[ARM64] [Windows] Follow MS X86_64 C++ ABI when passing structs
Summary: Microsoft's C++ object model for ARM64 is the same as that for X86_64.
For example, small structs with non-trivial copy constructors or virtual
function tables are passed indirectly. Currently, they are passed in registers
when compiled with clang.
Reviewers: rnk, mstorsjo, TomTan, haripul, javed.absar
Reviewed By: rnk, mstorsjo
Subscribers: kristof.beyls, chrib, llvm-commits, cfe-commits
Differential Revision: https://reviews.llvm.org/D49770
llvm-svn: 338076
Zachary Turner [Thu, 26 Jul 2018 22:13:39 +0000 (22:13 +0000)]
[MS Demangler] Properly handle function parameter back-refs.
Properly demangle function parameter back-references.
Previously we treated lists of function parameters and template
parameters the same. There are some important differences with regards
to back-references, and some less important differences regarding which
characters can appear before or after the name.
The important differences are that with a given type T, all instances of
a function parameter list share the same global back-ref table.
Specifically, if X and Y are function pointers, then there are 3
entities in the declaration X func(Y) which all affect and are affected
by the master parameter back-ref table:
1) The parameter list of X's function type
2) the parameter list of func itself
3) The parameter list of Y's function type.
The previous code would create a back-reference table that was local to
a single parameter list, so it would not be shared across parameter
lists.
This was discovered when porting ms-back-references.test from clang's
mangling tests. All of these tests should now pass with the new changes.
In doing so, I split the function for parsing template and function
parameters into two separate functions. This makes the template
parameter list parsing code in particular very small and easy to
understand now.
Differential Revision: https://reviews.llvm.org/D49875
llvm-svn: 338075
Alex Langford [Thu, 26 Jul 2018 21:55:14 +0000 (21:55 +0000)]
Add back lldb-framework-headers target
In r338058 we removed the target `lldb-framework-headers`, which mean
lldb-framework no longer depended on `framework_headers`, so they never
actually got generated. This is a partial revert of r338058: I added
back the lldb-framework-headers target, but the framework-header-fix.sh
script still runs on the copied headers.
llvm-svn: 338074
Keno Fischer [Thu, 26 Jul 2018 21:55:06 +0000 (21:55 +0000)]
[SCEV] Don't expand Wrap predicate using inttoptr in ni addrspaces
Summary:
In non-integral address spaces, we're not allowed to introduce inttoptr/ptrtoint
intrinsics. Instead, we need to expand any pointer arithmetic as geps on the
base pointer. Luckily this is a common task for SCEV, so all we have to do here
is hook up the corresponding helper function and add test case.
Fixes PR38290
Reviewers: sanjoy
Differential Revision: https://reviews.llvm.org/D49832
llvm-svn: 338073
Keno Fischer [Thu, 26 Jul 2018 21:55:03 +0000 (21:55 +0000)]
[SCEV] Add an expandAddToGEP overload for a single operand. NFC.
Only wanting to pass a single SCEV operand to use as the offset of
the GEP is a common operation. Right now this requires creating a
temporary stack array at every call site. Add an overload
that encapsulates that pattern and simplify the call sites.
Suggested-By: sanjoy (in https://reviews.llvm.org/D49832)
llvm-svn: 338072
Duncan P. N. Exon Smith [Thu, 26 Jul 2018 21:29:54 +0000 (21:29 +0000)]
ADT: Document advantages of SmallVector<T,0> over std::vector
In light of the recent changes to SmallVector in r335421, r337514, and
r337820, document its advantages over std::vector (see r175906 and
r266909).
Also add a release note.
https://reviews.llvm.org/D49748
llvm-svn: 338071
Tim Renouf [Thu, 26 Jul 2018 21:27:34 +0000 (21:27 +0000)]
[RegisterCoalescer] Fixed inconsistent followCopyChain with subreg
Summary:
The behavior of followCopyChain with a subreg depends on the order in
which subranges appear in a live interval, which is bad.
This commit fixes that, and allows the copy chain to continue only if
all matching subranges that are not undefined take us to the same def.
I don't have a test for this; the reproducer I had on my branch with
various other local changes does not reproduce the problem on upstream
llvm. Also that reproducer was an ll test; attempting to convert it to a
mir test made the subranges appear in a different order and hid the
problem.
However I would argue that the old behavior was obviously wrong
and needs fixing.
Subscribers: MatzeB, qcolombet, llvm-commits
Differential Revision: https://reviews.llvm.org/D49535
Change-Id: Iee7936ef305918f3b498ac432e2cf651ae5cc2df
llvm-svn: 338070
Vedant Kumar [Thu, 26 Jul 2018 20:56:53 +0000 (20:56 +0000)]
[DebugInfo] LowerDbgDeclare: Add derefs when handling CallInst users
LowerDbgDeclare inserts a dbg.value before each use of an address
described by a dbg.declare. When inserting a dbg.value before a CallInst
use, however, it fails to append DW_OP_deref to the DIExpression.
The DW_OP_deref is needed to reflect the fact that a dbg.value describes
a source variable directly (as opposed to a dbg.declare, which relies on
pointer indirection).
This patch adds in the DW_OP_deref where needed. This results in the
correct values being shown during a debug session for a program compiled
with ASan and optimizations (see https://reviews.llvm.org/D49520). Note
that ConvertDebugDeclareToDebugValue is already correct -- no changes
there were needed.
One complication is that SelectionDAG is unable to distinguish between
direct and indirect frame-index (FRAMEIX) SDDbgValues. This patch also
fixes this long-standing issue in order to not regress integration tests
relying on the incorrect assumption that all frame-index SDDbgValues are
indirect. This is a necessary fix: the newly-added DW_OP_derefs cannot
be lowered properly otherwise. Basically the fix prevents a direct
SDDbgValue with DIExpression(DW_OP_deref) from being dereferenced twice
by a debugger. There were a handful of tests relying on this incorrect
"FRAMEIX => indirect" assumption which actually had incorrect
DW_AT_locations: these are all fixed up in this patch.
Testing:
- check-llvm, and an end-to-end test using lldb to debug an optimized
program.
- Existing unit tests for DIExpression::appendToStack fully cover the
new DIExpression::append utility.
- check-debuginfo (the debug info integration tests)
Differential Revision: https://reviews.llvm.org/D49454
llvm-svn: 338069
Zachary Turner [Thu, 26 Jul 2018 20:33:48 +0000 (20:33 +0000)]
[MS Demangler] Print calling convention inside parentheses.
For function pointers, we would print something like
int __cdecl (*)(int)
We need to move the calling convention inside, and print
int (__cdecl *)(int)
This patch implements this change for regular function pointers as
well as member function pointers.
llvm-svn: 338068
Zachary Turner [Thu, 26 Jul 2018 20:25:35 +0000 (20:25 +0000)]
[MS Demangler] Add ms-arg-qualifiers.test
This converts the arg qualifier mangling tests from
clang/CodeGenCXX/mangle-ms-arg-qualifiers.cpp to demangling tests.
Most tests already pass, so this patch doesn't come with any
functional change, just the addition of new tests. The few tests
that don't pass are left in with a FIXME label so that they don't
run but serve as documentation about what still doesn't work.
llvm-svn: 338067
Zachary Turner [Thu, 26 Jul 2018 20:20:29 +0000 (20:20 +0000)]
Add missing tests from ms-mangle.cpp.
None of these tests pass yet so they are commented out, but I'm
adding them with a FIXME label so that they don't get lost when
copying tests over from clang's mangling tests. Currently these
tests are all commented out.
llvm-svn: 338066
Zachary Turner [Thu, 26 Jul 2018 20:20:10 +0000 (20:20 +0000)]
[MS Demangler] Demangle pointers to member functions.
After this patch, we can now properly demangle pointers to member
functions. The calling convention is located in the wrong place,
but this will be fixed in a followup since it also affects non
member function pointers.
Differential Revision: https://reviews.llvm.org/D49639
llvm-svn: 338065
Martin Storsjo [Thu, 26 Jul 2018 20:14:50 +0000 (20:14 +0000)]
[COFF] Handle comdat sections without leader symbols
Discard them unless they have been associated by other means (yet
uimplemented).
According to MS link.exe, such sections are illegal, but MinGW setups
use them in their take on associative comdats.
This avoids leaving references to the bogus SectionChunk* PendingComdat,
which cannot be dereferenced.
This fixes PR38183.
Differential Revision: https://reviews.llvm.org/D49653
llvm-svn: 338064
Martin Storsjo [Thu, 26 Jul 2018 20:11:26 +0000 (20:11 +0000)]
[MC] Add support for the .rva assembler directive for COFF targets
Even though gas doesn't document it, it has been supported there for
a very long time.
This produces the 32 bit relative virtual address (aka image relative
address) for a given symbol. ".rva foo" is essentially equal to
".long foo@imgrel".
Differential Revision: https://reviews.llvm.org/D49821
llvm-svn: 338063
Stephen Hines [Thu, 26 Jul 2018 20:05:31 +0000 (20:05 +0000)]
Handle the lack of a symbol table correctly.
Summary:
These two cases will trigger a dereference on a nullptr, since the
SymbolTable can be nonexistent for a given library, in addition to just
being empty.
Reviewers: alexshap
Reviewed By: alexshap
Subscribers: meikeb, kongyi, chh, jakehehrlich, llvm-commits, pirama
Differential Revision: https://reviews.llvm.org/D49534
llvm-svn: 338062
Zachary Turner [Thu, 26 Jul 2018 19:56:09 +0000 (19:56 +0000)]
[MS Demangler] Demangle data member pointers.
Differential Revision: https://reviews.llvm.org/D49630
llvm-svn: 338061
Scott Linder [Thu, 26 Jul 2018 19:47:51 +0000 (19:47 +0000)]
[AMDGPU] Fix VGPR spills where offset doesn't fit in 12 bits
Scale the offset of VGPR spills by the wave size when it cannot fit in the
12-bit offset immediate field and so is added to the soffset SGPR. This
accounts for hardware swizzling of scratch memory.
Differential Revision: https://reviews.llvm.org/D49448
llvm-svn: 338060
Sanjay Patel [Thu, 26 Jul 2018 19:22:41 +0000 (19:22 +0000)]
[InstCombine] fold udiv with common factor from muls with nuw
Unfortunately, sdiv isn't as simple because of UB due to overflow.
This fold is mentioned in PR38239:
https://bugs.llvm.org/show_bug.cgi?id=38239
llvm-svn: 338059
Alex Langford [Thu, 26 Jul 2018 19:04:46 +0000 (19:04 +0000)]
Make framework-header-fix process copied headers
Summary:
Previously the framework-header-fix script would change the sources
before they were copied, leading to unnecessary rebuilds on repeat
`ninja lldb` invocations. This runs the script on the headers after
they're copied into the produced LLDB.framework, meaning it doesn't
affect any files being built.
Patch by Keith Smiley <keithbsmiley@gmail.com>!
Differential Revision: https://reviews.llvm.org/D49779
llvm-svn: 338058
Simon Marchi [Thu, 26 Jul 2018 18:55:02 +0000 (18:55 +0000)]
[VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name
Summary:
InMemoryFileSystem::status behaves differently than
RealFileSystem::status. The Name contained in the Status returned by
RealFileSystem::status will be the path as requested by the caller,
whereas InMemoryFileSystem::status returns the normalized path.
For example, when requested the status for "../src/first.h",
RealFileSystem returns a Status with "../src/first.h" as the Name.
InMemoryFileSystem returns "/absolute/path/to/src/first.h".
The reason for this change is that I want to make a unit test in the
clangd testsuite (where we use an InMemoryFileSystem) to reproduce a
bug I get with the clangd program (where a RealFileSystem is used).
This difference in behavior "hides" the bug in the unit test version.
Reviewers: malaperle, ilya-biryukov, bkramer
Subscribers: cfe-commits, ioeric, ilya-biryukov, bkramer, hokein, omtcyfz
Differential Revision: https://reviews.llvm.org/D48903
llvm-svn: 338057
Richard Smith [Thu, 26 Jul 2018 18:41:30 +0000 (18:41 +0000)]
Refactor checking of switch conditions and case values.
Check each case value in turn while parsing it, performing the
conversion to the switch type within the context of the expression
itself. This will become necessary in order to properly handle cleanups
for temporaries created as part of the case label (in an upcoming
patch). For now it's just good hygiene.
This necessitates moving the checking for the switch condition itself to
earlier, so that the destination type is available when checking the
case labels.
As a nice side-effect, we get slightly improved diagnostic quality and
error recovery by separating the case expression checking from the case
statement checking and from tracking whether there are discarded case
labels.
llvm-svn: 338056
Alexey Bataev [Thu, 26 Jul 2018 18:40:41 +0000 (18:40 +0000)]
[OPENMP, DOCS] Fixed typo, NFC.
llvm-svn: 338055
Kirill Bobyrev [Thu, 26 Jul 2018 18:25:48 +0000 (18:25 +0000)]
Revert Clangd Dex Iterators patch
This reverts two revisions:
* https://reviews.llvm.org/rL338017
* https://reviews.llvm.org/rL338028
They caused crash for Clang 3.6 & Clang 3.7 buildbots, it was
reported by Jeremy Morse.
llvm-svn: 338054
Jonas Hahnfeld [Thu, 26 Jul 2018 18:23:40 +0000 (18:23 +0000)]
[test] Use printf instead of C++ iostream, NFC.
This test fails with libc++ when built with MemorySanitizer. This
is because we link to an uninstrumented version of the library
so msan detects a nested error when calling std::cout << "...".
This can be easily avoided by using good old printf.
Differential Revision: https://reviews.llvm.org/D49867
llvm-svn: 338053
Jonas Hahnfeld [Thu, 26 Jul 2018 18:15:02 +0000 (18:15 +0000)]
PR30734: Remove __kmp_ft_page_allocate()
This function was not enabled by default and not exported when manually
tweaking the build flags. Additionally it was hard to use since there
is no corresponding __kmp_ft_page_free().
The code itself is questionable because the returned memory address
is padded by an extra pointer which stores the unpadded start of the
allocated region (this would need to be freed).
Differential Revision: https://reviews.llvm.org/D49802
llvm-svn: 338052
Jonas Hahnfeld [Thu, 26 Jul 2018 18:14:57 +0000 (18:14 +0000)]
[test] Remove XFAIL of omp_for_bigbounds.c for Intel Compiler
The initial commit said that the test passes with Intel Compiler,
so change XFAIL to only list clang and gcc.
Differential Revision: https://reviews.llvm.org/D49801
llvm-svn: 338051
Mandeep Singh Grang [Thu, 26 Jul 2018 18:07:59 +0000 (18:07 +0000)]
[COFF, ARM64] Decide when to mark struct returns as SRet
Summary:
Refer the MS ARM64 ABI Convention for the behavior for struct returns:
https://docs.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions#return-values
Reviewers: mstorsjo, compnerd, rnk, javed.absar, yinma, efriedma
Reviewed By: rnk, efriedma
Subscribers: haripul, TomTan, yinma, efriedma, kristof.beyls, chrib, llvm-commits
Differential Revision: https://reviews.llvm.org/D49464
llvm-svn: 338050
Alexey Bataev [Thu, 26 Jul 2018 17:53:45 +0000 (17:53 +0000)]
[OPENMP] What's new for OpenMP in clang.
Updated ReleaseNotes + Status of the OpenMP support in clang.
llvm-svn: 338049
Akira Hatanaka [Thu, 26 Jul 2018 17:51:13 +0000 (17:51 +0000)]
[Sema][ObjC] Do not propagate the nullability specifier on the receiver
to the result type of a message send if the result type cannot have a
nullability specifier.
Previously, clang would print the following message when the code in
nullability.m was compiled:
"incompatible integer to pointer conversion initializing 'int *' with
an expression of type 'int _Nullable'"
This is wrong as 'int' isn't supposed to have any nullability
specifiers.
rdar://problem/
40830514
llvm-svn: 338048
Ana Pazos [Thu, 26 Jul 2018 17:49:43 +0000 (17:49 +0000)]
[RISCV] Add support for _interrupt attribute
- Save/restore only registers that are used.
This includes Callee saved registers and Caller saved registers
(arguments and temporaries) for integer and FP registers.
- If there is a call in the interrupt handler, save/restore all
Caller saved registers (arguments and temporaries) and all FP registers.
- Emit special return instructions depending on "interrupt"
attribute type.
Based on initial patch by Zhaoshi Zheng.
Reviewers: asb
Reviewed By: asb
Subscribers: rkruppe, the_o, MartinMosbeck, brucehoult, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, mgrang, rogfer01, llvm-commits
Differential Revision: https://reviews.llvm.org/D48411
llvm-svn: 338047
Matthias Braun [Thu, 26 Jul 2018 17:43:56 +0000 (17:43 +0000)]
MacroFusion: Fix macro fusion with ExitSU failing in top-down scheduling
When fusing instructions A and B, we must add all predecessors of B as
predecessors of A to avoid instructions getting scheduling in between.
There is a special case involving ExitSU: Every other node must be
scheduled before it by design and we don't need to make this explicit in
the graph, however when fusing with a different node we need to schedule
every othere node before the fused node too and we need to make this
explicit now: This patch adds a dependency from the fused node to all
roots in the graph.
Differential Revision: https://reviews.llvm.org/D49830
llvm-svn: 338046
Ana Pazos [Thu, 26 Jul 2018 17:37:45 +0000 (17:37 +0000)]
[RISCV] Add support for interrupt attribute
Summary:
Clang supports the GNU style ``__attribute__((interrupt))`` attribute on RISCV targets.
Permissible values for this parameter are user, supervisor, and machine.
If there is no parameter, then it defaults to machine.
Reference: https://gcc.gnu.org/onlinedocs/gcc/RISC-V-Function-Attributes.html
Based on initial patch by Zhaoshi Zheng.
Reviewers: asb, aaron.ballman
Reviewed By: asb, aaron.ballman
Subscribers: rkruppe, the_o, aaron.ballman, MartinMosbeck, brucehoult, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, mgrang, rogfer01, cfe-commits
Differential Revision: https://reviews.llvm.org/D48412
llvm-svn: 338045
Roman Lebedev [Thu, 26 Jul 2018 17:34:28 +0000 (17:34 +0000)]
[DAGCombine] optimizeSetCCOfSignedTruncationCheck(): handle ule,ugt CondCodes.
Summary:
A follow-up for D49266 / rL337166.
At least one of these cases is more canonical,
so we really do have to handle it.
https://godbolt.org/g/pkzP3X
https://rise4fun.com/Alive/pQyhZZ
We won't get to these cases with I1 being -1,
as that will be constant-folded to true or false.
I'm also not sure we actually hit the 'ule' case,
but i think the worst think that could happen is that being dead code.
Reviewers: spatel, craig.topper, RKSimon, javed.absar, efriedma
Reviewed By: spatel
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D49497
llvm-svn: 338044
Raphael Isemann [Thu, 26 Jul 2018 17:14:18 +0000 (17:14 +0000)]
Fix duplicate suggestions after an ambiguous command
Summary:
So far lldb is printing this when it finds an ambiguous command:
```
(lldb) g
Ambiguous command 'g'. Possible matches:
gdb-remote
gui
gdb-remote
gui
```
The duplicates come from the fact that we call the same query twice with the same parameters
and add it to the same list. This patch just removes the second query call to `GetCommandObject`.
As `GetCommandObject` is const and the name parameter is also not modified, this shouldn't break
anything else. I didn't merge the remaining if statement into the else as I think otherwise the
`if obj==nullptr do X else Y` pattern in there becomes hard to recognize.
Reviewers: davide
Reviewed By: davide
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D49866
llvm-svn: 338043
Rui Ueyama [Thu, 26 Jul 2018 17:11:24 +0000 (17:11 +0000)]
[COFF] clean up global resources after completion
Patch by Andrew Kelley.
Previously, running lld::coff::link() twice in the same process would
access stale pointers because of these global variables not being reset.
After this patch, lld::coff::link() can be called any number of times,
just like its ELF and MACH-O counterparts.
Differential Revision: https://reviews.llvm.org/D49856
llvm-svn: 338042
Akira Hatanaka [Thu, 26 Jul 2018 16:51:21 +0000 (16:51 +0000)]
[CodeGen][ObjC] Make block copy/dispose helper functions exception-safe.
When an exception is thrown in a block copy helper function, captured
objects that have previously been copied should be destructed or
released. Similarly, captured objects that are yet to be released should
be released when an exception is thrown in a dispose helper function.
rdar://problem/
42410255
Differential Revision: https://reviews.llvm.org/D49718
llvm-svn: 338041
Raphael Isemann [Thu, 26 Jul 2018 16:32:05 +0000 (16:32 +0000)]
Don't print two errors for unknown commands.
Summary:
We always print two error messages when we hit an unknown command. As the function
`CommandInterpreter::HandleCommand` that prints the second error message unconditionally called the `CommandInterpreter::ResolveCommandImpl` before (which prints the first error message), we can just remove
that second error message.
Fixes https://bugs.llvm.org/show_bug.cgi?id=38312
Reviewers: labath
Reviewed By: labath
Subscribers: labath, lldb-commits
Differential Revision: https://reviews.llvm.org/D49831
llvm-svn: 338040
Alexey Bataev [Thu, 26 Jul 2018 16:29:52 +0000 (16:29 +0000)]
[DEBUGINFO, NVPTX] Emit correct debug information for local variables.
Summary:
NVPTX target dos not use register-based frame information. Instead it
relies on the artificial local_depot that is used instead of the frame
and the data for variables must be emitted relatively to this
local_depot.
Reviewers: tra, jlebar, echristo
Subscribers: jholewinski, aprantl, JDevlieghere, llvm-commits
Differential Revision: https://reviews.llvm.org/D45963
llvm-svn: 338039
Sanjay Patel [Thu, 26 Jul 2018 16:14:53 +0000 (16:14 +0000)]
[InstCombine] add tests for udiv with common factor; NFC
This fold is mentioned in PR38239:
https://bugs.llvm.org/show_bug.cgi?id=38239
The general case probably belongs in -reassociate, but given that we do
basic reassociation optimizations similar to this in instcombine already,
we might as well be consistent within instcombine and handle this pattern?
llvm-svn: 338038
Ilya Biryukov [Thu, 26 Jul 2018 16:13:52 +0000 (16:13 +0000)]
[clangd] Use 'const Twine&' instead of 'Twine'. NFC
To fix clang-tidy warning
llvm-svn: 338037
Alexey Bataev [Thu, 26 Jul 2018 16:10:05 +0000 (16:10 +0000)]
[DEBUGINFO, NVPTX] Set `DW_AT_frame_base` to `DW_OP_call_frame_cfa`.
Summary:
For NVPTX target the value of `DW_AT_frame_base` attribute must be set
to `DW_OP_call_frame_cfa`.
Reviewers: tra, jlebar, echristo
Subscribers: jholewinski, JDevlieghere, llvm-commits
Differential Revision: https://reviews.llvm.org/D45785
llvm-svn: 338036
James Henderson [Thu, 26 Jul 2018 15:54:53 +0000 (15:54 +0000)]
Revert r338027 to pacify build bot
llvm-svn: 338035
Michael Kruse [Thu, 26 Jul 2018 15:31:41 +0000 (15:31 +0000)]
[ADT] Replace std::isprint by llvm::isPrint.
The standard library functions ::isprint/std::isprint have platform-
and locale-dependent behavior which makes LLVM's output less
predictable. In particular, regression tests my fail depending on the
implementation of these functions.
Implement llvm::isPrint in StringExtras.h with a standard behavior and
replace all uses of ::isprint/std::isprint by a call it llvm::isPrint.
The function is inlined and does not look up language settings so it
should perform better than the standard library's version.
Such a replacement has already been done for isdigit, isalpha, isxdigit
in r314883. gtest does the same in gtest-printers.cc using the following
justification:
// Returns true if c is a printable ASCII character. We test the
// value of c directly instead of calling isprint(), which is buggy on
// Windows Mobile.
inline bool IsPrintableAscii(wchar_t c) {
return 0x20 <= c && c <= 0x7E;
}
Similar issues have also been encountered by Julia:
https://github.com/JuliaLang/julia/issues/7416
I noticed the problem myself when on Windows isprint('\t') started to
evaluate to true (see https://stackoverflow.com/questions/
51435249) and
thus caused several unit tests to fail. The result of isprint doesn't
seem to be well-defined even for ASCII characters. Therefore I suggest
to replace isprint by a platform-independent version.
Differential Revision: https://reviews.llvm.org/D49680
llvm-svn: 338034
David Green [Thu, 26 Jul 2018 15:19:07 +0000 (15:19 +0000)]
[UnJ] Common some code. NFC
Create a processHeaderPhiOperands for analysing the instructions
in the aft blocks that must be moved before the loop.
Differential Revision: https://reviews.llvm.org/D49061
llvm-svn: 338033
Alexey Bataev [Thu, 26 Jul 2018 15:17:38 +0000 (15:17 +0000)]
[OPENMP] Force OpenMP 4.5 when compiling for offloading.
If the user requested compilation for OpenMP with the offloading
support, force the version of the OpenMP standard to 4.5 by default.
llvm-svn: 338032
Pavel Labath [Thu, 26 Jul 2018 14:36:07 +0000 (14:36 +0000)]
dwarfgen: Add support for generating the debug_str_offsets section, take 3
Previous version of this patch failed on darwin targets because of
different handling of cross-debug-section relocations. This fixes the
tests to emit the DW_AT_str_offsets_base attribute correctly in both
cases. Since doing this is a non-trivial amount of code, and I'm going
to need it in more than one test, I've added a helper function to the
dwarfgen DIE class to do it.
Original commit message follows:
The motivation for this is D49493, where we'd like to test details of
debug_str_offsets behavior which is difficult to trigger from a
traditional test.
This adds the plubming necessary for dwarfgen to generate this section.
The more interesting changes are:
- I've moved emitStringOffsetsTableHeader function from DwarfFile to
DwarfStringPool, so I can generate the section header more easily from
the unit test.
- added a new addAttribute overload taking an MCExpr*. This is used to
generate the DW_AT_str_offsets_base, which links a compile unit to the
offset table.
I've also added a basic test for reading and writing DW_form_strx forms.
Reviewers: dblaikie, JDevlieghere, probinson
Subscribers: llvm-commits, aprantl
Differential Revision: https://reviews.llvm.org/D49670
llvm-svn: 338031
Jonas Devlieghere [Thu, 26 Jul 2018 14:16:19 +0000 (14:16 +0000)]
[test] Disable dsymutil update test on windows
Apparently, the issue with dsymutil update functionality on Windows was
that Windows doesn't like dsymutil renaming files that have open handles
to them. This disables the new accelerator test and updates the comment
in the other two test.
We should be able to enable the tests again once we updated the
implementation to use TempFile::keep() to keep the temporary files in
MachOUtils.
A big thank you to Jeremy Morse from Sony for figuring this out and
bringing it to my attention.
llvm-svn: 338030