Tim Northover [Thu, 24 Jul 2014 10:25:34 +0000 (10:25 +0000)]
MachO: use "arm64" as the triple name in modules.
Current versions of ld64 can't cope with "aarch64" being stored. I'm fixing
that, but in the transitionary period we'll need to still emit "arm64".
rdar://problem/
17783765
llvm-svn: 213852
Benjamin Kramer [Thu, 24 Jul 2014 10:23:33 +0000 (10:23 +0000)]
Plug memory leaks.
Most of the changes are mechanic std::unique_ptr insertions. All leaks were
detected by LeakSanitizer.
llvm-svn: 213851
Tilmann Scheller [Thu, 24 Jul 2014 09:55:46 +0000 (09:55 +0000)]
[ARM] Make the assembler reject unpredictable pre/post-indexed ARM STRH instructions.
The ARM ARM prohibits STRH instructions with writeback into the source register. With this commit this constraint is now enforced and we stop assembling STRH instructions with unpredictable behavior.
llvm-svn: 213850
Daniel Sanders [Thu, 24 Jul 2014 09:47:14 +0000 (09:47 +0000)]
[mips] Fix ll and sc instructions
Summary: The ll and sc instructions for r6 and non-r6 are misplaced. This patch fixes that.
Patch by Jyun-Yan You
Differential Revision: http://reviews.llvm.org/D4578
llvm-svn: 213847
Alexey Bataev [Thu, 24 Jul 2014 08:55:34 +0000 (08:55 +0000)]
[OPENMP] Initial parsing and sema analysis for clause 'seq_cst' of 'atomic' directive.
llvm-svn: 213846
Benjamin Kramer [Thu, 24 Jul 2014 08:34:42 +0000 (08:34 +0000)]
[clang-tidy] Fix a heap use-after-free bug detected by asan.
llvm-svn: 213845
Matt Arsenault [Thu, 24 Jul 2014 06:59:24 +0000 (06:59 +0000)]
R600: Match rcp node on pre-SI
llvm-svn: 213844
Matt Arsenault [Thu, 24 Jul 2014 06:59:20 +0000 (06:59 +0000)]
R600: Fix LowerSDIV24
Use ComputeNumSignBits instead of checking for i8 / i16 which only
worked when AMDIL was lying about having legal i8 / i16.
If an integer is known to fit in 24-bits, we can
do division faster with float ops.
llvm-svn: 213843
Alexey Bataev [Thu, 24 Jul 2014 06:46:57 +0000 (06:46 +0000)]
[OPENMP] Initial parsing and sema analysis for clause 'capture' in 'atomic' directive.
llvm-svn: 213842
David Majnemer [Thu, 24 Jul 2014 06:09:19 +0000 (06:09 +0000)]
MS ABI: -fno-rtti-data wasn't data-free enough
While -fno-rtti-data would correctly avoid referencing the RTTI complete
object locator in the VFTable itself, it would emit them anyway.
llvm-svn: 213841
Richard Trieu [Thu, 24 Jul 2014 04:24:50 +0000 (04:24 +0000)]
Add support for nullptr template arguments to template type diffing.
llvm-svn: 213840
Rafael Espindola [Thu, 24 Jul 2014 04:09:04 +0000 (04:09 +0000)]
Remove unused substitution.
llvm-svn: 213839
Richard Smith [Thu, 24 Jul 2014 03:42:38 +0000 (03:42 +0000)]
[modules] Slightly expand module semantics documentation.
llvm-svn: 213838
Richard Smith [Thu, 24 Jul 2014 03:25:00 +0000 (03:25 +0000)]
Simplify MacroInfo lifetime management. We don't need three different functions
to destroy one of these.
llvm-svn: 213837
Duncan P. N. Exon Smith [Thu, 24 Jul 2014 02:56:59 +0000 (02:56 +0000)]
IR: Fix comment from r213824
llvm-svn: 213836
Alexey Bataev [Thu, 24 Jul 2014 02:33:58 +0000 (02:33 +0000)]
[OPENMP] Fixed DSA detecting for function parameters: by default they must be private.
llvm-svn: 213835
Richard Smith [Thu, 24 Jul 2014 02:27:39 +0000 (02:27 +0000)]
Take the canonical type when forming a canonical template argument with
'nullptr' value. Fixes profiling of such template arguments to always give the
same value.
llvm-svn: 213834
NAKAMURA Takumi [Thu, 24 Jul 2014 02:11:24 +0000 (02:11 +0000)]
Remove a stray semicolon. [-Wpedantic]
llvm-svn: 213833
NAKAMURA Takumi [Thu, 24 Jul 2014 02:10:42 +0000 (02:10 +0000)]
Update library dependencies.
llvm-svn: 213832
Matt Arsenault [Thu, 24 Jul 2014 02:10:17 +0000 (02:10 +0000)]
R600: Implement enableClusterLoads()
llvm-svn: 213831
Kevin Qin [Thu, 24 Jul 2014 02:05:42 +0000 (02:05 +0000)]
[AArch64] Fix a bug generating incorrect instruction when building small vector.
This bug is introduced by r211144. The element of operand may be
smaller than the element of result, but previous commit can
only handle the contrary condition. This commit is to handle this
scenario and generate optimized codes like ZIP1.
llvm-svn: 213830
Jason Molenda [Thu, 24 Jul 2014 01:53:11 +0000 (01:53 +0000)]
Add debug asserts / sanity checks to
GDBRemoteRegisterContext::ReadRegisterBytes and
GDBRemoteRegisterContext::WriteRegisterBytes to ensure we don't try
to read/write off the end of the register buffer. This should never
happen but we've had some target confusion in the past where it
did; adding the checks is prudent to avoid crashing here if it happens
again.
<rdar://problem/
16450971>
<rdar://problem/
16458182>
llvm-svn: 213829
Jason Molenda [Thu, 24 Jul 2014 01:36:24 +0000 (01:36 +0000)]
Increase the gdb-remote packet timeout for the first packet we send
to the remote side (QStartNoAckMode) - it may take a little longer
than normal to get a reply.
In debugserver, hardcode the priority for several threads so they
aren't de-prioritized when a user app is using system resources.
Also, set the names of the threads.
<rdar://problem/
17509866>
llvm-svn: 213828
Jiangning Liu [Thu, 24 Jul 2014 01:29:59 +0000 (01:29 +0000)]
[AArch64] Disable some optimization cases for type conversion from sint to fp, because those optimization cases are micro-architecture dependent and only make sense for Cyclone. A new predicate Cyclone is introduced in .td file.
llvm-svn: 213827
Filipe Cabecinhas [Thu, 24 Jul 2014 01:28:21 +0000 (01:28 +0000)]
Fixed PR20411 - bug in getINSERTPS()
When we had a vector_shuffle where we had an input from each vector, we
could miscompile it because we were assuming the input from V2 wouldn't
be moved from where it was on the vector.
Added a test case.
llvm-svn: 213826
Richard Smith [Thu, 24 Jul 2014 01:13:23 +0000 (01:13 +0000)]
Remove unused Prev pointer from MacroInfo chain.
Remove pointless MICache: it only ever contained up to 1 object, and was only
non-empty when recovering from an error. There's no performance or memory win
from maintaining this cache.
llvm-svn: 213825
Duncan P. N. Exon Smith [Thu, 24 Jul 2014 00:53:19 +0000 (00:53 +0000)]
IR: Add Value::sortUseList()
Add `Value::sortUseList()`, templated on the comparison function to use.
The sort is an iterative merge sort that uses a binomial vector of
already-merged lists to limit the size overhead to `O(1)`.
This is part of PR5680.
llvm-svn: 213824
David Majnemer [Thu, 24 Jul 2014 00:26:04 +0000 (00:26 +0000)]
Add a .clang-format file to enhance formatting experience with clang-format
clang-format is a handy tool that formats code very intelligently. I'd
like to use it with LLDB but it requires a .clang-format file to inform
it about LLDB-specific formatting rules.
More information on these rules are here:
http://clang.llvm.org/docs/ClangFormatStyleOptions.html
Differential Revision: http://reviews.llvm.org/D4630
llvm-svn: 213823
David Majnemer [Thu, 24 Jul 2014 00:24:12 +0000 (00:24 +0000)]
ObjectFileMachO: Silence signed/unsigned comparison warning
File::SeekFromStart returns an off_t representing the position of the
file after seeking. This return value is always going to be one of two
values: the input or -1 in the case of failure.
ObjectFileMachO compares an expression of type off_t from the return of
File::SeekFromStart(segment.fileoff) and compares it for equality with
segment.fileoff.
The type of segment_command_64::fileoff is unsigned while off_t is
signed, comparing them emits a diagnostic under GCC.
Instead, we can just compare SeekFromSTart with -1 to see if we
successfully seeked.
Differential Revision: http://reviews.llvm.org/D4634
llvm-svn: 213822
Rui Ueyama [Thu, 24 Jul 2014 00:08:22 +0000 (00:08 +0000)]
Change the signature of insertElementAt and rename addInputElementFront
insertElementAt(x, END) does the identical thing as addInputElement(x),
so the only reasonable use of insertElementAt is to call it with the
other possible argument, BEGIN. That means the second parameter of the
function is just redundant. This patch is to remove the second
parameter and rename the function accordingly.
llvm-svn: 213821
Richard Smith [Wed, 23 Jul 2014 23:50:25 +0000 (23:50 +0000)]
Replace r213816's fix with a different one. It's not meaningful to call
isOnePastTheEnd on an invalid designator, so assert and push the check into the
one caller that wasn't already checking.
llvm-svn: 213820
Reid Kleckner [Wed, 23 Jul 2014 23:49:16 +0000 (23:49 +0000)]
Add a VS "14" msbuild toolset
This allows people to try clang inside MSBuild with the VS "14" CTP
releases.
Fixes PR20341.
Patch by Marcel Raad!
llvm-svn: 213819
Rui Ueyama [Wed, 23 Jul 2014 23:47:28 +0000 (23:47 +0000)]
[PECOFF] Simplify.
insertElementAt(x, END) is the same as addInputElement(x).
llvm-svn: 213818
Reid Kleckner [Wed, 23 Jul 2014 23:29:01 +0000 (23:29 +0000)]
Split -Winvalid-command-line-argument into -Wignored-optimization-argument
Reviewers: rsmith, nlewycky
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4636
llvm-svn: 213817
Reid Kleckner [Wed, 23 Jul 2014 23:24:25 +0000 (23:24 +0000)]
Add a missing Invalid check to SubobjectDesignator::isOnePastEnd()
The class seems to have an invariant that Entries is non-empty if
Invalid is false. It appears this method was previously private, and
all internal uses checked Invalid. Now there is an external caller, so
check Invalid to avoid array OOB underflow.
Fixes PR20420.
llvm-svn: 213816
Manman Ren [Wed, 23 Jul 2014 23:13:23 +0000 (23:13 +0000)]
SimplifyCFG: fix a bug in switch to table conversion
We use gep to access the global array "switch.table", and the table index
should be treated as unsigned. When the highest bit is 1, this commit
zero-extends the index to an integer type with larger size.
For a switch on i2, we used to generate:
%switch.tableidx = sub i2 %0, -2
getelementptr inbounds [4 x i64]* @switch.table, i32 0, i2 %switch.tableidx
It is incorrect when %switch.tableidx is 2 or 3. The fix is to generate
%switch.tableidx = sub i2 %0, -2
%switch.tableidx.zext = zext i2 %switch.tableidx to i3
getelementptr inbounds [4 x i64]* @switch.table, i32 0, i3 %switch.tableidx.zext
rdar://
17735071
llvm-svn: 213815
Rafael Espindola [Wed, 23 Jul 2014 22:54:28 +0000 (22:54 +0000)]
Fix the build when building with only the ARM backend.
llvm-svn: 213814
Rafael Espindola [Wed, 23 Jul 2014 22:43:22 +0000 (22:43 +0000)]
Document what backwards compatibility we provide for bitcode.
llvm-svn: 213813
NAKAMURA Takumi [Wed, 23 Jul 2014 22:38:25 +0000 (22:38 +0000)]
Let llvm/test/CodeGen/X86/avx512*-mask-op.ll(s) aware of Win32 x64 calling convention.
llvm-svn: 213812
Eric Christopher [Wed, 23 Jul 2014 22:34:13 +0000 (22:34 +0000)]
Fix indenting.
llvm-svn: 213811
Chandler Carruth [Wed, 23 Jul 2014 22:29:19 +0000 (22:29 +0000)]
[x86] Rip out some broken test cases for avx512 i1 store support.
It isn't reasonable to test storing things using undef pointers --
storing through those is at best "good luck" and really should be
transformed to "unreachable". Random changes in the combiner can
randomly break these tests for no good reason. I'm following up on the
original commit regarding the right long-term strategy here.
llvm-svn: 213810
Eric Christopher [Wed, 23 Jul 2014 22:27:10 +0000 (22:27 +0000)]
Reorganize and simplify local variables.
llvm-svn: 213809
Rafael Espindola [Wed, 23 Jul 2014 22:26:07 +0000 (22:26 +0000)]
Finish inverting the MC -> Object dependency.
There were still some disassembler bits in lib/MC, but their use of Object
was only visible in the includes they used, not in the symbols.
llvm-svn: 213808
Juergen Ributzka [Wed, 23 Jul 2014 22:23:17 +0000 (22:23 +0000)]
[RuntimeDyld][AArch64] Update relocation tests and also add a simple GOT test.
llvm-svn: 213807
Eric Christopher [Wed, 23 Jul 2014 22:12:03 +0000 (22:12 +0000)]
Remove the query for TargetMachine and TargetInstrInfo since we're
already inside TargetInstrInfo.
llvm-svn: 213806
David Blaikie [Wed, 23 Jul 2014 22:09:29 +0000 (22:09 +0000)]
ArgPromo+DebugInfo: Handle updating debug info over multiple applications of argument promotion.
While the subprogram map cache used by Dead Argument Elimination works
there, I made a mistake when reusing it for Argument Promotion in
r212128 because ArgPromo may transform functions more than once whereas
DAE transforms each function only once, removing all the dead arguments
in one go.
To address this, ensure that the map is updated after each argument
promotion.
In retrospect it might be a little wasteful to create a map of all
subprograms when only handling a single CGSCC, but the alternative is
walking the debug info for each function in the CGSCC that gets updated.
It's not clear to me what the right tradeoff is there, but since the
current tradeoff seems to be working OK (and the code to keep things
updated is very cheap), let's stick with that for now.
llvm-svn: 213805
Rui Ueyama [Wed, 23 Jul 2014 21:41:20 +0000 (21:41 +0000)]
[PECOFF] Add the entry point file at the right place.
The entry point file needs to be processed after all other
object files and before all .lib files. It was processed
after .lib files. That caused an issue that the entry point
function was not resolved from the standard library files.
llvm-svn: 213804
David Blaikie [Wed, 23 Jul 2014 21:30:59 +0000 (21:30 +0000)]
Test debug info in arg promotion with an actual promotion case, rather than a degenerate arg promotion that's actually DAE performed by ArgPromo
Also the debug location I had here was bogus, describing the location of
the call site as in the callee - and unnecessary, so just drop it.
llvm-svn: 213803
Rui Ueyama [Wed, 23 Jul 2014 20:51:04 +0000 (20:51 +0000)]
[PECOFF] Fix entry point address.
Because of a bug, the entry point address in the PE/COFF header
was not correct.
llvm-svn: 213802
Jim Grosbach [Wed, 23 Jul 2014 20:46:32 +0000 (20:46 +0000)]
Use an explicit triple in testcase.
Make the test work better on non-darwin hosts. Hopefully.
llvm-svn: 213801
Jim Grosbach [Wed, 23 Jul 2014 20:41:43 +0000 (20:41 +0000)]
[X86,AArch64] Extend vcmp w/ unary op combine to work w/ more constants.
The transform to constant fold unary operations with an AND across a
vector comparison applies when the constant is not a splat of a scalar
as well.
llvm-svn: 213800
Jim Grosbach [Wed, 23 Jul 2014 20:41:38 +0000 (20:41 +0000)]
X86: restrict combine to when type sizes are safe.
The folding of unary operations through a vector compare and mask operation
is only safe if the unary operation result is of the same size as its input.
For example, it's not safe for [su]itofp from v4i32 to v4f64.
llvm-svn: 213799
Jim Grosbach [Wed, 23 Jul 2014 20:41:31 +0000 (20:41 +0000)]
DAG: fp->int conversion for non-splat constants.
Constant fold the lanes of the input constant build_vector individually
so we correctly handle when the vector elements are not all the same
constant value.
PR20394
llvm-svn: 213798
Johannes Doerfert [Wed, 23 Jul 2014 20:26:25 +0000 (20:26 +0000)]
[Fix] Typo during refactoring
llvm-svn: 213795
Justin Holewinski [Wed, 23 Jul 2014 20:23:49 +0000 (20:23 +0000)]
[NVPTX] Add some extra tests for mul.wide to test non-power-of-two source types
llvm-svn: 213794
Justin Holewinski [Wed, 23 Jul 2014 20:23:47 +0000 (20:23 +0000)]
[NVPTX] Silence a GCC warning found by the buildbots
The cast to NVPTXTargetLowering was missing a 'const', but let's
just access the right pointer through the subtarget anyway.
llvm-svn: 213793
Johannes Doerfert [Wed, 23 Jul 2014 20:17:28 +0000 (20:17 +0000)]
[Refactor] IslAst and payload struct
+ Renamed context into build when it's the isl_ast_build
+ Use the IslAstInfo functions to extract the schedule of a node
+ Use the IslAstInfo functions to extract the build/context of a node
+ Move the payload struct into the IslAstInfo class
+ Use a constructor and destructor (also new and delete) to
allocate/initialize the payload struct
llvm-svn: 213792
Alexey Samsonov [Wed, 23 Jul 2014 20:07:26 +0000 (20:07 +0000)]
Build libcxx-tsan only if TSan is supported on host architecture
llvm-svn: 213791
Richard Smith [Wed, 23 Jul 2014 20:07:08 +0000 (20:07 +0000)]
PR20228: don't retain a pointer to a vector element after the container has been resized.
llvm-svn: 213790
Mark Heffernan [Wed, 23 Jul 2014 20:05:44 +0000 (20:05 +0000)]
Do not add unroll disable metadata after unrolling pass for loops with #pragma clang loop unroll(full).
llvm-svn: 213789
Juergen Ributzka [Wed, 23 Jul 2014 20:03:13 +0000 (20:03 +0000)]
[FastISel][AArch64] Fix return type in FastLowerCall.
I used the wrong method to obtain the return type inside FinishCall. This fix
simply uses the return type from FastLowerCall, which we already determined to
be a valid type.
Reduced test case from Chad. Thanks.
llvm-svn: 213788
Alexey Samsonov [Wed, 23 Jul 2014 19:40:54 +0000 (19:40 +0000)]
Fix unused-variable warning
llvm-svn: 213786
Dan Albert [Wed, 23 Jul 2014 19:32:03 +0000 (19:32 +0000)]
Fix ctype_base::xdigit for Android.
Android's ctype implementation comes from openbsd, which for some reason
doesn't consider numbers to be hex digits.
llvm-svn: 213785
Justin Holewinski [Wed, 23 Jul 2014 18:46:03 +0000 (18:46 +0000)]
[NVPTX] mul.wide generation works for any smaller integer source types, not just the next smaller power of two
llvm-svn: 213784
Alexey Samsonov [Wed, 23 Jul 2014 18:44:54 +0000 (18:44 +0000)]
[UBSan] Add the ability to dump call stacks to -fsanitize=vptr
This change introduces the first UBSan-specific runtime flag: print_stacktrace
(off by default). It can be set in UBSAN_OPTIONS to unwind and print call stacks
in addition to diagnostic messages. For now these stacks are printed only
in vptr checker.
This change is based on http://reviews.llvm.org/D4410 by Byoungyoung Lee!
llvm-svn: 213783
Alexey Samsonov [Wed, 23 Jul 2014 18:32:55 +0000 (18:32 +0000)]
[UBSan] Introduce UBSAN_OPTIONS environment variable.
If UBSan is run in a standalone mode (w/o any other sanitizer), it
still uses functions from sanitizer_common, some of which depend on
the value of runtime flags. Allow to override the default values of these
flags with UBSAN_OPTIONS variable. In particular, UBSAN_OPTIONS=symbolize=0
can be used to turn off online symbolization.
llvm-svn: 213782
Enrico Granata [Wed, 23 Jul 2014 18:18:38 +0000 (18:18 +0000)]
Ensure that if some unspecified person were to pass in an invalid architecture when trying to create a target, that it would fail, but not cause LLDB to crash.
llvm-svn: 213781
Robert Khasanov [Wed, 23 Jul 2014 18:17:49 +0000 (18:17 +0000)]
[SKX] Added missed test files for rev 213757
llvm-svn: 213780
Johannes Doerfert [Wed, 23 Jul 2014 18:14:43 +0000 (18:14 +0000)]
[Refactor] Unify IslAst print methods
+ Add const annotations to some member functions
llvm-svn: 213779
Greg Clayton [Wed, 23 Jul 2014 18:12:06 +0000 (18:12 +0000)]
Make sure we don't crash if someone (E.G.) comments out on entry from g_core_definitions[] without removing the ArchSpec::Core enumeration when submitting from source.
We now catch the issue with a static_assert() at compile time and use llvm::array_lengthof(g_core_definitions) as well.
<rdar://problem/
17767541>
llvm-svn: 213778
Saleem Abdulrasool [Wed, 23 Jul 2014 18:09:31 +0000 (18:09 +0000)]
AsmParser: remove deprecated LLIR support
linker_private and linker_private_weak were deprecated in 3.5. Remove support
for them now that the 3.5 branch has been created.
llvm-svn: 213777
Saleem Abdulrasool [Wed, 23 Jul 2014 18:09:28 +0000 (18:09 +0000)]
ExecutionEngine: remove a stray semicolon
Detected via GCC 4.8 [-Wpedantic].
llvm-svn: 213776
Mark Heffernan [Wed, 23 Jul 2014 17:59:07 +0000 (17:59 +0000)]
Rename metadata in test which was missed when renaming loop unroll metadata in r213771.
llvm-svn: 213775
Robert Khasanov [Wed, 23 Jul 2014 17:42:13 +0000 (17:42 +0000)]
[SKX] Fix lowercase "error:" in rev 213757
llvm-svn: 213774
Justin Holewinski [Wed, 23 Jul 2014 17:40:45 +0000 (17:40 +0000)]
[NVPTX] Make sure we do not generate MULWIDE ISD nodes when optimizations are disabled
With optimizations disabled, we disable the isel patterns for mul.wide; but we
were still generating MULWIDE ISD nodes. Now, we only try to generate MULWIDE
ISD nodes in DAGCombine if the optimization level is not zero.
llvm-svn: 213773
Mark Heffernan [Wed, 23 Jul 2014 17:31:37 +0000 (17:31 +0000)]
In unroll pragma syntax and loop hint metadata, change "enable" forms to a new form using the string "full".
llvm-svn: 213772
Mark Heffernan [Wed, 23 Jul 2014 17:31:31 +0000 (17:31 +0000)]
In unroll pragma syntax and loop hint metadata, change "enable" forms to a new form using the string "full".
llvm-svn: 213771
Alex Lorenz [Wed, 23 Jul 2014 17:18:05 +0000 (17:18 +0000)]
test commit: remove trailing space
llvm-svn: 213770
Artyom Skrobov [Wed, 23 Jul 2014 17:09:26 +0000 (17:09 +0000)]
Fix test/Driver/cl-x86-flags.c by providing explicit --target
This isn't very neat, but we haven't found any better ways to
make this test work with non-X86 default target.
llvm-svn: 213769
Marshall Clow [Wed, 23 Jul 2014 16:58:25 +0000 (16:58 +0000)]
Update the synopsis and comments with the results of LWG #2255. No code to back it up at the moment; just comments
llvm-svn: 213768
Ben Langmuir [Wed, 23 Jul 2014 15:30:23 +0000 (15:30 +0000)]
Add stopgap option -fmodule-implementation-of <name>
This flag specifies that we are building an implementation file of the
module <name>, preventing importing <name> as a module. This does not
consider this to be the 'current module' for the purposes of doing
modular checks like decluse or non-modular-include warnings, unlike
-fmodule-name.
This is needed as a stopgap until:
1) we can resolve relative includes to a VFS-mapped module (or can
safely import a header textually and as part of a module)
and ideally
2) we can safely do incremental rebuilding when implementation files
import submodules.
llvm-svn: 213767
Todd Fiala [Wed, 23 Jul 2014 15:16:35 +0000 (15:16 +0000)]
Add kalimba architecture checking to TestImageListMultiArchitecture
Verify that ObjectFileELF's kalimba detection works regardless
of the host platform.
Change by Matthew Gardiner.
llvm-svn: 213763
Tom Stellard [Wed, 23 Jul 2014 15:16:21 +0000 (15:16 +0000)]
Implement sin builtin for float types
This double version still uses @llvm.sin.
llvm-svn: 213762
Tom Stellard [Wed, 23 Jul 2014 15:16:18 +0000 (15:16 +0000)]
Implement cos builtin for float types
The double version still uses @llvm.cos.
llvm-svn: 213761
Tom Stellard [Wed, 23 Jul 2014 15:16:16 +0000 (15:16 +0000)]
Implement atan2 builtin
llvm-svn: 213760
Tom Stellard [Wed, 23 Jul 2014 15:16:13 +0000 (15:16 +0000)]
Implement atan builtin
llvm-svn: 213759
Chad Rosier [Wed, 23 Jul 2014 14:57:52 +0000 (14:57 +0000)]
[AArch64] Lower sdiv x, pow2 using add + select + shift.
The target-independent DAGcombiner will generate:
asr w1, X, #31 w1 = splat sign bit.
add X, X, w1, lsr #28 X = X + 0 or pow2-1
asr w0, X, asr #4 w0 = X/pow2
However, the add + shifts is expensive, so generate:
add w0, X, 15 w0 = X + pow2-1
cmp X, wzr X - 0
csel X, w0, X, lt X = (X < 0) ? X + pow2-1 : X;
asr w0, X, asr 4 w0 = X/pow2
llvm-svn: 213758
Robert Khasanov [Wed, 23 Jul 2014 14:49:42 +0000 (14:49 +0000)]
[SKX] Enabling mask instructions: encoding, lowering
KMOVB, KMOVW, KMOVD, KMOVQ, KNOTB, KNOTW, KNOTD, KNOTQ
Reviewed by Elena Demikhovsky <elena.demikhovsky@intel.com>
llvm-svn: 213757
Todd Fiala [Wed, 23 Jul 2014 14:48:41 +0000 (14:48 +0000)]
Improve documentation on triple encoding expectations for qHostInfo response.
Change by Matthew Gardiner.
llvm-svn: 213756
Todd Fiala [Wed, 23 Jul 2014 14:37:35 +0000 (14:37 +0000)]
Update lldb to track recent Triple arm64 enum removal and collapse into aarch64.
See the following llvm change for details:
r213743 | tnorthover | 2014-07-23 05:32:47 -0700 (Wed, 23 Jul 2014) | 9 lines
AArch64: remove arm64 triple enumerator.
This change fixes build breaks on Linux and MacOSX lldb.
llvm-svn: 213755
Tim Northover [Wed, 23 Jul 2014 13:59:12 +0000 (13:59 +0000)]
ARM: spot SBFX-compatbile code expressed with sign_extend_inreg
We were assuming all SBFX-like operations would have the shl/asr form, but
often when the field being extracted is an i8 or i16, we end up with a
SIGN_EXTEND_INREG acting on a shift instead. Simple enough to check for though.
llvm-svn: 213754
Tim Northover [Wed, 23 Jul 2014 13:59:07 +0000 (13:59 +0000)]
ARM: add patterns for [su]xta[bh] from just a shift.
Although the final shifter operand is a rotate, this actually only matters for
the half-word extends when the amount == 24. Otherwise folding a shift in is
just as good.
llvm-svn: 213753
James Molloy [Wed, 23 Jul 2014 13:33:00 +0000 (13:33 +0000)]
Enable partial libcall inlining for all targets by default.
This pass attempts to speculatively use a sqrt instruction if one exists on the target, falling back to a libcall if the target instruction returned NaN.
This was enabled for MIPS and System-Z, but is well guarded and is good for most targets - GCC does this for (that I've checked) X86, ARM and AArch64.
llvm-svn: 213752
Daniel Jasper [Wed, 23 Jul 2014 13:17:47 +0000 (13:17 +0000)]
Prevent assert in ASTMatchFinder.
If nodes without memoization data (e.g. TypeLocs) are bound to specific
names, that effectively prevents memoization as those elements cannot be
compared effectively. If it is tried anyway, this can lead to an assert
as demonstrated in the new test.
In the long term, the better solution will be to enable DynTypedNodes
without memoization data. For now, simply skip memoization instead.
llvm-svn: 213751
Tilmann Scheller [Wed, 23 Jul 2014 13:03:47 +0000 (13:03 +0000)]
[ARM] Make the assembler reject unpredictable pre/post-indexed ARM STRB instructions.
The ARM ARM prohibits STRB instructions with writeback into the source register. With this commit this constraint is now enforced and we stop assembling STRB instructions with unpredictable behavior.
llvm-svn: 213750
Daniel Sanders [Wed, 23 Jul 2014 12:59:26 +0000 (12:59 +0000)]
Added release notes for MIPS.
llvm-svn: 213749
Tim Northover [Wed, 23 Jul 2014 12:58:11 +0000 (12:58 +0000)]
AArch64: remove "arm64_be" support in favour of "aarch64_be".
There really is no arm64_be: it was a useful fiction to test big-endian support
while both backends existed in parallel, but now the only platform that uses
the name (iOS) doesn't have a big-endian variant, let alone one called
"arm64_be".
llvm-svn: 213748
Tim Northover [Wed, 23 Jul 2014 12:57:31 +0000 (12:57 +0000)]
AArch64: use aarch64_be instead of arm64_be in all tests.
arm64_be doesn't really exist; it was useful for testing while AArch64 and
ARM64 were separate, but now the only real way to refer to the system is
aarch64_be.
llvm-svn: 213747
Tilmann Scheller [Wed, 23 Jul 2014 12:38:17 +0000 (12:38 +0000)]
[ARM] Make the assembler reject unpredictable pre/post-indexed ARM STR instructions.
The ARM ARM prohibits STR instructions with writeback into the source register. With this commit this constraint is now enforced and we stop assembling STR instructions with unpredictable behavior.
llvm-svn: 213745
Tim Northover [Wed, 23 Jul 2014 12:32:58 +0000 (12:32 +0000)]
AArch64: update Clang for merged arm64/aarch64 triples.
The main subtlety here is that the Darwin tools still need to be given "-arch
arm64" rather than "-arch aarch64". Fortunately this already goes via a custom
function to handle weird edge-cases in other architectures, and it tested.
I removed a few arm64_be tests because that really isn't an interesting thing
to worry about. No-one using big-endian is also referring to the target as
arm64 (at least as far as toolchains go). Mostly they date from when arm64 was
a separate target and we *did* need a parallel name simply to test it at all.
Now aarch64_be is sufficient.
llvm-svn: 213744