OSDN Git Service
Simon Pilgrim [Mon, 7 Nov 2016 13:34:29 +0000 (13:34 +0000)]
[X86][AVX512] Add AVX512VL/AVX512BWVL vector truncation tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286105
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 7 Nov 2016 13:28:20 +0000 (13:28 +0000)]
[X86][SSE] Drop unnecessary -mcpu argument from trunc tests
cpu/triple duplication
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286104
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Mon, 7 Nov 2016 06:02:55 +0000 (06:02 +0000)]
[AVR] Enable the ISel, frame analyzer, and alloca passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286095
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gesiak [Mon, 7 Nov 2016 02:43:01 +0000 (02:43 +0000)]
Update CommandLine.rst getRegisteredOptions example
Summary: Update the docs to match the changes in http://reviews.llvm.org/D7132
Reviewers: beanz, llvm-commits, modocache
Differential Revision: https://reviews.llvm.org/D26296
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286094
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 7 Nov 2016 02:12:57 +0000 (02:12 +0000)]
[AVX-512] Remove masked pmovzx/pmovsx builtins and autoupgrade them to selects and native zext/sext.
This mostly reuses earlier autoupgrade support for the sse and avx equivalents. Just needed to add the code to add the select.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286092
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 7 Nov 2016 00:13:46 +0000 (00:13 +0000)]
[X86] Remove GCCBuiltins from cvtsi2ss/cvtsi2sd/cvtss2sd intrinsics as they aren't used by clang. Add TODOs to remove these and some other unused intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286091
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 7 Nov 2016 00:13:42 +0000 (00:13 +0000)]
[X86] Use StringRef::startswith to reduce a few compares in the intrinsic autoupgrade code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286090
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 7 Nov 2016 00:13:39 +0000 (00:13 +0000)]
[AVX-512] Remove 128/256 masked pshufb intrinsics. Autoupgrade them to legacy intrinsics and a select.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286089
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Sun, 6 Nov 2016 23:21:22 +0000 (23:21 +0000)]
Also delete the go side of the bindings deleted in r286085/r286086.
Also delete a comment I forgot to delete.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286087
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Sun, 6 Nov 2016 21:20:45 +0000 (21:20 +0000)]
Delete one more function that needs to go after r286062.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286086
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Sun, 6 Nov 2016 21:02:14 +0000 (21:02 +0000)]
Remove functions from go bindings that have been deleted in r286062.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286085
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Sun, 6 Nov 2016 20:55:57 +0000 (20:55 +0000)]
Reapply r286080 with a phony change in Hexagon's CMakeLists.txt
Cmake has not recognized that Hexagon.td has a new dependency in
HexagonPatterns.td. All changes to that file were not visible to
the build bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286084
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Sun, 6 Nov 2016 20:55:40 +0000 (20:55 +0000)]
[RandomNumberGenerator] Remove MSVC 2013 compatibility hack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286083
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sun, 6 Nov 2016 19:46:54 +0000 (19:46 +0000)]
ARM: lower fpowi appropriately for Windows ARM
This handles the last case of the builtin function calls that we would
generate code which differed from Microsoft's ABI. Rather than
generating a call to `__pow{d,s}i2` we now promote the parameter to a
float or double and invoke `powf` or `pow` instead.
Addresses PR30825!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286082
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Sun, 6 Nov 2016 19:36:09 +0000 (19:36 +0000)]
Revert r286080: it breaks build bots
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286081
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Sun, 6 Nov 2016 19:03:38 +0000 (19:03 +0000)]
[Hexagon] Remove redundant custom selection code
The clr/set/toggle-bit instructions (with the bit index given as an
immediate operand) had both, custom selection code that generated them,
and selection patterns at the same time. The selection patterns were
not used, because the custom selection code was executed first.
This patch removes the custom code in favor of the selection patterns.
The custom code handled 64-bit registers as well with an immediate bit
index, and so new patterns were added to implement that.
It was also the same case for the instruction "Rd += asr(Rs, Rt)",
except that the custom code did not offer any additional functionality,
and was simply removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286080
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Sun, 6 Nov 2016 18:13:14 +0000 (18:13 +0000)]
[Hexagon] Round 5 of selection pattern simplifications
Remove unnecessary type casts in patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286079
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Sun, 6 Nov 2016 18:09:56 +0000 (18:09 +0000)]
[Hexagon] Round 4 of selection pattern simplifications
Give simpler or more meaningful names to pat frags and xforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286078
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Sun, 6 Nov 2016 18:05:14 +0000 (18:05 +0000)]
[Hexagon] Round 3 of selection pattern simplifications
Remove unnecessary C++ functions for SDNode transforms. Move more
pat frags to files where they are used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286077
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Sun, 6 Nov 2016 17:56:48 +0000 (17:56 +0000)]
[Hexagon] Round 2 of selection pattern simplifications
Add pat frags for any-, sign-, and zero-extensions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286076
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 6 Nov 2016 16:49:19 +0000 (16:49 +0000)]
[SelectionDAG] Add support for vector demandedelts in XOR opcodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286075
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 6 Nov 2016 16:36:29 +0000 (16:36 +0000)]
[X86] Add knownbits vector xor test
In preparation for demandedelts support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286074
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 6 Nov 2016 16:29:19 +0000 (16:29 +0000)]
[AVX-512] Remove intrinsics for 128/256-bit masked variable shift. Instead upgrade them to a select and the older AVX2 intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286073
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 6 Nov 2016 16:29:14 +0000 (16:29 +0000)]
[AVX-512] Remove intrinsics for 128/256-bit masked shift by immediate. Instead upgrade them to a select and the older SSE/AVX2 intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286072
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 6 Nov 2016 16:29:09 +0000 (16:29 +0000)]
[SelectionDAG] Add support for vector demandedelts in OR opcodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286071
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 6 Nov 2016 16:29:08 +0000 (16:29 +0000)]
[AVX-512] Remove intrinsics for 128/256-bit masked shift by single element in xmm. Instead upgrade them to a select and the older SSE/AVX2 intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286070
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 6 Nov 2016 16:29:03 +0000 (16:29 +0000)]
[AVX-512] Remove a 512-bit test cases from the avx512vl test file. It already exists in the avx512f test file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286069
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 6 Nov 2016 16:05:59 +0000 (16:05 +0000)]
[X86] Add knownbits vector or test
In preparation for demandedelts support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286068
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 6 Nov 2016 14:20:29 +0000 (14:20 +0000)]
[X86][SSE] Reuse zeroable element mask in lowerVectorShuffleAsElementInsertion. NFCI
Don't regenerate a zeroable element mask with computeZeroableShuffleElements when its already available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286067
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 6 Nov 2016 13:26:39 +0000 (13:26 +0000)]
[BitcodeWriter] Replace a manual byteswap with read32be.
No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286066
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 6 Nov 2016 07:50:25 +0000 (07:50 +0000)]
[X86] Add a few more fptoui test cases to the vec_fp_to_int.ll. The codegen for these test cases will be improved for AVX512 in a future commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286063
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Sun, 6 Nov 2016 07:48:46 +0000 (07:48 +0000)]
Kill deprecated attribute API
Summary:
This kill various depreacated API related to attribute :
- The deprecated C API attribute based on LLVMAttribute enum.
- The Raw attribute set format (planned to be removed in 4.0).
Reviewers: bkramer, echristo, mehdi_amini, void
Subscribers: mehdi_amini, llvm-commits
Differential Revision: https://reviews.llvm.org/D23039
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286062
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Shen [Sun, 6 Nov 2016 07:38:37 +0000 (07:38 +0000)]
[APFloat] Make functions that produce APFloaat objects use correct semantics.
Summary:
Fixes PR30869.
In D25977 I meant to change all functions that care about lifetime. I
changed constructors, factory functions, but I missed member/free
functions that return new instances. This patch changes them.
Reviewers: hfinkel, kbarton, echristo, joerg
Subscribers: llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D26269
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286060
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 6 Nov 2016 04:12:52 +0000 (04:12 +0000)]
[AVX-512] Add missing EVEX version of pattern for (v2f64 (extloadv2f32 addr:)) -> VCVTPS2PDZ128rm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286059
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 6 Nov 2016 04:12:49 +0000 (04:12 +0000)]
[AVX-512] Add avx512vl command line to the fpext test and add -show-mc-encoding to show where we aren't using EVEX instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286058
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 6 Nov 2016 04:12:46 +0000 (04:12 +0000)]
[AVX-512] Lower AVX cvtpd2ps intrinsic to ISD::FP_ROUND so it can use EVEX instruction when available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286057
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 6 Nov 2016 04:12:42 +0000 (04:12 +0000)]
[AVX-512] Lower SSE/AVX cvtdq2ps intrinsics directly to ISD::SINT_TO_FP so they can use EVEX instructions when available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286056
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 6 Nov 2016 02:03:58 +0000 (02:03 +0000)]
[AVX-512] Add -show-mc-encoding to legacy vector intrinsic tests so we can see when VEX or EVEX encoded instructions are being emitted. Make sure the tests all have an avx2 command line and an skx command line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286055
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Sat, 5 Nov 2016 21:44:50 +0000 (21:44 +0000)]
[Hexagon] Relocate pattern-related bits to proper places
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286049
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Sat, 5 Nov 2016 21:02:54 +0000 (21:02 +0000)]
[Hexagon] Round 1 of selection pattern simplifications
Consistently use register class pat frags instead of spelling out
the type and class each time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286048
91177308-0d34-0410-b5e6-
96231b3b80d8
Boris Ulasevich [Sat, 5 Nov 2016 20:25:18 +0000 (20:25 +0000)]
test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286046
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 5 Nov 2016 18:31:57 +0000 (18:31 +0000)]
[X86][SSE] Reuse zeroable element mask in lowerVectorShuffleAsBlend. NFCI
Don't regenerate a zeroable element mask with computeZeroableShuffleElements when its already available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286045
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 5 Nov 2016 18:22:13 +0000 (18:22 +0000)]
[X86][SSE] Reuse zeroable element mask in lowerVectorShuffleAsZeroOrAnyExtend. NFCI
Don't regenerate a zeroable element mask with computeZeroableShuffleElements when its already available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286044
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 5 Nov 2016 18:05:13 +0000 (18:05 +0000)]
[X86][SSE] Reuse zeroable element mask in SSE4A EXTRQ/INSERTQ vector shuffle lowering. NFCI
Don't regenerate a zeroable element mask with computeZeroableShuffleElements when its already available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286043
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 5 Nov 2016 17:53:27 +0000 (17:53 +0000)]
[X86][SSE] Reuse zeroable element mask in PSHUFB vector shuffle lowering. NFCI
Don't regenerate a zeroable element mask with computeZeroableShuffleElements when its already available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286042
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 5 Nov 2016 17:27:48 +0000 (17:27 +0000)]
[X86][SSE] Reuse zeroable element mask in lowerVectorShuffleAsInsertPS. NFCI
Don't regenerate a zeroable element mask with computeZeroableShuffleElements when its already available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286040
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 5 Nov 2016 17:12:19 +0000 (17:12 +0000)]
[X86][SSE] Reuse zeroable element mask in lowerVectorShuffleAsBitMask. NFCI
Don't regenerate a zeroable element mask with computeZeroableShuffleElements when its already available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286039
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Sat, 5 Nov 2016 16:47:25 +0000 (16:47 +0000)]
[LoopStrengthReduce] Don't use a DenseSet<int64_t> when we might add any valid int64_t to the set.
Summary:
SmallSetVector uses DenseSet, but that means we need to reserve some
values for the empty and tombstone keys.
It seems to me we should have a general way to let us store full-range
ints inside of DenseSets, and furthermore that we probably shouldn't
silently let you add ints into DenseSets without explicitly promising
that they're in range. But that's a battle for another day; for now,
just fix this code, since we currently do something Very Bad when
compiling ffmpeg.
Fixes PR30914.
Reviewers: jeremyhu
Subscribers: llvm-commits, mzolotukhin
Differential Revision: https://reviews.llvm.org/D26323
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286038
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 5 Nov 2016 16:40:20 +0000 (16:40 +0000)]
[X86][SSE] Reuse zeroable element mask instead of regenerating it. NFCI
We are repeatedly calling computeZeroableShuffleElements in many shuffle lowering calls for the same shuffle mask/inputs.
This is a first step towards reusing the zeroable result, initially just for lowerVectorShuffleAsShift calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286037
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Sat, 5 Nov 2016 15:01:38 +0000 (15:01 +0000)]
[Hexagon] Split all selection patterns into a separate file
This is just the basic separation, without any cleanup. Further changes
will follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286036
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 5 Nov 2016 14:43:04 +0000 (14:43 +0000)]
Strip trailing whitespace. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286034
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 5 Nov 2016 05:35:23 +0000 (05:35 +0000)]
[AVX-512] Use an equality compare instead of StringRef::startswith in a few places in auto upgrade that were looking for the complete intrinsic name anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286033
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Sat, 5 Nov 2016 04:22:15 +0000 (04:22 +0000)]
Correct mprotect page boundries to round up end page. Fixes PR30905.
Summary:
Update the boundries for mprotect.
Patch by Andrew Adams. Fixes PR30905.
Reviewers: loladiro, andrew.w.kaylor, chandlerc
Subscribers: abadams, llvm-commits
Differential Revision: https://reviews.llvm.org/D26312
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286032
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 5 Nov 2016 04:00:31 +0000 (04:00 +0000)]
[X86] Remove broken support for autoupgrading llvm.x86.fma4.* intrinsics to llvm.x86.fma.*.
It currently fires an assert if you even try. Looking back, I don't think it ever worked because it only changed the name of the function object, but not the intrinsic ID stored in it. Given that, I think it can be removed since no one has noticed or complained in the past 4 years.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286031
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 4 Nov 2016 23:22:19 +0000 (23:22 +0000)]
Append a (uint32_t)pad into arm_thread_state64_t. Implicit pad isn't appended on i686.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286027
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 4 Nov 2016 22:29:34 +0000 (22:29 +0000)]
[ExecutionEngine] Document the insane ownership contract for
ExecutionEngine::removeModule.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286026
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Fri, 4 Nov 2016 21:55:23 +0000 (21:55 +0000)]
cmake: When using LLVM_DISTRIBUTION_COMPONENTS, adjust LLVMExports accordingly
This Makes sure we only export targets that we're distributing, since
cmake will fail to import the file otherwise due to missing targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286024
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Fri, 4 Nov 2016 20:41:03 +0000 (20:41 +0000)]
[Hexagon] Account for <def,read-undef> when validating moves for predication
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286009
91177308-0d34-0410-b5e6-
96231b3b80d8
Weiming Zhao [Fri, 4 Nov 2016 19:17:32 +0000 (19:17 +0000)]
Fix 24560: assembler does not share constant pool for same constants
Summary: This patch returns the same label if the CP entry with the same value has been created.
Reviewers: eli.friedman, rengolin, jmolloy
Subscribers: majnemer, jmolloy, llvm-commits
Differential Revision: https://reviews.llvm.org/D25804
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286006
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 4 Nov 2016 18:50:45 +0000 (18:50 +0000)]
llvm/test/Transforms/DCE/calls-errno.ll: Suppress checking @pow(+0,-1).
It depends on host's pow(3), and mingw's pow doesn't raise any errors, just returns +INF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286005
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 4 Nov 2016 17:57:34 +0000 (17:57 +0000)]
[docs] Add initial Global ISel documentation.
This reflects the current state of Global ISel. As progress is
made, we'll document our design decisions in it.
Comments very welcome!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286002
91177308-0d34-0410-b5e6-
96231b3b80d8
Zvi Rackover [Fri, 4 Nov 2016 15:15:19 +0000 (15:15 +0000)]
[X86] Broadcast from memory intructions aren't unfoldable
Broadcast from memory instructions should be treated as moves. They can't be unfolded.
Fixes pr30693.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285998
91177308-0d34-0410-b5e6-
96231b3b80d8
Zvi Rackover [Fri, 4 Nov 2016 14:53:22 +0000 (14:53 +0000)]
Add bugpoint-reduced reproducer for pr30693
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285997
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 4 Nov 2016 13:06:34 +0000 (13:06 +0000)]
Revert "AMDGPU: Add VI i16 support"
This reverts commit r285939 and r285948. These broke some conformance tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285995
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Paulsson [Fri, 4 Nov 2016 08:31:14 +0000 (08:31 +0000)]
Comment rewording in MachineScheduler.cpp.
Author: A Trick
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285991
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 4 Nov 2016 07:16:33 +0000 (07:16 +0000)]
Add a missing return to the move assignment operator for
SequenceNumberManager.
Sadly, we don't have any unittests for this class because it is
a private class. Since it seems to have a nice isolated and testable
interface, it'd be great to extract it to a detail namespace and write
unit tests for it as then we could catch issues. I'll probably pester
Lang about that or some alternative refactoring.
This was noticed by PVS-Studio.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285990
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 4 Nov 2016 07:10:24 +0000 (07:10 +0000)]
Remove dead code trying to handle when the amount of data read is
insufficient to populate the expected struct. Prior to this we already
bailed out of the routine when this situation comes up, so none of this
code had any effect.
If someone wants to bring it back to handle these cases, fixing the
earlier conditions and adding the necessary test cases that actually
exercises it, they can always revert this and go from there.
Both of these were noticed by PVS-Studio due to the identical (dead)
condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285989
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 4 Nov 2016 06:59:50 +0000 (06:59 +0000)]
Only log the visit of a return instruction if we in fact found a return
instruction.
This avoids dereferencing null in the debug logging if the instruction
was not in fact a return instruction. This potential bug was found by
PVS-Studio.
This actually fixes the last of the "dereferenced a pointer before
checking it for null" reports in the recent PVS-Studio run. However,
there are quite a few reports of this nature that I did not do anything
to fix because they are pretty glaring false positives. They usually
took the form of quite clear correlated checks or a check made in
a separate function. I've even added asserts anywhere this correlation
wasn't pretty obvious and fundamental to the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285988
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 4 Nov 2016 06:54:00 +0000 (06:54 +0000)]
Hoist check for TLI above all of the attempts to use it (including one
of which that is hidden inside a separate function call) and helpfully
before building expensive transaction infrastructure. This will avoid
crashing when running CGP in a generic mode if we ever managed to hit
this case.
Note that I spent some time looking at alternatives. CGP is actually
used without a TM or TLI in order to do some target-independent testing.
Further, all of the neighboring optimization techniques actually have
some paths that are effective even in the absence of TLI so this seemed
the correct scope at which to check and bypass logic. It still isn't
clear that long-term support for missing TM/TLI is the right
cost/benefit tradeoff for CGP -- we seem to get relatively little for it
and the code is just littered with checks (and assumptions which
I suspect are still missing some checks).
This at least fixes the potential bug in this code spotted by
PVS-Studio, so we've got that going for us. ;]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285987
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Fri, 4 Nov 2016 03:00:52 +0000 (03:00 +0000)]
Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285978
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Thu, 3 Nov 2016 23:55:36 +0000 (23:55 +0000)]
X86: Move a non-null assert to before the pointer is dereferenced
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285975
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gesiak [Thu, 3 Nov 2016 23:41:49 +0000 (23:41 +0000)]
[lit] Remove TODO
Summary:
Instead of keeping track of TODOs for lit in a file checked into source
control, use LLVM's bug tracker. The TODOs have been migrated to the
following bugs:
* https://llvm.org/bugs/show_bug.cgi?id=30666
* https://llvm.org/bugs/show_bug.cgi?id=30667
* https://llvm.org/bugs/show_bug.cgi?id=30668
* https://llvm.org/bugs/show_bug.cgi?id=30669
* https://llvm.org/bugs/show_bug.cgi?id=30670
* https://llvm.org/bugs/show_bug.cgi?id=30671
Reviewers: ddunbar, beanz, echristo, delcypher
Subscribers: llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D25496
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285973
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 3 Nov 2016 23:33:46 +0000 (23:33 +0000)]
Sink all of the code relying on the MachO MachineModuleInfo to live
behind the test that the MachineModuleInfo analysis was
actually available and can be used.
While the MachO bits may well be reasonable to assume in the darwin
assembly printer, the analysis isn't constructively guaranteed anywhere
I could find so it seems safest to avoid crashing here.
This issue was found with PVS-Studio. Pretty sure the Clang Static
Anaylzer flags similar issues but we've probably never pointed it at
this code effectively.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285972
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 3 Nov 2016 22:01:47 +0000 (22:01 +0000)]
[Support] Fix a segfault in llvm::Expected.
This fixes a mismatch between the declared error_type and the type used with
the placement new that initializes the field.
Patch by Yichao Yu.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285970
91177308-0d34-0410-b5e6-
96231b3b80d8
Weiming Zhao [Thu, 3 Nov 2016 21:49:08 +0000 (21:49 +0000)]
[Cortex-M0] Atomic lowering
Summary: ARMv6m supports dmb etc fench instructions but not ldrex/strex etc. So for some atomic load/store, LLVM should inline instructions instead of lowering to __sync_ calls.
Reviewers: rengolin, efriedma, t.p.northover, jmolloy
Subscribers: efriedma, aemerson, llvm-commits
Differential Revision: https://reviews.llvm.org/D26120
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285969
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Thu, 3 Nov 2016 20:51:28 +0000 (20:51 +0000)]
Add support for the ARM_THREAD_STATE64 and
in llvm-objdump for Mach-O files add the printing of the
ARM_THREAD_STATE64 in the same format as
otool-classic(1) on darwin.
To do this the 64-bit ARM general tread state
needed to be defined in include/llvm/Support/MachO.h .
rdar://
28985800
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285967
91177308-0d34-0410-b5e6-
96231b3b80d8
Tony Jiang [Thu, 3 Nov 2016 20:32:21 +0000 (20:32 +0000)]
NFC - Test commit.
Delete an empty line at the end of README.txt file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285964
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 3 Nov 2016 20:16:53 +0000 (20:16 +0000)]
Don't error in the ELFFile constructor.
All error checking now happens when the information is needed. The
only thing left is the minimum size of the buffer and that can be just
a precondition. I will add an ErrorOr create method in a followup
commit.
Also don't store a pointer to the Header, since it is just a trivial
cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285961
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Thu, 3 Nov 2016 19:42:02 +0000 (19:42 +0000)]
Add DWARF debug info support for C++11 inline namespaces.
This implements the DWARF 5 DW_AT_export_symbols feature:
http://dwarfstd.org/ShowIssue.php?issue=141212.1
<rdar://problem/
18616046>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285959
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 3 Nov 2016 19:31:18 +0000 (19:31 +0000)]
[libFuzzer] fix -error_exitcode=N, now with a test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285958
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael LeMay [Thu, 3 Nov 2016 19:14:46 +0000 (19:14 +0000)]
[ADT] IntervalMap: fix setStart and setStop
Summary:
These functions currently require that the new closed interval has a length of
at least 2. They also currently permit empty half-open intervals. This patch
defines nonEmpty in each traits structure and uses it to correct the
implementations of setStart and setStop.
Reviewers: stoklund, chandlerc
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D26064
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285957
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 3 Nov 2016 19:07:15 +0000 (19:07 +0000)]
Remove the last use of report_fatal_error from ELF.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285955
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Thu, 3 Nov 2016 18:28:04 +0000 (18:28 +0000)]
PDB: Fix some APIs to avoid use-after-frees
The buffer is already owned by the PDBFile for all of these APIs, so
don't pass it in separately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285953
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 3 Nov 2016 18:05:33 +0000 (18:05 +0000)]
Add error handling to getEntry.
Issue found by inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285951
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 3 Nov 2016 17:56:46 +0000 (17:56 +0000)]
AMDGPU/SI: Re add VIInstructions.td to unbreak bots
This file is unused as of r285939, but we need to keep it around
for bots that don't do full rebuilds. We should be able to delete this
again in a few days.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285948
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 3 Nov 2016 17:42:02 +0000 (17:42 +0000)]
Remove a redundant condition found by PVS-Studio.
Filed http://llvm.org/PR30897 to teach Clang to warn on this kind of
stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285945
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 3 Nov 2016 17:37:28 +0000 (17:37 +0000)]
Replace another report_fatal_error with an ErrorOr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285944
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 3 Nov 2016 17:28:33 +0000 (17:28 +0000)]
Replace a report_fatal_error with an ErrorOr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285942
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 3 Nov 2016 17:18:31 +0000 (17:18 +0000)]
Delete dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285940
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 3 Nov 2016 17:13:50 +0000 (17:13 +0000)]
AMDGPU: Add VI i16 support
Patch By: Wei Ding
Differential Revision: https://reviews.llvm.org/D18049
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285939
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 3 Nov 2016 17:11:11 +0000 (17:11 +0000)]
Delete some dead code and add a missing "0x" prefix to a hex string in
llvm-readobj.
Another bug caught by PVS-Studio.
It'd be nice to actually have a test for this, but I found it by
inspection from PVS-Studio.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285937
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 3 Nov 2016 17:01:38 +0000 (17:01 +0000)]
Delete a dead store found by PVS-Studio.
Quite sad we still aren't really using aggressive dead code warnings
from Clang that we could potentially use to catch this and so many other
things.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285936
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 3 Nov 2016 16:58:27 +0000 (16:58 +0000)]
Delete dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285935
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 3 Nov 2016 16:51:44 +0000 (16:51 +0000)]
Add lower level versions of some functions.
This adds versions of getSectionIndex, getSection and getSymbol that
instead of a Elf_Shdr take the content of that section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285932
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Thu, 3 Nov 2016 16:43:10 +0000 (16:43 +0000)]
Make this test Windows-only (try to placate buildbots).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285931
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 3 Nov 2016 16:39:25 +0000 (16:39 +0000)]
Fix a bug found by inspection by PVS-Studio.
This condition is trivially always true prior to the change. The comment
at the call site makes it clear that we expect *all* of these to be '=',
'S', or 'I' so fix the code.
We have a bug I will update to track the fact that Clang doesn't warn on
this: http://llvm.org/PR13101
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285930
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 3 Nov 2016 16:24:35 +0000 (16:24 +0000)]
Move function out of line. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285929
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 3 Nov 2016 16:10:39 +0000 (16:10 +0000)]
Inline function into only use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285928
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Thu, 3 Nov 2016 15:56:06 +0000 (15:56 +0000)]
vim: special case the CHECK prefix
A large number of tests in the LLVM tree use the default (CHECK) prefix
to indicate checked expressions via FileCheck. Highlight it as a
special comment. Although this wont get all the instances of the
checked patters, it is strictly better than the current state.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285927
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 3 Nov 2016 14:53:25 +0000 (14:53 +0000)]
Return existing error code.
Should fix the -Werror bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285921
91177308-0d34-0410-b5e6-
96231b3b80d8