124678 Commits

Author SHA1 Message Date
Craig Topper
ebbca899ac [X86] Use ArrayRef. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254279 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-30 02:08:05 +00:00
Sanjoy Das
4ab382c3c8 [ADT] Fix typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254278 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-30 01:24:17 +00:00
Craig Topper
da85caae7a [AVX512] The vpermi2 instructions require an integer vector for the index vector. This is reflected correctly in the intrinsics, but was not refelected in the isel patterns.
For the floating point types, this requires adding a bitcast to the index vector when its passed through to the output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254277 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-30 00:13:24 +00:00
Sanjoy Das
dffe9f4fa6 [SCEV] Use lambda instead of std::bind; NFC
The lambda is more readable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254276 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 23:40:57 +00:00
Sanjoy Das
cce49eb8a6 [SCEV] Use range version of all_of; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254275 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 23:40:53 +00:00
Craig Topper
d67244292e [X86] Remove duplicate entries from intrinsics tables and add asserts to verify there are no others.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254274 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 23:18:32 +00:00
Sanjoy Das
4e6293afeb Fix out of bounds access in hasStructRetAttr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254273 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 23:15:43 +00:00
Dan Gohman
1ee4c0e239 [WebAssembly] Delete an obsolete TODO comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254272 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 23:09:41 +00:00
Dan Gohman
10ad208c62 [WebAssembly] Set several MCInstrDesc flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254271 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 22:59:19 +00:00
Craig Topper
ae475496f6 [X86] int_x86_avx2_permps and X86ISD::VPERMV should take an integer vector for its shuffle indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254269 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 22:53:22 +00:00
Dan Gohman
99ef26c43e [WebAssembly] Delete unused functions. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254268 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 22:48:57 +00:00
Dan Gohman
85d0f9ca6d [WebAssembly] Minor clang-format and selected clang-tidy cleanups. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254267 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 22:32:02 +00:00
Sanjay Patel
f7790eca1d fix typos in comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254266 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 22:09:34 +00:00
Davide Italiano
401b67d4eb [SimplifyLibCalls] Don't crash if the function doesn't have a name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254265 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 21:58:56 +00:00
Davide Italiano
276f2af536 [SimplifyLibCalls] Cross out implemented transformations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254264 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 21:00:43 +00:00
Davide Italiano
0f019d6283 [SimplifyLibCalls] Tranform log(pow(x, y)) -> y*log(x).
This one is enabled only under -ffast-math. There are cases where the
difference between the value computed and the correct value is huge
even for ffast-math, e.g. as Steven pointed out:

x = -1, y = -4
log(pow(-1), 4) = 0
4*log(-1) = NaN

I checked what GCC does and apparently they do the same optimization
(which result in the dramatic difference). Future work might try to
make this (slightly) less worse.

Differential Revision:	http://reviews.llvm.org/D14400


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254263 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 20:58:04 +00:00
Diego Novillo
173327b7af SamplePGO - Do not use std::to_string in diagnostics.
This fixes buildbots in systems that std::to_string is not present. It
also tidies the output of the diagnostic to render doubles a bit better
(thanks Ben Kramer for help with string streams and format).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254261 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 18:23:26 +00:00
Craig Topper
96be2c60e3 Use a lambda instead of std::bind and std::mem_fn I introduced in r254242. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254260 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 18:05:22 +00:00
Simon Pilgrim
86ccb92227 [X86][SSE] Added support for lowering to ADDSUBPS/ADDSUBPD with commuted inputs
We could already recognise shuffle(FSUB, FADD) -> ADDSUB, this allow us to recognise shuffle(FADD, FSUB) -> ADDSUB by commuting the shuffle mask prior to matching.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254259 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 16:41:04 +00:00
Rafael Espindola
e3f14b0e8c Add a passing test.
When a comdat is discarded, any globals defined in it become undefined.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254258 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 15:52:12 +00:00
Rafael Espindola
eab2da952c Don't depend on the order the IR is copied.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254257 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 15:22:49 +00:00
Rafael Espindola
ed1d7091b5 Don't depend on the order the IR is copied.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254256 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 15:08:39 +00:00
Rafael Espindola
dd74fbe179 Make this test less strict.
We just want to test what is copied, no the order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254255 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 14:53:06 +00:00
Rafael Espindola
91f2c7bc43 Simplify. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254254 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 14:33:06 +00:00
Igor Breger
e8f80e5261 AVX512:Implemented encoding for the vmovq.s instruction.
Differential Revision: http://reviews.llvm.org/D14810

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254248 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 07:41:26 +00:00
Craig Topper
00bd5c5e49 Remove an intermediate lambda. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254246 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 05:38:08 +00:00
Xinliang David Li
672212ce1a Minor code cleanups
- Add const keyword
 - fix code comments
 - move forward decl to the common file


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254244 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 04:52:34 +00:00
Craig Topper
b013b28ec8 Remove unnecessary intermediate lambda. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254243 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 04:37:14 +00:00
Craig Topper
ce14a216e2 [SelectionDAG] Use std::any_of instead of a manually coded loop. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254242 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 04:37:11 +00:00
Rafael Espindola
3e3383f5f7 Correctly handle llvm.global_ctors merging.
We were not handling the case where an entry must be dropped and the
destination module has no llvm.global_ctors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254241 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 03:29:42 +00:00
Rafael Espindola
3230155018 Fix a crash when writing merged bitcode.
Playing with mutateType in here was making getValueType and getType
incompatible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254240 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-29 03:21:30 +00:00
Davide Italiano
46cdbe2048 [SimplifyLibCalls] Use any_of(). Suggested by David Blaikie!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254239 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-28 22:27:48 +00:00
Benjamin Kramer
d3af7cc9d9 [SimplifyLibCalls] Fix inverted condition that lead to an uninitialized memory read below.
Found by msan!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254238 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-28 21:43:12 +00:00
Simon Pilgrim
4d09da6163 [X86][AVX] Regenerate ADDSUB tests
Tidied up triple and regenerate tests using update_llc_test_checks.py

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254237 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-28 19:20:49 +00:00
Xinliang David Li
ea177884e9 [PGO] Move value profile format related structures and APIs to common file
This is the last step to enable profile runtime to share the same value prof
data format and reader/writer code with llvm host tools. The VP related 
data structures are moved to a section in InstrProfData.inc enabled with macro
INSTR_PROF_VALUE_PROF_DATA, and common API implementations are enabled with
INSTR_PROF_COMMON_API_IMPL. There should be no functional change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254235 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-28 19:07:09 +00:00
Renato Golin
b6bfb48380 Revert "[ARM] Generate ABI_optimization_goals build attribute, as described in the ARM ARM."
This reverts commit r254201 and r254202, as it broke test-suite,
self-hosting and sanitizer tests on ARM buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254234 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-28 17:23:46 +00:00
Simon Pilgrim
b546e74729 [X86][FMA] Added 512-bit tests to match 128/256-bit tests coverage
As discussed on D14909

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254233 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-28 16:04:24 +00:00
Simon Pilgrim
5477417f96 [X86][FMA] More thorough FMA tests
Added FMADD/FMSUB/FNMADD/FNMSUB tests for all types

