180314 Commits

Author SHA1 Message Date
Stefan Stipanovic
226232fec0 test-commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362802 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 14:18:02 +00:00
David Bolvansky
ab694ed71c [NFC] Added tests for D63004
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362801 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 14:05:42 +00:00
Matt Arsenault
49f4b27adf TailDuplicator: Remove no-op analyzeBranch call
This could fail, which looked concerning. However nothing was actually
using the results of this. I assume this was intended to use the
anti-feature of analyzeBranch of removing instructions, but wasn't
actually calling it with AllowModify = true.

Fixes bug 42162.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362800 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 13:33:34 +00:00
Joerg Sonnenberger
89e0c6cdc3 [NFC] Don't export helpers of ConstantFoldCall
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362799 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 13:28:52 +00:00
Nico Weber
d939c9d32a llvm-lib: Disallow mixing object files with different machine types
lib.exe doesn't allow creating .lib files with object files that have
differing machine types. Update llvm-lib to match.

The motivation is to make it possible to infer the machine type of a
.lib file in lld, so that it can warn when e.g. a 32-bit .lib file is
passed to a 64-bit link (PR38965).

Fixes PR38782.

Differential Revision: https://reviews.llvm.org/D62913

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362798 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 13:24:34 +00:00
Sanjay Patel
485262e3e5 [x86] narrow extract subvector of vector select
This is a potentially large perf win for AVX1 targets because of the way we
auto-vectorize to 256-bit but then expect the backend to legalize/optimize
for the half-implemented AVX1 ISA.

On the motivating example from PR37428 (even though this patch doesn't solve
the vector shift issue):
https://bugs.llvm.org/show_bug.cgi?id=37428
...there's a 16% speedup when compiling with "-mavx" (perf tested on Haswell)
because we eliminate the remaining 256-bit vblendv ops.

I added comments on a couple of tests that require further work. If we have
256-bit logic ops separating the vselect and extract, we should probably narrow
everything to 128-bit, but that requires a larger pattern match.

Differential Revision: https://reviews.llvm.org/D62969

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362797 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 13:17:46 +00:00
Nico Weber
0ae4a51971 gn build: Merge r362766
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362796 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 13:09:40 +00:00
Nico Weber
d24e6ef824 gn build: Merge r362774
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362795 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 13:08:17 +00:00
Nico Weber
9081ea685d gn build: Run git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362794 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 13:07:00 +00:00
Simon Tatham
62616fc1ad [ARM] Fix bugs introduced by the fp64/d32 rework.
Change D60691 caused some knock-on failures that weren't caught by the
existing tests. Firstly, selecting a CPU that should have had a
restricted FPU (e.g. `-mcpu=cortex-m4`, which should have 16 d-regs
and no double precision) could give the unrestricted version, because
`ARM::getFPUFeatures` returned a list of features including subtracted
ones (here `-fp64`,`-d32`), but `ARMTargetInfo::initFeatureMap` threw
away all the ones that didn't start with `+`. Secondly, the
preprocessor macros didn't reliably match the actual compilation
settings: for example, `-mfpu=softvfp` could still set `__ARM_FP` as
if hardware FP was available, because the list of features on the cc1
command line would include things like `+vfp4`,`-vfp4d16` and clang
didn't realise that one of those cancelled out the other.

I've fixed both of these issues by rewriting `ARM::getFPUFeatures` so
that it returns a list that enables every FP-related feature
compatible with the selected FPU and disables every feature not
compatible, which is more verbose but means clang doesn't have to
understand the dependency relationships between the backend features.
Meanwhile, `ARMTargetInfo::handleTargetFeatures` is testing for all
the various forms of the FP feature names, so that it won't miss cases
where it should have set `HW_FP` to feed into feature test macros.

That in turn caused an ordering problem when handling `-mcpu=foo+bar`
together with `-mfpu=something_that_turns_off_bar`. To fix that, I've
arranged that the `+bar` suffixes on the end of `-mcpu` and `-march`
cause feature names to be put into a separate vector which is
concatenated after the output of `getFPUFeatures`.

