| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
This patch was reviewed in the llvm-commits list by Jim Grosbach.
llvm-svn: 159366
|
|
|
|
|
|
|
|
| |
pointer, but such folding encounters side-effects, ignore the side-effects
rather than performing them at runtime: CodeGen generates wrong code for
__builtin_object_size in that case.
llvm-svn: 157310
|
|
|
|
|
|
| |
LLVM r157255)
llvm-svn: 157256
|
|
|
|
| |
llvm-svn: 156630
|
|
|
|
|
|
| |
add a test for -fbounds-checking code generation
llvm-svn: 156474
|
|
|
|
|
|
| |
previously done for SSE builtins.
llvm-svn: 156296
|
|
|
|
|
|
| |
test suite failures.
llvm-svn: 155371
|
|
|
|
| |
llvm-svn: 155363
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r155047. See the LLVM log for the primary motivation:
http://llvm.org/viewvc/llvm-project?rev=155047&view=rev
Primary commit r154828:
- Several issues were raised in review, and fixed in subsequent
commits.
- Follow-up commits also reverted, and which should be folded into the
original before reposting:
- r154837: Re-add the 'undef BUILTIN' thing to fix the build.
- r154928: Fix build warnings, re-add (and correct) header and
license
- r154937: Typo fix.
Please resubmit this patch with the relevant LLVM resubmission.
llvm-svn: 155048
|
|
|
|
| |
llvm-svn: 154828
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
__atomic_test_and_set, __atomic_clear, plus a pile of undocumented __GCC_*
predefined macros.
Implement library fallback for __atomic_is_lock_free and
__c11_atomic_is_lock_free, and implement __atomic_always_lock_free.
Contrary to their documentation, GCC's __atomic_fetch_add family don't
multiply the operand by sizeof(T) when operating on a pointer type.
libstdc++ relies on this quirk. Remove this handling for all but the
__c11_atomic_fetch_add and __c11_atomic_fetch_sub builtins.
Contrary to their documentation, __atomic_test_and_set and __atomic_clear
take a first argument of type 'volatile void *', not 'void *' or 'bool *',
and __atomic_is_lock_free and __atomic_always_lock_free have an argument
of type 'const volatile void *', not 'void *'.
With this change, libstdc++4.7's <atomic> passes libc++'s atomic test suite,
except for a couple of libstdc++ bugs and some cases where libc++'s test
suite tests for properties which implementations have latitude to vary.
llvm-svn: 154640
|
|
|
|
|
|
|
|
|
| |
<stdatomic.h> header.
In passing, fix LanguageExtensions to note that C11 and C++11 are no longer
"upcoming standards" but are now actually standardized.
llvm-svn: 154513
|
|
|
|
|
|
| |
aren't supported at the moment. PR12040.
llvm-svn: 152891
|
|
|
|
|
|
| |
Patch by Silviu Baranga!
llvm-svn: 152788
|
|
|
|
|
|
| |
reported by Richard Smith.
llvm-svn: 151993
|
|
|
|
|
|
| |
types of the pointer arguments.
llvm-svn: 151927
|
|
|
|
| |
llvm-svn: 151150
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
match the behavior of GCC. Also add a test for these intrinsics, which
apparently have *zero* tests. =[ Not surprisingly, Clang crashed when
compiling these.
Fix the bug in CodeGen where we failed to bitcast the argument type to
x86mmx prior to calling the LLVM intrinsic. This fixes an assert on the
new 3dnow-builtins.c test.
This is one issue impacting the efforts to get Clang to emulate the
Microsoft intrinsics headers -- 3dnow intrinsics are implictitly made
available there.
llvm-svn: 150948
|
|
|
|
|
|
| |
CodeGenModule.
llvm-svn: 149943
|
|
|
|
|
|
|
|
| |
We had been generating load/store instructions with the default alignment
for the vector element type, even when the pointer argument had less alignment.
<rdar://problem/10538555>
llvm-svn: 149794
|
|
|
|
| |
llvm-svn: 149237
|
|
|
|
|
|
| |
are now in IntrinsicsX86.td.
llvm-svn: 149235
|
|
|
|
|
|
| |
connecting intrinsics and builtins in IntrinsicsX86.td.
llvm-svn: 149233
|
|
|
|
|
|
|
|
|
| |
There is really no reason to have these only available on x86. It's
just __builtin_c[tl]z for shorts.
Modernize the test while at it.
llvm-svn: 149183
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ARM supports clz and ctz directly and both operations have well-defined
results for zero. There is no disadvantage in performance to using the
defined-at-zero versions of llvm.ctlz/cttz intrinsics. We're running into
ARM-specific code written with the assumption that __builtin_clz(0) == 32,
even though that value is technically undefined. The code is failing now
because of llvm optimizations that are taking advantage of the undef
behavior (specifically svn r147255). There's nothing wrong with that
optimization on x86 where any incorrect assumptions about __builtin_clz(0)
will quickly be exposed. For ARM, though, optimizations based on that undef
behavior are likely to cause subtle bugs. Other targets with defined-at-zero
clz/ctz support may want to override the default behavior as well.
llvm-svn: 149086
|
|
|
|
|
|
|
|
|
|
| |
"use the new ConstantVector::getSplat method where it makes sense."
Also simplify a bunch of code to use the Builder->getInt32 instead
of doing it the hard and ugly way. Much more progress could be made
here, but I don't plan to do it.
llvm-svn: 148926
|
|
|
|
|
|
|
| |
Original log:
use the new ConstantVector::getSplat method where it makes sense.
llvm-svn: 148907
|
|
|
|
| |
llvm-svn: 148902
|
|
|
|
| |
llvm-svn: 148577
|
|
|
|
|
|
| |
__builtin_*abs. Patch by Ruben Van Boxem.
llvm-svn: 148340
|
|
|
|
|
|
| |
This allows -Wswitch-enum to find switches that need updating when these enums are modified.
llvm-svn: 148281
|
|
|
|
| |
llvm-svn: 147677
|
|
|
|
|
|
|
|
| |
builtins.
This fixes PR11711.
llvm-svn: 147655
|
|
|
|
|
|
| |
clients. No functionality change.
llvm-svn: 147318
|
|
|
|
| |
llvm-svn: 147263
|
|
|
|
| |
llvm-svn: 146857
|
|
|
|
| |
llvm-svn: 146413
|
|
|
|
|
|
|
|
|
| |
setting the is_zero_undef flag appropriately to true as that matches the
semantics of these GCC builtins.
This is the Clang side of r146357 in LLVM.
llvm-svn: 146358
|
|
|
|
| |
llvm-svn: 144065
|
|
|
|
|
|
|
|
|
| |
This patch just adds a simple NeonTypeFlags class to replace the various
hardcoded constants that had been used until now. Unfortunately I couldn't
figure out a good way to avoid duplicating that class between clang and
TableGen, but since it's small and rarely changes, that's not so bad.
llvm-svn: 144054
|
|
|
|
|
|
|
|
| |
implicitly perform an lvalue-to-rvalue conversion if used on an lvalue
expression. Also improve the documentation of Expr::Evaluate* to indicate which
of them will accept expressions with side-effects.
llvm-svn: 143263
|
|
|
|
| |
llvm-svn: 141632
|
|
|
|
|
|
|
|
|
|
|
| |
- Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions,
and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert
behaviour.
- Factor out evaluation of bitfield bit widths.
- Fix a few places which would evaluate an expression twice: once to determine
whether it is a constant expression, then again to get the value.
llvm-svn: 141561
|
|
|
|
|
|
|
|
| |
__builtin_llvm_memory_barrier.
__atomic_thread_fence will be landing soon as a replacement, wrapping around the new fence instruction.
llvm-svn: 141332
|
|
|
|
| |
llvm-svn: 140637
|
|
|
|
| |
llvm-svn: 140367
|
|
|
|
| |
llvm-svn: 139678
|
|
|
|
|
|
|
| |
the builtin is really just a predefined declaration. These are
totally valid to cast.
llvm-svn: 139657
|
|
|
|
|
|
| |
Make clang use Acquire loads and Release stores where necessary.
llvm-svn: 139650
|
|
|
|
| |
llvm-svn: 139648
|