Alexander Kornienko [Fri, 10 Feb 2017 17:00:27 +0000 (17:00 +0000)]
Add a virtual destructor for LegalizerInfo.
lib/Target/X86/X86TargetMachine.cpp has a code that deletes an instance of a
LegalizerInfo descendant via a pointer to base.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294757
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Fri, 10 Feb 2017 16:34:17 +0000 (16:34 +0000)]
Check full codegen in CodeGen/X86/i256-add.ll NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294756
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthew Simpson [Fri, 10 Feb 2017 16:15:26 +0000 (16:15 +0000)]
[LV] Remove type restriction for vector phi creation
We previously only created a vector phi node for an induction variable if its
type matched the type of the canonical induction variable.
Differential Revision: https://reviews.llvm.org/D29776
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294755
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Fri, 10 Feb 2017 15:33:13 +0000 (15:33 +0000)]
[Hexagon] Replace instruction definitions with auto-generated ones
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294753
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 10 Feb 2017 15:13:12 +0000 (15:13 +0000)]
Move some error handling down to MCStreamer.
This makes sure we get the same redefinition rules regardless of who
is printing (asm parser, codegen) and to what (asm, obj).
This fixes an unintentional regression in r293936.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294752
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 10 Feb 2017 14:56:12 +0000 (14:56 +0000)]
[X86][SSE] Added chained FDIV test cases for D26855
Tests to demonstrate throughput-latency decision between div and rcp on faster hardware such as Haswell
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294750
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 10 Feb 2017 14:37:25 +0000 (14:37 +0000)]
[DAGCombine] Allow vector constant folding of any value type before type legalization
The patch comes in 2 parts:
1 - it makes use of the SelectionDAG::NewNodesMustHaveLegalTypes flag to tell when it can safely constant fold illegal types.
2 - it correctly resets SelectionDAG::NewNodesMustHaveLegalTypes at the start of each call to SelectionDAGISel::CodeGenAndEmitDAG so all the pre-legalization stages can make use of it - not just the first basic block that gets handled.
Fix for PR30760
Differential Revision: https://reviews.llvm.org/D29568
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294749
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 10 Feb 2017 14:27:59 +0000 (14:27 +0000)]
[X86][SSE] Use SDValue::getConstantOperandVal helper. NFCI.
Also reordered an if statement to test low cost comparisons first
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294748
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 10 Feb 2017 14:04:11 +0000 (14:04 +0000)]
[X86][SSE] Add support for extracting target constants from BUILD_VECTOR
In some cases we call getTargetConstantBitsFromNode for nodes that haven't been lowered from BUILD_VECTOR yet
Note: We're getting very close to being able to move most of the constant extraction code from getTargetShuffleMaskIndices into getTargetConstantBitsFromNode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294746
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 10 Feb 2017 13:16:01 +0000 (13:16 +0000)]
[X86][SSE] Add missing comment describing combing to SHUFPS. NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294745
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 10 Feb 2017 08:48:50 +0000 (08:48 +0000)]
[PM] Relax the patterns used in the new test I added because some
compilers don't print the typedef name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294729
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 10 Feb 2017 08:26:58 +0000 (08:26 +0000)]
[PM] Fix a bug in the new loop PM when handling functions with no loops.
Without any loops, we don't even bother to build the standard analyses
used by loop passes. Without these, we can't run loop analyses or
invalidate them properly. Unfortunately, we did these things in the
wrong order which would allow a loop analysis manager's proxy to be
built but then not have the standard analyses built. When we went to do
the invalidation in the proxy thing would fall apart. In the test case
provided, it would actually crash.
The fix is to carefully check for loops first, and to in fact build the
standard analyses before building the proxy. This allows it to
correctly trigger invalidation for those standard analyses.
An alternative might seem to be to look at whether there are any loops
when doing invalidation, but this doesn't work when during the loop
pipeline run we delete the last loop. I've even included that as a test
case. It is both simpler and more robust to defer building the proxy
until there are definitely the standard set of analyses and indeed
loops.
This bug was uncovered by enabling GlobalsAA in the pipeline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294728
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Fri, 10 Feb 2017 07:33:14 +0000 (07:33 +0000)]
add #ifdef, fix compilation error in case LLVM_BUILD_GLOBAL_ISEL=OFF
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294726
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 10 Feb 2017 07:21:06 +0000 (07:21 +0000)]
Fix doc for `-opt-bisect-limit`: the LTO option is linker specific
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294725
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Fri, 10 Feb 2017 07:05:56 +0000 (07:05 +0000)]
[X86][GlobalISel] Add general-purpose Register Bank
Summary:
[X86][GlobalISel] Add general-purpose Register Bank.
Add trivial handling of G_ADD legalization .
Add Regestry Bank selection for COPY and G_ADD instructions
Reviewers: rovka, zvi, ab, t.p.northover, qcolombet
Reviewed By: qcolombet
Subscribers: qcolombet, mgorny, dberris, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D29771
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294723
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Fri, 10 Feb 2017 06:59:25 +0000 (06:59 +0000)]
[XRay][graph] Disambiguate name of type from member name
Follow-up to D29005.
Differential Revision: https://reviews.llvm.org/D29005
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294722
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Fri, 10 Feb 2017 06:36:08 +0000 (06:36 +0000)]
[XRay] A graph Class for the llvm-xray graph
Summary:
In preparation for graph comparison and filtering, this is a library for
representing graphs in LLVM. This will enable easier encapsulation and reuse
of graphs in llvm-xray.
Depends on D28999, D28225
Reviewers: dblaikie, dberris
Reviewed By: dberris
Subscribers: mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D29005
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294717
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Fri, 10 Feb 2017 06:12:06 +0000 (06:12 +0000)]
[LoopUnswitch] Remove BFI usage (dead code)
Chandler mentioned at the last social that the need for BFI in the new pass manager was causing a slight hiccup for this pass. Given this code has been checked in, but off for over a year, it makes sense to just remove it for now.
Note that there's nothing wrong with the general idea - it's actually a quite good one - and once we have the infrastructure in place to implement this without the full recompuation on every loop, we absolutely should.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294715
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Fri, 10 Feb 2017 06:05:46 +0000 (06:05 +0000)]
Revert "[XRay] A graph Class for the llvm-xray graph"
Broke tests, reverting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294714
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Fri, 10 Feb 2017 05:40:37 +0000 (05:40 +0000)]
[XRay] A graph Class for the llvm-xray graph
Summary:
In preparation for graph comparison and filtering, this is a library for
representing graphs in LLVM. This will enable easier encapsulation and reuse
of graphs in llvm-xray.
Depends on D28999, D28225
Reviewers: dblaikie, dberris
Reviewed By: dberris
Subscribers: mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D29005
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294713
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 10 Feb 2017 05:05:57 +0000 (05:05 +0000)]
[SelectionDAG] Dump the DAG after legalizing vector ops and after the second type legalization
Summary:
With -debug, we aren't dumping the DAG after legalizing vector ops. In particular, on X86 with AVX1 only, we don't dump the DAG after we split 256-bit integer ops into pairs of 128-bit ADDs since this occurs during vector legalization.
I'm only dumping if the legalize vector ops changes something since we don't print anything during legalize vector ops. So this dump shows up right after the first type-legalization dump happens. So if nothing changed this second dump is unnecessary.
Having said that though, I think we should probably fix legalize vector ops to log what its doing.
Reviewers: RKSimon, eli.friedman, spatel, arsenm, chandlerc
Reviewed By: RKSimon
Subscribers: wdng, llvm-commits
Differential Revision: https://reviews.llvm.org/D29554
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294711
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Fri, 10 Feb 2017 04:50:18 +0000 (04:50 +0000)]
opt-viewer: fix HtmlFormatter encoding
Summary: Small fix to HtmlFormatter, defaults to ascii encoding, so utf-8 output may get `UnicodeEncodeError: 'ascii' codec can't encode character ... ordinal not in range(128)` during write.
Patch by Brian Cain!
Reviewers: anemet, fhahn
Reviewed By: anemet
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D29802
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294710
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 10 Feb 2017 04:35:32 +0000 (04:35 +0000)]
Temporarily revert "For X86-64 linux and PPC64 linux align int128 to 16 bytes."
until we can get better TargetMachine::isCompatibleDataLayout to compare - otherwise
we can't code generate existing bitcode without a string equality data layout.
This reverts commit r294702.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294709
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 10 Feb 2017 04:00:17 +0000 (04:00 +0000)]
[GlobalISel] Return an Expected<RuleMatcher> for each SDAG pattern. NFC.
Instead of emitting the matcher code directly, return the rule matcher
and the skip reason as an Expected<RuleMatcher>.
This will let us record all matchers and process them before emission.
It's a somewhat unconventional use of Error, but it's nicer than, say,
std::pair, because of the bool conversions.
Differential Revision: https://reviews.llvm.org/D29743
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294706
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 10 Feb 2017 03:48:50 +0000 (03:48 +0000)]
SubtargetFeature: Increase MAX_SUBTARGET_FEATURES
The ARM target is getting really close to the current limit of 128
subtarget features already breaking out of tree enhancements. Increase
the size once more to 196.
I filed http://llvm.org/PR31926 to request a proper solution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294704
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 10 Feb 2017 03:32:21 +0000 (03:32 +0000)]
For X86-64 linux and PPC64 linux align int128 to 16 bytes.
For other platforms we should find out what they need and likely
make the same change, however, a smaller additional change is easier
for platforms we know have it specified in the ABI. As part of this
rewrite some of the handling in the backends for data layout and update
a bunch of testcases.
Based on a patch by Simonas Kazlauskas!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294702
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Fri, 10 Feb 2017 02:43:09 +0000 (02:43 +0000)]
[TableGen][AsmWriterEmitter] Use a deterministic order to sort InstrAliases
Inside an alias group, when ordering instruction aliases, we rely
on the priority field to sort them.
When the priority is not set or more generally when there is a tie between
two aliases, we used to rely on the lexicographic order. However, this
order can change for the anonymous records when more instruction, intrinsic,
etc. are inserted.
For instance, given two anonymous records r1 and r2 with respective name
A_999 and A_1000, their lexicography order will be r2 then r1. Now, if
an instruction is added before them, their name will become respectively
A_1000 and A_1001, thus the lexicography order will be r1 then r2, i.e.,
it changed.
If that happens in an alias group, the assembly output would prefer a
different alias for no apparent good reasons.
A way to fix that is to use proper priority for all aliases, but we
can also make the tie breaker comparison smarter and use a deterministic
ordering. This is what this patch does.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294695
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 10 Feb 2017 02:42:31 +0000 (02:42 +0000)]
AMDGPU: Fix trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294694
91177308-0d34-0410-b5e6-
96231b3b80d8
Wei Ding [Fri, 10 Feb 2017 02:15:29 +0000 (02:15 +0000)]
AMDGPU : Add trap handler support.
Differential Revision: http://reviews.llvm.org/D26010
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294692
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Fri, 10 Feb 2017 02:07:58 +0000 (02:07 +0000)]
[AMDGPU] Override PSet for M0
This change returns empty PSet list for M0 register. Otherwise its
PSet as defined by tablegen is SReg_32. This results in incorrect
register pressure calculation every time an instruction uses M0.
Such uses count as SReg_32 PSet and inadequately increase pressure
on SGPRs.
Differential Revision: https://reviews.llvm.org/D29798
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294691
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Fiselier [Fri, 10 Feb 2017 01:59:20 +0000 (01:59 +0000)]
[CMake] Fix pthread handling for out-of-tree builds
LLVM defines `PTHREAD_LIB` which is used by AddLLVM.cmake and various projects
to correctly link the threading library when needed. Unfortunately
`PTHREAD_LIB` is defined by LLVM's `config-ix.cmake` file which isn't installed
and therefore can't be used when configuring out-of-tree builds. This causes
such builds to fail since `pthread` isn't being correctly linked.
This patch attempts to fix that problem by renaming and exporting
`LLVM_PTHREAD_LIB` as part of`LLVMConfig.cmake`. I renamed `PTHREAD_LIB`
because It seemed likely to cause collisions with downstream users of
`LLVMConfig.cmake`.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294690
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcos Pividori [Fri, 10 Feb 2017 01:40:28 +0000 (01:40 +0000)]
[libFuzzer] Export external functions on tests.
We need to export external functions so they are found when calling
GetProcAddress() on Windows. But we can't use `__declspec(dllexport)` because
we want the targets to be completely independent from the fuzz engines and don't
depend on other header files. Also, we don't want to include platform specific
code managed with conditional macros.
So, the solution is to add the exported symbols with linker flags in cmake.
Differential revision: https://reviews.llvm.org/D29752
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294688
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcos Pividori [Fri, 10 Feb 2017 01:35:46 +0000 (01:35 +0000)]
[libFuzzer] Use dynamic loading for External Functions on Windows.
Replace weak aliases with dynamic loading.
Weak aliases were generating some problems when linking for MT on Windows. For
MT, compiler-rt's libraries are statically linked to the main executable the
same than libFuzzer, so if we use weak aliases, we are providing two different
default implementations for the same weak function and the linker fails.
In this diff I re implement ExternalFunctions() using dynamic loading, so it
works in both cases (MD and MT). Also, dynamic loading is simpler, since we are
not defining any auxiliary external function, and we don't need to deal with
weak aliases.
This is equivalent to the implementation using dlsym(RTLD_DEFAULT, FnName) for
Posix.
Differential revision: https://reviews.llvm.org/D29751
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294687
91177308-0d34-0410-b5e6-
96231b3b80d8
David L. Jones [Fri, 10 Feb 2017 01:35:31 +0000 (01:35 +0000)]
Update test/CodeGen/X86/sse-align-10.ll to use FileCheck instead of grep
Patch by Jorge Gorbe (lethalantidote).
Differential Revision: https://reviews.llvm.org/D29797
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294686
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Zelenko [Fri, 10 Feb 2017 01:33:54 +0000 (01:33 +0000)]
[MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294685
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Fri, 10 Feb 2017 00:44:08 +0000 (00:44 +0000)]
[LoadCombine] Change test to not use instcombine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294682
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 10 Feb 2017 00:14:42 +0000 (00:14 +0000)]
[WebAssembly] Pass an MCContext to WebAssemblyMCCodeEmitter. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294679
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 10 Feb 2017 00:09:20 +0000 (00:09 +0000)]
Fix syntax error
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294678
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 10 Feb 2017 00:06:44 +0000 (00:06 +0000)]
ARMSubtarget.h: Change to one line per enum element; NFC
Change syntax to have enum elements sorted alphabetically and one per
line as that is more merge/cherry pick friendly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294677
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 10 Feb 2017 00:02:58 +0000 (00:02 +0000)]
[Support] Extend SLEB128 encoding support.
Add support for padded SLEB128 values, and support for writing SLEB128
values to buffers rather than to ostreams, similar to the existing
ULEB128 support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294675
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 10 Feb 2017 00:02:09 +0000 (00:02 +0000)]
Add an additional set of braces to deal with subobject initialization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294674
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 10 Feb 2017 00:00:22 +0000 (00:00 +0000)]
docs/conf.py: Suppress sphinx highlighting failure warnings
The pygments syntax highlighting package used by sphinx fails to parse
newer LLVM constructs or valid (at least to me) gas constructs like
`.secrel32 _function_name + 0`.
Disable this particular warning so the build doesn't abort as fixing
pygments doesn't seem a workable option here.
Differential Revision: https://reviews.llvm.org/D29794
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294672
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 9 Feb 2017 23:54:57 +0000 (23:54 +0000)]
[PM] Add Argument Promotion to the pass pipeline.
This needs explicit requires of the optimization remark emission before
loop pass pipelines containing LICM as we no longer get it from the
inliner -- Argument Promotion may invalidate it. Technically the inliner
could also have broken this, but it never came up in testing.
Differential Revision: https://reviews.llvm.org/D29595
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294670
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Thu, 9 Feb 2017 23:48:10 +0000 (23:48 +0000)]
[NewGVN] Fix test so that it doesn't rely on InstCombine anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294668
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 9 Feb 2017 23:46:27 +0000 (23:46 +0000)]
[PM] Port ArgumentPromotion to the new pass manager.
Now that the call graph supports efficient replacement of a function and
spurious reference edges, we can port ArgumentPromotion to the new pass
manager very easily.
The old PM-specific bits are sunk into callbacks that the new PM simply
doesn't use. Unlike the old PM, the new PM simply does argument
promotion and afterward does the update to LCG reflecting the promoted
function.
Differential Revision: https://reviews.llvm.org/D29580
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294667
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 9 Feb 2017 23:46:26 +0000 (23:46 +0000)]
WholeProgramDevirt: Check that VCP candidate functions are defined before evaluating them.
This was crashing before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294666
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Thu, 9 Feb 2017 23:43:28 +0000 (23:43 +0000)]
LowerMemIntrinsics: Fix include guard
I hope this fixes the clang-stage2-cmake-modules jenkins build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294665
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 9 Feb 2017 23:30:14 +0000 (23:30 +0000)]
[PM/LCG] Teach LCG to support spurious reference edges.
Somewhat amazingly, this only requires teaching it to clean them up when
deleting a dead function from the graph. And we already have exactly the
necessary data structures to do that in the parent RefSCCs.
This allows ArgPromote to work in a much simpler way be merely letting
reference edges linger in the graph after the causing IR is deleted. We
will clean up these edges when we run any function pass over the IR, but
don't remove them eagerly.
This avoids all of the quadratic update issues both in the current pass
manager and in my previous attempt with the new pass manager.
Differential Revision: https://reviews.llvm.org/D29579
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294663
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Thu, 9 Feb 2017 23:29:14 +0000 (23:29 +0000)]
[ARM] Add support for armv7ve triple in llvm (PR31358).
Gcc supports target armv7ve which is armv7-a with virtualization
extensions. This change adds support for this in llvm for gcc
compatibility.
Also remove redundant FeatureHWDiv, FeatureHWDivARM for a few models as
this is specified automatically by FeatureVirtualization.
Patch by Manoj Gupta.
Differential Revision: https://reviews.llvm.org/D29472
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294661
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 9 Feb 2017 23:24:13 +0000 (23:24 +0000)]
[PM/LCG] Teach the LazyCallGraph how to replace a function without
disturbing the graph or having to update edges.
This is motivated by porting argument promotion to the new pass manager.
Because of how LLVM IR Function objects work, in order to change their
signature a new object needs to be created. This is efficient and
straight forward in the IR but previously was very hard to implement in
LCG. We could easily replace the function a node in the graph
represents. The challenging part is how to handle updating the edges in
the graph.
LCG previously used an edge to a raw function to represent a node that
had not yet been scanned for calls and references. This was the core
of its laziness. However, that model causes this kind of update to be
very hard:
1) The keys to lookup an edge need to be `Function*`s that would all
need to be updated when we update the node.
2) There will be some unknown number of edges that haven't transitioned
from `Function*` edges to `Node*` edges.
All of this complexity isn't necessary. Instead, we can always build
a node around any function, always pointing edges at it and always using
it as the key to lookup an edge. To maintain the laziness, we need to
sink the *edges* of a node into a secondary object and explicitly model
transitioning a node from empty to populated by scanning the function.
This design seems much cleaner in a number of ways, but importantly
there is now exactly *one* place where the `Function*` has to be
updated!
Some other cleanups that fall out of this include having something to
model the *entry* edges more accurately. Rather than hand rolling parts
of the node in the graph itself, we have an explicit `EdgeSequence`
object that gives us exactly the functionality needed. We also have
a consistent place to define the edge iterators and can use them for
both the entry edges and the internal edges of the graph.
The API used to model the separation between a node and its edges is
intentionally very thin as most clients are expected to deal with nodes
that have populated edges. We model this exactly as an optional does
with an additional method to populate the edges when that is
a reasonable thing for a client to do. This is based on API design
suggestions from Richard Smith and David Blaikie, credit goes to them
for helping pick how to model this without it being either too explicit
or too implicit.
The patch is somewhat noisy due to shifting around iterator types and
new syntax for walking the edges of a node, but most of the
functionality change is in the `Edge`, `EdgeSequence`, and `Node` types.
Differential Revision: https://reviews.llvm.org/D29577
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294653
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 9 Feb 2017 23:19:03 +0000 (23:19 +0000)]
[WebAssembly] Refactor void return peephole using MaybeRewriteToFallthrough. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294652
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 9 Feb 2017 23:13:04 +0000 (23:13 +0000)]
[InstCombine] allow (X * C2) << C1 --> X * (C2 << C1) for vectors
This fold already existed for vectors but only when 'C1' was a splat
constant (but 'C2' could be any constant).
There were no tests for any vector constants, so I'm adding a test
that shows non-splat constants for both operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294650
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 9 Feb 2017 23:11:52 +0000 (23:11 +0000)]
De-duplicate some code for creating an AARGetter suitable for the legacy PM.
I'm about to use this in a couple more places.
Differential Revision: https://reviews.llvm.org/D29793
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294648
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 9 Feb 2017 23:03:34 +0000 (23:03 +0000)]
Don't try to link to the 4.0 release notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294647
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Thu, 9 Feb 2017 23:03:22 +0000 (23:03 +0000)]
lit.rst: Fix sphinx complaint about multiple option definitions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294646
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonathan Roelofs [Thu, 9 Feb 2017 23:02:37 +0000 (23:02 +0000)]
[docs] Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294645
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian McCarthy [Thu, 9 Feb 2017 22:49:35 +0000 (22:49 +0000)]
Fix build break from r294633.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294642
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 9 Feb 2017 22:35:59 +0000 (22:35 +0000)]
[X86] Remove duplicate call to getValueType. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294640
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 9 Feb 2017 22:02:28 +0000 (22:02 +0000)]
X86: Introduce relocImm-based patterns for cmp.
Differential Revision: https://reviews.llvm.org/D28690
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294636
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 9 Feb 2017 22:00:42 +0000 (22:00 +0000)]
AMDGPU: Add pass to expand memcpy/memmove/memset
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294635
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 9 Feb 2017 21:58:24 +0000 (21:58 +0000)]
X86: Teach X86InstrInfo::analyzeCompare to recognize compares of symbols.
This requires that we communicate to X86InstrInfo::optimizeCompareInstr
that the second operand is neither a register nor an immediate. The way we
do that is by setting CmpMask to zero.
Note that there were already instructions where the second operand was not a
register nor an immediate, namely X86::SUB*rm, so also set CmpMask to zero
for those instructions. This seems like a latent bug, but I was unable to
trigger it.
Differential Revision: https://reviews.llvm.org/D28621
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294634
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian McCarthy [Thu, 9 Feb 2017 21:51:19 +0000 (21:51 +0000)]
Introduce NativeRawSymbol for PDB reading.
This is a stub for a new concrete implementation of IPDBRawSymbol.
Nothing uses this uses this implementation yet. My plan is to
locally switch lldb-pdbdump from the DIA reader to the Native one
and flesh out the implementations of these method stubs in the order
they're needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294633
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Thu, 9 Feb 2017 21:46:49 +0000 (21:46 +0000)]
[LoadCombine] Fix combining of loads which span an aliasing store.
Fixes PR31517
Differential Revision: https://reviews.llvm.org/D28922
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294632
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 9 Feb 2017 21:45:01 +0000 (21:45 +0000)]
Rename LowerTypeTestsSummaryAction to PassSummaryAction. NFCI.
I intend to use the same type with the same semantics in the WholeProgramDevirt
pass.
Differential Revision: https://reviews.llvm.org/D29746
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294629
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 9 Feb 2017 21:43:06 +0000 (21:43 +0000)]
[InstCombine] use m_APInt to allow demanded bits analysis on splat constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294628
91177308-0d34-0410-b5e6-
96231b3b80d8
Konstantin Zhuravlyov [Thu, 9 Feb 2017 21:33:23 +0000 (21:33 +0000)]
[AMDGPU] Calculate number of min/max SGPRs/VGPRs for WavesPerEU instead of using switch statement
Differential Revision: https://reviews.llvm.org/D29741
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294627
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 9 Feb 2017 21:33:19 +0000 (21:33 +0000)]
[InstCombine] add test for demanded bits with splat vector constants; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294625
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 9 Feb 2017 21:29:12 +0000 (21:29 +0000)]
CODE_OWNERS: Update email address
Also clean up description.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294624
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Berlin [Thu, 9 Feb 2017 20:37:46 +0000 (20:37 +0000)]
Drop graph_ prefix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294621
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Berlin [Thu, 9 Feb 2017 20:37:24 +0000 (20:37 +0000)]
GraphTraits: Add range versions of graph traits functions (graph_nodes, graph_children, inverse_graph_nodes, inverse_graph_children).
Summary:
Convert all obvious node_begin/node_end and child_begin/child_end
pairs to range based for.
Sending for review in case someone has a good idea how to make
graph_children able to be inferred. It looks like it would require
changing GraphTraits to be two argument or something. I presume
inference does not happen because it would have to check every
GraphTraits in the world to see if the noderef types matched.
Note: This change was 3-staged with clang as well, which uses
Dominators/etc from LLVM.
Reviewers: chandlerc, tstellarAMD, dblaikie, rsmith
Subscribers: arsenm, llvm-commits, nhaehnle
Differential Revision: https://reviews.llvm.org/D29767
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294620
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Thu, 9 Feb 2017 20:06:30 +0000 (20:06 +0000)]
test: adjust the test for the BSD format
The padding for ld64 changes the header to include the padding. Adjust
the test to account for this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294619
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Thu, 9 Feb 2017 19:41:55 +0000 (19:41 +0000)]
[dsymutil] Fix handling of empty CUs in LTO links.
r288399 introduced the DIEUnit class, and in the process broke
the corner case where dsymutil generates an empty CU during an
LTO link. This restores the logic and adds a test for the corner
case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294618
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Thu, 9 Feb 2017 19:40:22 +0000 (19:40 +0000)]
[JumpThreading] Thread through guards
Summary:
This patch allows JumpThreading also thread through guards.
Virtually, guard(cond) is equivalent to the following construction:
if (cond) { do something } else {deoptimize}
Yet it is not explicitly converted into IFs before lowering.
This patch enables early threading through guards in simple cases.
Currently it covers the following situation:
if (cond1) {
// code A
} else {
// code B
}
// code C
guard(cond2)
// code D
If there is implication cond1 => cond2 or !cond1 => cond2, we can transform
this construction into the following:
if (cond1) {
// code A
// code C
} else {
// code B
// code C
guard(cond2)
}
// code D
Thus, removing the guard from one of execution branches.
Patch by Max Kazantsev!
Reviewers: reames, apilipenko, igor-laevsky, anna, sanjoy
Reviewed By: sanjoy
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D29620
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294617
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Thu, 9 Feb 2017 19:37:18 +0000 (19:37 +0000)]
[utils] coverage: Add help text about the --restrict flag (NFC)
Passing the --restrict flag to the coverage prep script before other
positional arguments is wrong, because it prevents the argparse module
from telling apart arguments to --restrict versus positional arguments.
Pointed out by Sean Callanan!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294616
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Thu, 9 Feb 2017 19:29:35 +0000 (19:29 +0000)]
Object: pad out BSD archive members to 8-bytes
ld64 requires its archive members to be 8-byte aligned for 64-bit
content and 4-byte aligned for 32-bit content. Opt for the larger
alignment requirement. This ensures that ld64 can consume archives
generated by llvm-ar.
Thanks to Kevin Enderby for the hint about the ld64/cctools behaviours!
Resolves PR28361!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294615
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 9 Feb 2017 18:52:24 +0000 (18:52 +0000)]
Convert to for-range loop. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294610
91177308-0d34-0410-b5e6-
96231b3b80d8
Geoff Berry [Thu, 9 Feb 2017 18:28:17 +0000 (18:28 +0000)]
[SelectionDAG] Fix bugs in inverted condition splitting code.
Summary:
Fix two bugs in SelectionDAGBuilder::FindMergedConditions reported by
Mikael Holmen. Handle non-canonicalized xor not operation
correctly (was assuming operand 0 was always the non-constant operand)
and check that the negated condition is also in the same block as the
original and/or instruction (as is done for and/or operands already)
before proceeding with optimization.
Reviewers: bogner, MatzeB, qcolombet
Subscribers: mcrosier, uabelho, llvm-commits
Differential Revision: https://reviews.llvm.org/D29680
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294605
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Thu, 9 Feb 2017 18:14:12 +0000 (18:14 +0000)]
[CMake] Fix standalone project builds broken in r294514
This patch sets the global property indicating that target registration is complete for standalone sub-project builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294602
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 9 Feb 2017 18:12:39 +0000 (18:12 +0000)]
[InstCombine] add tests for icmp with add nsw; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294601
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Thu, 9 Feb 2017 17:56:26 +0000 (17:56 +0000)]
Tweak the implementation of llvm-objdump’s -objc-meta-data option so
that it works when the ObjC metadata sections end up in the
__DATA_CONST or __DATA_DIRTY segments.
rdar://
26315238
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294599
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 9 Feb 2017 17:54:51 +0000 (17:54 +0000)]
[X86][BMI2] Regenerate mulx tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294598
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 9 Feb 2017 17:08:47 +0000 (17:08 +0000)]
[X86][MMX] Remove the (long time) unused MMX_PINSRW ISD opcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294596
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Kortchinsky [Thu, 9 Feb 2017 16:07:52 +0000 (16:07 +0000)]
[docs] Documentation update for Scudo
Summary:
Documentation update to reflect the changes that occured in the allocator:
- additional architectures support;
- modification of the header;
- options default values for 32 & 64-bit.
Reviewers: kcc, alekseyshl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D29592
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294595
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Thu, 9 Feb 2017 15:47:58 +0000 (15:47 +0000)]
Object: add a comment explaining a divergence
Add a note about the reason for the divergence from the specification
for ld64. Addresses post-commit review comments from Davide. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294594
91177308-0d34-0410-b5e6-
96231b3b80d8
David Bozier [Thu, 9 Feb 2017 15:40:14 +0000 (15:40 +0000)]
Revert: "[Stack Protection] Add diagnostic information for why stack protection was applied to a function"
this reverts revision r294590 as it broke some buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294593
91177308-0d34-0410-b5e6-
96231b3b80d8
Artur Pilipenko [Thu, 9 Feb 2017 15:13:40 +0000 (15:13 +0000)]
Add DAGCombiner load combine tests for partially available values
If some of the trailing or leading bytes of a load combine pattern are zeroes we can combine the pattern to a load + zext and shift. Currently we don't support it, so the tests check the current codegen without load combine. This change will make the patch to support this kind of combine a bit more clear.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294591
91177308-0d34-0410-b5e6-
96231b3b80d8
David Bozier [Thu, 9 Feb 2017 15:08:40 +0000 (15:08 +0000)]
[Stack Protection] Add diagnostic information for why stack protection was applied to a function
Stack Smash Protection is not completely free, so in hot code, the overhead it causes can cause performance issues. By adding diagnostic information for which function have SSP and why, a user can quickly determine what they can do to stop SSP being applied to a specific hot function.
This change adds an SSP-specific DiagnosticInfo class and uses of it to the Stack Protection code. A subsequent change to clang will cause the remarks to be emitted when enabled.
Patch by: James Henderson
Differential Revision: https://reviews.llvm.org/D29023
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294590
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 9 Feb 2017 14:59:20 +0000 (14:59 +0000)]
Make it possible to set SHF_LINK_ORDER explicitly.
This will make it possible to add support for gcing user metadata
(asan for example).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294589
91177308-0d34-0410-b5e6-
96231b3b80d8
Pierre Gousseau [Thu, 9 Feb 2017 14:43:58 +0000 (14:43 +0000)]
[X86][btver2] PR31902: Fix a crash in combineOrCmpEqZeroToCtlzSrl under fast math.
In combineOrCmpEqZeroToCtlzSrl, replace "getConstantOperand == 0" by "isNullConstant" to account for floating point constants.
Differential Revision: https://reviews.llvm.org/D29756
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294588
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 9 Feb 2017 14:14:06 +0000 (14:14 +0000)]
[X86][SSE] Added extra FMA/NO-FMA reciprocal test cases for D26855
Test for expected codegen for nr reciprocal cases with/without FMA
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294587
91177308-0d34-0410-b5e6-
96231b3b80d8
David Bozier [Thu, 9 Feb 2017 14:12:30 +0000 (14:12 +0000)]
[docs] cleanup documentation on lit substitutions
1. Added missing substitutions to the documentation in docs/TestingGuide.rst
2. Modified docs/CommandGuide/lit.rst to only document the "base" set of substitutions and to refer the reader to docs/TestingGuide.rst for more detailed info on substitutions.
Patch by bd1976llvm
Differential Revision: https://reviews.llvm.org/D29281
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294586
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Thu, 9 Feb 2017 13:09:59 +0000 (13:09 +0000)]
[ARM] GlobalISel: Lower single precision FP args
Both for aapcscc and aapcs_vfpcc. We currently filter out soft float targets
because we don't support libcalls yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294584
91177308-0d34-0410-b5e6-
96231b3b80d8
Artur Pilipenko [Thu, 9 Feb 2017 12:06:01 +0000 (12:06 +0000)]
[DAGCombiner] Support non-zero offset in load combine
Enable folding patterns which load the value from non-zero offset:
i8 *a = ...
i32 val = a[4] | (a[5] << 8) | (a[6] << 16) | (a[7] << 24)
=>
i32 val = *((i32*)(a+4))
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D29394
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294582
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 9 Feb 2017 11:50:19 +0000 (11:50 +0000)]
[X86][SSE] Attempt to break register dependencies during lowerBuildVector
LowerBuildVectorv16i8/LowerBuildVectorv8i16 insert values into a UNDEF vector if the build vector doesn't contain any zero elements, resulting in register dependencies with a previous use of the register.
This patch attempts to break the register dependency by either always zeroing the vector before hand or (if we're inserting to the 0'th element) by using VZEXT_MOVL(SCALAR_TO_VECTOR(i32 AEXT(Elt))) which lowers to (V)MOVD and performs a similar function. Additionally (V)MOVD is a shorter instruction than PINSRB/PINSRW. We already do something similar for SSE41 PINSRD.
On pre-SSE41 LowerBuildVectorv16i8 we go a little further and use VZEXT_MOVL(SCALAR_TO_VECTOR(i32 ZEXT(Elt))) if the build vector contains zeros to avoid the vector zeroing at the cost of a scalar zero extension, which can probably be brought over to the other cases in a future patch in some cases (load folding etc.)
Differential Revision: https://reviews.llvm.org/D29720
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294581
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Thu, 9 Feb 2017 09:28:05 +0000 (09:28 +0000)]
LVI: Fix use-of-uninitialized-value after r294463
BlockValueStack can be reallocated making reference e invalid.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294572
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Thu, 9 Feb 2017 07:39:19 +0000 (07:39 +0000)]
Add new tests for EXTRACT_VECTOR_ELT (vector of packed i8/16/i32/i64/ps/pd data)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294565
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 9 Feb 2017 06:51:02 +0000 (06:51 +0000)]
[X86] Remove the HLE feature flag.
We only implemented it for one of the 3 HLE instructions and that instruction is also under the RTM flag. Clang only implements the RTM flag from its command line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294562
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 9 Feb 2017 06:50:59 +0000 (06:50 +0000)]
[X86] Remove INVPCID and SMAP feature flags. They aren't currently used by any instructions and not tested.
If we implement intrinsics for their instructions in the future, the feature flags can be added back with proper testing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294561
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 9 Feb 2017 04:27:34 +0000 (04:27 +0000)]
[X86] Clzero intrinsic and its addition under znver1
This patch does the following.
1. Adds an Intrinsic int_x86_clzero which works with __builtin_ia32_clzero
2. Identifies clzero feature using cpuid info. (Function:8000_0008, Checks if EBX[0]=1)
3. Adds the clzero feature under znver1 architecture.
4. The custom inserter is added in Lowering.
5. A testcase is added to check the intrinsic.
6. The clzero instruction is added to assembler test.
Patch by Ganesh Gopalasubramanian with a couple formatting tweaks, a disassembler test, and using update_llc_test.py from me.
Differential revision: https://reviews.llvm.org/D29385
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294558
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Thu, 9 Feb 2017 04:26:21 +0000 (04:26 +0000)]
Object: pad BSD ar string table to 4-bytes
cctools would pad the string table to a sizeof(int32_t) (explicitly
printed out by cctools rather than 4). This adjusts the string table to
make it more compatible with cctools, but is insufficient to make ld64
happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294557
91177308-0d34-0410-b5e6-
96231b3b80d8