Another side effect of all this is to fix a bug where `clang -target
armv8-eabi` by itself would fail to set `__ARM_FEATURE_FMA`, even
though `armv8` (aka Arm v8-A) implies FP-Armv8 which has FMA. That was
because `HW_FP` was being set to a value including only the `FPARMV8`
bit, but that feature test macro was testing only the `VFP4FPU` bit.
Now `HW_FP` ends up with all the bits set, so it gives the right
answer.

Changes to tests included in this patch:

* `arm-target-features.c`: I had to change basically all the expected
  results. (The Cortex-M4 test in there should function as a
  regression test for the accidental double-precision bug.)
* `arm-mfpu.c`, `armv8.1m.main.c`: switched to using `CHECK-DAG`
  everywhere so that those tests are no longer sensitive to the order
  of cc1 feature options on the command line.
* `arm-acle-6.5.c`: been updated to expect the right answer to that
  FMA test.
* `Preprocessor/arm-target-features.c`: added a regression test for
  the `mfpu=softvfp` issue.

Reviewers: SjoerdMeijer, dmgreen, ostannard, samparker, JamesNagurne

Reviewed By: ostannard

Subscribers: srhines, javed.absar, kristof.beyls, hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D62998


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362791 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 12:42:54 +00:00
Sam Elliott
e9b5b0c8af [RISCV] Support Bit-Preserving FP in F/D Extensions
Summary:
This allows some integer bitwise operations to instead be performed by
hardware fp instructions. This is correct because the RISC-V spec
requires the F and D extensions to use the IEEE-754 standard
representation, and fp register loads and stores to be bit-preserving.

This is tested against the soft-float ABI, but with hardware float
extensions enabled, so that the tests also ensure the optimisation also
fires in this case.

Reviewers: asb, luismarques

Reviewed By: asb

Subscribers: hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62900

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362790 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 12:20:14 +00:00
Valery Pykhtin
9c7e6b2048 [AMDGPU] Constrain the AMDGPU inliner on maximum number of basic blocks in a caller function (compile time performance)
Differential revision: https://reviews.llvm.org/D62917

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362789 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 12:16:46 +00:00
Dmitri Gribenko
224017fde6 Work around a circular dependency between IR and MC introduced in r362735
I replaced the circular library dependency with a forward declaration,
but it is only a workaround, not a real fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362782 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 09:28:19 +00:00
Cullen Rhodes
f26c7a0c47 [AArch64][AsmParser] error on unexpected SVE predicate type suffix
Summary:
This patch fixes a bug in the assembler that permitted a type suffix on
predicate registers when not expected. For instance, the following was
previously valid:

    faddv h0, p0.q, z1.h

This bug was present in all SVE instructions containing predicates with
no type suffix and no predication form qualifier, i.e. /z or /m. The
latter instructions are already caught with an appropiate error message
by the assembler, e.g.:

            .text
    <stdin>:1:13: error: not expecting size suffix
    cmpne p1.s, p0.b/z, z2.s, 0
                ^

A similar issue for SVE vector registers was fixed in:

  https://reviews.llvm.org/D59636

Reviewed By: SjoerdMeijer

Differential Revision: https://reviews.llvm.org/D62942


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362780 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 08:46:56 +00:00
Cullen Rhodes
8e3aacc161 [AArch64][AsmParser] Provide better diagnostics for SVE predicates
Patch by Sander de Smalen (sdesmalen)

Reviewed By: SjoerdMeijer

Differential Revision: https://reviews.llvm.org/D62941


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362779 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 08:37:00 +00:00
George Rimar
10b2fe521d [llvm-objcopy] - Emit error and don't crash if program header reaches past end of file.
This is https://bugs.llvm.org/show_bug.cgi?id=42122.

If an object file has a size less than program header's file [offset + size]
(i.e. if we have overflow), llvm-objcopy crashes instead of reporting a
error.

The patch fixes this issue.