Added load folding tests for 512-bit vectors

NOTE: Many of the AVX512 FMA instructions don't yet commute/fold correctly

As discussed on D14909

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254232 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-28 14:28:44 +00:00
Simon Pilgrim
45eadd4286 [X86][AVX2] Tidied up PBROADCAST tests
Tidied up triple and regenerate tests using update_llc_test_checks.py


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254231 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-28 14:15:40 +00:00
NAKAMURA Takumi
1cc8cf22c9 llvm/test/CodeGen/SystemZ/alloca-04.ll REQUIRES asserts due to -debug-pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254230 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-28 13:05:49 +00:00
Jonas Paulsson
bd9bd9e500 [Stack realignment] Handling of aligned allocas.
This patch implements dynamic realignment of stack objects for targets
with a non-realigned stack pointer. Behaviour in FunctionLoweringInfo
is changed so that for a target that has StackRealignable set to
false, over-aligned static allocas are considered to be variable-sized
objects and are handled with DYNAMIC_STACKALLOC nodes.

It would be good to group aligned allocas into a single big alloca as
an optimization, but this is yet todo.

SystemZ benefits from this, due to its stack frame layout.

New tests SystemZ/alloca-03.ll for aligned allocas, and
SystemZ/alloca-04.ll for "no-realign-stack" attribute on functions.

Review and help from Ulrich Weigand and Hal Finkel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254227 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-28 11:02:32 +00:00
Craig Topper
697498bd8e Use range-based for loops. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254222 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-28 08:23:04 +00:00
Craig Topper
b51ae5ef11 [TableGen] Use SmallString instead of std::string to build up a string to avoid heap allocations. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254221 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-28 08:23:02 +00:00
Xinliang David Li
feed6dbc9f [PGO] Add return code for vp rt record init routine to indicate error condition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254220 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-28 05:47:34 +00:00
Xinliang David Li
9bee4a8249 [PGO] Allow value profile writer interface to allocated target buffer
Raw profile writer needs to write all data of one kind in one continuous block,
so the buffer needs to be pre-allocated and passed to the writer method in
pieces for function profile data. The change adds the support for raw value data
writing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254219 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-28 05:37:01 +00:00
Xinliang David Li
52a156fb30 Function name cleanup (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254218 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-28 05:06:00 +00:00
Xinliang David Li
170357c9b7 [PGO] Extract VP data integrity check code into a helper function (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254217 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-28 04:56:07 +00:00
Keno Fischer
66f5f81e89 [autoconf] Fix MinGW build
This is the autoconf analog of r251201. I realize autoconf is
deprecated, but while it's in tree, it should at least be kept working.

Also add the deprecation message to configure.ac such that AutoRegen
actually picks ip up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254215 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-28 00:54:12 +00:00
Rafael Espindola
e29bf07833 Pass .ll directly to llvm-link.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254214 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-27 23:47:15 +00:00
Rafael Espindola
f37c401c5f Pass .ll directly to llvm-link
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254213 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-27 23:21:45 +00:00