Differential revision: https://reviews.llvm.org/D62898

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362778 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 08:34:18 +00:00
George Rimar
d2e9d074f7 [yaml2elf] - Refactoring followup for D62809
This is a refactoring follow-up for D62809
"Change how we handle implicit sections.".
It allows to simplify the code.

Differential revision: https://reviews.llvm.org/D62912

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362777 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 08:31:36 +00:00
Pengfei Wang
22eaa500e4 [X86] -march=cooperlake (llvm)
Support intel -march=cooperlake in llvm

Patch by Shengchen Kan (skan)

Differential Revision: https://reviews.llvm.org/D62836

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362776 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 08:31:35 +00:00
Sam Parker
962b2f3c73 Fix for lld buildbot
Removed unused (in non-debug builds) variable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362775 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 08:04:18 +00:00
Sam Parker
c313a177b4 [CodeGen] Generic Hardware Loop Support
Patch which introduces a target-independent framework for generating
hardware loops at the IR level. Most of the code has been taken from
PowerPC CTRLoops and PowerPC has been ported over to use this generic
pass. The target dependent parts have been moved into
TargetTransformInfo, via isHardwareLoopProfitable, with
HardwareLoopInfo introduced to transfer information from the backend.
    
Three generic intrinsics have been introduced:
- void @llvm.set_loop_iterations
  Takes as a single operand, the number of iterations to be executed.
- i1 @llvm.loop_decrement(anyint)
  Takes the maximum number of elements processed in an iteration of
  the loop body and subtracts this from the total count. Returns
  false when the loop should exit.
- anyint @llvm.loop_decrement_reg(anyint, anyint)
  Takes the number of elements remaining to be processed as well as
  the maximum numbe of elements processed in an iteration of the loop
  body. Returns the updated number of elements remaining.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362774 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 07:35:30 +00:00
Dylan McKay
dbdf58d17e [AVR] Expand 16-bit rotations during the legalization stage
In r356860, the legalization logic for BSWAP was modified to ISD::ROTL,
rather than the old ISD::{SHL, SRL, OR} nodes.

This works fine on AVR for 8-bit rotations, but 16-bit rotations are
currently unimplemented - they always trigger an assertion error in the
AVRExpandPseudoInsts pass ("RORW unimplemented").

This patch instructions the legalizer to expand 16-bit rotations into
the previous SHL, SRL, OR pattern it did previously.

This fixes the 'issue-cannot-select-bswap.ll' test. Interestingly, this
test failure seems flaky - it passes successfully on the avr-build-01
buildbot, but fails locally on my Arch Linux install.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362773 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 06:55:00 +00:00
Michael Pozulp
9bdaadd3a9 [NFC] Delete trailing whitespace character.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362772 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 06:28:43 +00:00
Michael Pozulp
0ccb60f704 [llvm-objdump] Print source when subsequent lines in the translation unit come from the same line in two different headers.
Reviewers: grimar, rupprecht, jhenderson

Reviewed By: grimar, jhenderson

Subscribers: llvm-commits, jhenderson

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62461

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362771 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 06:23:54 +00:00
Michael Pozulp
702cdcb85d [llvm-objdump] Add warning if --disassemble-functions specifies an unknown symbol
Summary: Fixes Bug 41904 https://bugs.llvm.org/show_bug.cgi?id=41904

Reviewers: jhenderson, rupprecht, grimar, MaskRay

Reviewed By: jhenderson, rupprecht, MaskRay

Subscribers: dexonsmith, rupprecht, kristina, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62275

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362768 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 05:11:13 +00:00
Fangrui Song
5a518b5d5e [MC][ELF] Don't create relocations with section symbols for STB_LOCAL ifunc
We should keep the symbol type (STT_GNU_IFUNC) for a local ifunc because
it may result in an IRELATIVE reloc that the dynamic loader will use to
resolve the address at startup time.

There is another problem that is not fixed by this patch: a PC relative
relocation should also create a relocation with the ifunc symbol.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362767 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 03:47:22 +00:00
Michael Pozulp
aca7c10dd7 [ADT] Enable set_difference() to be used on StringSet
Subscribers: mgorny, mgrang, dexonsmith, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62992

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362766 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 03:23:00 +00:00
Michael Pozulp
9df9a0d4f5 [NFC] Test commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362763 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 01:55:59 +00:00
Fangrui Song
0a7c27cd64 [LV] Fix -Wunused-function after r362736
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362762 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 01:48:26 +00:00
Matt Arsenault
64267da8c6 AMDGPU: Don't count mask branch pseudo towards skip threshold
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362761 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 00:14:55 +00:00
Matt Arsenault
319b18a544 AMDGPU: Insert skips for blocks with FLAT
This already forced a skip for VMEM, so it should also be done for
flat. I'm somewhat skeptical about the benefit of this though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362760 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 00:14:45 +00:00
Nemanja Ivanovic
03ae046337 [PowerPC] Exploit the vector min/max instructions
Use the PPC vector min/max instructions for computing the corresponding
operation as these should be faster than the compare/select sequences
we currently emit.

Differential revision: https://reviews.llvm.org/D47332


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362759 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-06 23:49:01 +00:00
Matt Arsenault
45a0798df6 AMDGPU: Insert skip branches over return blocks
SIInsertSkips really doesn't understand the control flow, and makes
very stupid assumptions about the block layout. This was able to get
away with not skipping return blocks, since usually after
structurization there is only one placed at the end of the
function. Tail duplication can break this assumption.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362754 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-06 22:51:51 +00:00
David Tenty
9332fb0341 [NFC] Test commit, whitespace change
As per the Developer Policy, upon obtaining commit access.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362753 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-06 22:07:14 +00:00
Cameron McInally
3b11c8e290 [NFC][CodeGen] Add unary fneg tests to X86/fma4-intrinsics-x86.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362752 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-06 21:49:59 +00:00
Alexey Lapshin
891c55ccc5 [DebugInfo] Incorrect debug info record generated for loop counter.
Incorrect Debug Variable Range was calculated while "COMPUTING LIVE DEBUG VARIABLES" stage.
Range for Debug Variable("i") computed according to current state of instructions
inside of basic block. But Register Allocator creates new instructions which were not taken
into account when Live Debug Variables computed. In the result DBG_VALUE instruction for
the "i" variable was put after these newly inserted instructions. This is incorrect.
Debug Value for the loop counter should be inserted before any loop instruction.

Differential Revision: https://reviews.llvm.org/D62650

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362750 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-06 21:19:39 +00:00
Alexander Timofeev
4dcfa85e5d [AMDGPU] Partial revert for the ba447bae7448435c9986eece0811da1423972fdd
"Divergence driven ISel. Assign register class for cross block values
       according to the divergence."
       that discovered the design flaw leading to several issues that
       required to be solved before.

       This change reverts AMDGPU specific changes and keeps common part
       unaffected.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362749 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-06 21:13:02 +00:00
Cameron McInally
c8f4c90305 [NFC][CodeGen] Add unary fneg tests to X86/fma-intrinsics-x86.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362748 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-06 21:12:22 +00:00
Craig Topper
1d39dae819 [X86] Make a bunch of merge masked binops commutable for loading folding.
This primarily affects add/fadd/mul/fmul/and/or/xor/pmuludq/pmuldq/max/min/fmaxc/fminc/pmaddwd/pavg.

We already commuted the unmasked and zero masked versions.

I've added 512-bit stack folding tests for most of the instructions
affected. I've tested needing commuting and not commuting across
unmasked, merged masked, and zero masked. The 128/256 bit instructions
should behave similarly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362746 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-06 21:00:04 +00:00
Sanjay Patel
0460af3331 [InstSimplify] add tests for fcmp with known-never-nan operands; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362742 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-06 20:14:06 +00:00
Cameron McInally
d8ab64aeb8 [NFC][CodeGen] Add unary fneg tests to X86/fma-scalar-combine.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362741 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-06 20:11:30 +00:00
Craig Topper
fe02c270b5 [CFLGraph] Add support for unary fneg instruction.
Differential Revision: https://reviews.llvm.org/D62791

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362737 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-06 19:21:23 +00:00
Renato Golin
04351b7a7a [LV] Wrap LV illegality reporting in a function. NFC.
A function for loop vectorization illegality reporting has been
introduced:

void LoopVectorizationLegality::reportVectorizationFailure(
    const StringRef DebugMsg, const StringRef OREMsg,
    const StringRef ORETag, Instruction * const I) const;

The function prints a debug message when the debug for the compilation
unit is enabled as well as invokes the optimization report emitter to
generate a message with a specified tag. The function doesn't cover any
complicated logic when a custom lambda should be passed to the emitter,
only generating a message with a tag is supported.

The function always prints the instruction `I` after the debug message
whenever the instruction is specified, otherwise the debug message
ends with a dot: 'LV: Not vectorizing: Disabled/already vectorized.'

Patch by Pavel Samolysov <samolisov@gmail.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362736 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-06 19:15:52 +00:00
Jason Liu
3d1f1eb045 [AIX] Implement function descriptor on SDAG
Summary:
(1) Function descriptor on AIX
On AIX, a called routine may have 2 distinct symbols associated with it:
 * A function descriptor (Name)
 * A function entry point (.Name)

The descriptor structure on AIX is the same as those in the ELF V1 ABI:
 * The address of the entry point of the function.
 * The TOC base address for the function.
 * The environment pointer.

The descriptor symbol uses the same name as the source level function in C.
The function entry point is analogous to the symbol we would generate for a
 function in a non-descriptor-based ABI, except that it is renamed by
prepending a ".".

Which symbol gets referenced depends on the context:
 * Taking the address of the function references the descriptor symbol.
 * Calling the function references the entry point symbol.

(2) Speaking of implementation on AIX, for direct function call target, we
 create proper MCSymbol SDNode(e.g . ".foo") while constructing SDAG to
 replace original TargetGlobalAddress SDNode. Then down the path, we can
 take advantage of this MCSymbol.

Patch by: Xiangling_L

Reviewed by: sfertile, hubert.reinterpretcast, jasonliu, syzaara

Differential Revision: https://reviews.llvm.org/D62532

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362735 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-06 19:13:36 +00:00
Cameron McInally
b942589e41 [NFC][CodeGen] Add unary fneg tests to X86/fma4-fneg-combine.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362733 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-06 19:02:46 +00:00
Craig Topper
d55132f7cf [InlineCost] Add support for unary fneg.
This adds support for unary fneg based on the implementation of BinaryOperator without the soft float FP cost.

Previously we would just delegate to visitUnaryInstruction. I think the only real change is that we will pass the FastMath flags to SimplifyFNeg now.

Differential Revision: https://reviews.llvm.org/D62699

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362732 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-06 19:02:18 +00:00
Cameron McInally
92f549e39a [NFC][CodeGen] Add unary fneg tests to X86/fma_patterns.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362730 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-06 18:41:18 +00:00
Philip Reames
0e9b7998e6 [LoopPred] Fix a bug in unconditional latch bailout introduced in r362284
This is a really silly bug that even a simple test w/an unconditional latch would have caught.  I tried to guard against the case, but put it in the wrong if check.  Oops.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362727 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-06 18:02:36 +00:00
Simon Pilgrim
deea5e593e [DAGCombine] MergeConsecutiveStores - improve non-temporal load\store handling (PR42123)
This patch is the first step towards ensuring MergeConsecutiveStores correctly handles non-temporal loads\stores:

1 - When merging load\stores we must ensure that they all have the same non-temporal flag. This is unlikely to occur, but can in strange cases where we're storing at the end of one page and the beginning of another.

2 - The merged load\store node must retain the non-temporal flag.

Differential Revision: https://reviews.llvm.org/D62910

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362723 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-06 17:04:13 +00:00
Cameron McInally
58871dab1d [NFC][CodeGen] Add unary fneg tests to X86/fma_patterns_wide.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362720 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-06 16:55:51 +00:00
Nico Weber
ad38482ac7 gn build: Merge r362685
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362719 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-06 16:55:05 +00:00