Commit Graph

29581 Commits

Author SHA1 Message Date
Diana Picus 5e300846b9 [IRTranslator] Don't hardcode GEP index type
When breaking up loads and stores of aggregates, the IRTranslator uses
LLT::scalar(64) for the index type of the G_GEP instructions that
compute the addresses. This is unnecessarily large for 32-bit targets.
Use the int ptr type provided by the DataLayout instead.

Note that we're already doing the right thing when translating
getelementptr instructions from the IR. This is just an oversight when
generating new ones while translating loads/stores.

Both x86 and AArch64 already have tests confirming that the old
behaviour is preserved for 64-bit targets.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360656 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-14 09:25:17 +00:00
Philip Reames aac3c5776f [X86] Prefer locked stack op over mfence for seq_cst 64-bit stores on 32-bit targets
This is a follow on to D58632, with the same logic. Given a memory operation which needs ordering, but doesn't need to modify any particular address, prefer to use a locked stack op over an mfence.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360649 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-14 04:43:37 +00:00
Jinsong Ji 2a870557eb [PowerPC][NFC] Fix typos in triples
Found by bzEq (Kai Luo).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360643 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-14 03:11:24 +00:00
Craig Topper 26c643d57e [X86] Use X86 instead of X32 as a check prefix in atomic-idempotent.ll. NFC
X32 can refer to a 64-bit ABI that uses 32-bit ints, longs, and pointers.

I plan to add gnux32 command lines to this test so this prepares for that.

Also remove some check lines that have a prefix that is not in any run lines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360642 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-14 03:07:56 +00:00
Sanjay Patel 216d69b719 [SDAG, x86] allow targets to override test for binop opcodes
This follows the pattern of the existing isCommutativeBinOp().

x86 shows improvements from vector narrowing for the min/max opcodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360639 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-14 00:39:40 +00:00
Nikita Popov 1d1646072b [WebAssembly] Don't assume that zext/sext result is i32/i64 in fast isel (PR41841)
Usually this will abort fast-isel at the instruction using the
non-legal result, but if the only use is in a different basic block,
we'll incorrectly assume that the zext/sext is to i32 (rather than
i128 in this case).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360616 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-13 19:40:18 +00:00
Stanislav Mekhanoshin 16bc05331b [AMDGPU] gfx1010 tests. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360615 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-13 19:30:06 +00:00
Robert Lougher c6685acf2d Revert [X86] Avoid SFB - Fix inconsistent codegen with/without debug info
Revert r360436 as it is causing clang-x64-windows-msvc buildbot to fail.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360606 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-13 17:36:46 +00:00
Nick Desaulniers f90dd6af95 [TargetLowering] Handle multi depth GEPs w/ inline asm constraints
Summary:
X86TargetLowering::LowerAsmOperandForConstraint had better support than
TargetLowering::LowerAsmOperandForConstraint for arbitrary depth
getelementpointers for "i", "n", and "s" extended inline assembly
constraints. Hoist its support from the derived class into the base
class.

Link: https://github.com/ClangBuiltLinux/linux/issues/469

Reviewers: echristo, t.p.northover

Reviewed By: t.p.northover

Subscribers: t.p.northover, E5ten, kees, jyknight, nemanjai, javed.absar, eraman, hiraditya, jsji, llvm-commits, void, craig.topper, nathanchance, srhines

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360604 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-13 17:27:44 +00:00
Simon Pilgrim ab7b3e1a7b [X86][SSE] LowerBuildVectorv4x32 - don't insert MOVQ for undef elts
Fixes the regression noted in D61782 where a VZEXT_MOVL was being inserted because we weren't discriminating between 'zeroable' and 'all undef' for the upper elts.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360596 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-13 16:10:11 +00:00
Simon Pilgrim 414caf48e2 [X86][SSE] Relax use limits for lowerAddSubToHorizontalOp (PR32433)
Now that we can use HADD/SUB for scalar additions from any pair of extracted elements (D61263), we can relax the one use limit as we will be able to merge multiple uses into using the same HADD/SUB op.

This exposes a couple of missed opportunities in LowerBuildVectorv4x32 which will be committed separately.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360594 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-13 16:02:45 +00:00
Simon Pilgrim 89c70147ce [TargetLowering] Add SimplifyDemandedBits support for ZERO_EXTEND_VECTOR_INREG
More work for PR39709.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360592 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-13 15:51:26 +00:00
Craig Topper 0c86214975 [X86] Add test case for mask register variant of PR41619 which should be fixed after r360552
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360591 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-13 15:45:20 +00:00
Sanjay Patel f098d456c4 [DAGCombiner] narrow vector binop with inserts/extract
We catch most of these patterns (on x86 at least) by matching
a concat vectors opcode early in combining, but the pattern may
emerge later using insert subvector instead.

The AVX1 diffs for add/sub overflow show another missed narrowing
pattern. That one may be falling though the cracks because of
combine ordering and multiple uses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360585 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-13 14:31:14 +00:00
Sanjay Patel c26af7673b [x86] add test for insert/extract binop; NFC
This pattern is visible in the c-ray benchmark with an AVX target.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360582 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-13 13:32:16 +00:00
Kevin P. Neal ff5c498da2 Add constrained fptrunc and fpext intrinsics.
The new fptrunc and fpext intrinsics are constrained versions of the
regular fptrunc and fpext instructions.

Reviewed by:	Andrew Kaylor, Craig Topper, Cameron McInally, Conner Abbot
Approved by:	Craig Topper
Differential Revision: https://reviews.llvm.org/D55897



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360581 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-13 13:23:30 +00:00
Ulrich Weigand 12d462cd1b [SystemZ] Model floating-point control register
This adds the FPC (floating-point control register) as a reserved
physical register and models its use by SystemZ instructions.

Note that only the current rounding modes and the IEEE exception
masks are modeled.  *Changes* of the FPC due to exceptions (in
particular the IEEE exception flags and the DXC) are not modeled.

At this point, this patch is mostly NFC, but it will prevent
scheduling of floating-point instructions across SPFC/LFPC etc.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360570 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-13 09:47:26 +00:00
Sam Parker 17265b988b [ARM][ParallelDSP] Relax alias checks
When deciding the safety of generating smlad, we checked for any
writes within the block that may alias with any of the loads that
need to be widened. This is overly conservative because it only
matters when there's a potential aliasing write to a location
accessed by a pair of loads.

Now we check for aliasing writes only once, during setup. If two
loads are found to have an aliasing write between them, we don't add
these loads to LoadPairs. This means that later during the transform,
we can safely widened a pair without worrying about aliasing.

However, to maintain correctness, we also need to change the way that
wide loads are inserted because the order is now important.

The MatchSMLAD method has also been changed, absorbing
MatchReductions and AddMACCandidate to hopefully improve readability.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360567 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-13 09:23:32 +00:00
Clement Courbet 013814dc77 [DAGCombiner] Fix invalid alias analysis.
Summary:
When we know for sure whether two addresses do or do not alias, we
should immediately return from DAGCombiner::isAlias().

I think this comes from a bad copy/paste, Sorry for not catching that during the
code review.

Fixes PR41855.

Reviewers: niravd, gchatelet, EricWF

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360566 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-13 09:07:37 +00:00
Clement Courbet df8691fc36 [DAGCombiner][NFC] Commit test to show fix in D61846.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360561 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-13 08:15:34 +00:00
Yonghong Song cd71e6ef66 [BPF] emit BTF sections only if debuginfo available
Currently, without -g, BTF sections may still be emitted with
data sections, e.g., for linux kernel bpf selftest
test_tcp_check_syncookie_kern.c issue discovered by Martin
as shown below.

-bash-4.4$ bpftool btf dump file test_tcp_check_syncookie_kern.o
[1] VAR 'results' type_id=0, linkage=global-alloc
[2] VAR '_license' type_id=0, linkage=global-alloc
[3] DATASEC 'license' size=0 vlen=1
        type_id=2 offset=0 size=4
[4] DATASEC 'maps' size=0 vlen=1
        type_id=1 offset=0 size=28

Let disable BTF generation if no debuginfo, which is
the original design.

Signed-off-by: Yonghong Song <yhs@fb.com>

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360556 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-13 05:00:23 +00:00
Craig Topper fed0c65b29 Recommit r358887 "[TargetLowering][AMDGPU][X86] Improve SimplifyDemandedBits bitcast handling"
I've included a new fix in X86RegisterInfo to prevent PR41619 without
reintroducing r359392. We might be able to improve that in the base class
implementation of shouldRewriteCopySrc somehow. But this hopefully enables
forward progress on SimplifyDemandedBits improvements for now.

Original commit message:

This patch adds support for BigBitWidth -> SmallBitWidth bitcasts, splitting the DemandedBits/Elts accordingly.

The AMDGPU backend needed an extra  (srl (and x, c1 << c2), c2) -> (and (srl(x, c2), c1) combine to encourage BFE creation, I investigated putting this in DAGComb
but it caused a lot of noise on other targets - some improvements, some regressions.

The X86 changes are all definite wins.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360552 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-13 04:03:35 +00:00
Simon Pilgrim ec283e5c48 [X86][AVX] Split VZEXT_MOVL ymm/zmm if the upper elements are not demanded.
Removes unnecessary vzeroupper noted in D61806

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360543 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-12 15:16:29 +00:00
Sanjay Patel 874cb15d79 [DAGCombiner] try to move bitcast after extract_subvector
I noticed that we were failing to narrow an x86 ymm math op in a case similar
to the 'madd' test diff. That is because a bitcast is sitting between the math
and the extract subvector and thwarting our pattern matching for narrowing:

       t56: v8i32 = add t59, t58
      t68: v4i64 = bitcast t56
    t73: v2i64 = extract_subvector t68, Constant:i64<2>
  t96: v4i32 = bitcast t73

There are a few wins and neutral diffs in the other tests.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360541 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-12 14:43:20 +00:00
Simon Pilgrim b5cd6c8031 [X86][SSE] SimplifyDemandedBits - call PEXTRB/PEXTRW SimplifyDemandedVectorElts as well.
See if we can simplify the demanded vector elts from the extraction before trying to simplify the demanded bits.

This helps us with target shuffles and hops in particular.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360535 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-11 21:35:50 +00:00
Simon Pilgrim 3f91d20624 [DAG] Add SimplifyDemandedBits support for BITREVERSE
Pulled out of D58017 while I continue to investigate the BSWAP regression on PPC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360534 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-11 20:56:05 +00:00
Simon Pilgrim 2e0a475f38 [X86] Updated shift-mask test targets for D61830
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360533 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-11 20:28:20 +00:00
Simon Pilgrim f26529e8bb [X86] Add scalar shl+lshr -> shift+mask tests (PR40758)
As discussed on D61068, many x86 targets can perform 2 immediate shifts quicker than a shift + mask

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360530 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-11 19:16:46 +00:00
Simon Pilgrim d6e2c2034c [X86] Add avx512f tests for boolean reduction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360529 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-11 19:14:19 +00:00
Simon Pilgrim 6661d4fd0b [X86][SSE] Add SimplifyDemandedVectorElts HADD/HSUB handling.
Still missing PHADDW/PHSUBW tests because PEXTRW doesn't call SimplifyDemandedVectorElts

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360526 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-11 16:07:12 +00:00
Craig Topper 7fc8dfe8f6 [X86] Add CMOV_FR32X/CMOV_FR64X pseudo instructions. Use them in fast isel to fix a machine verifier error after adding test cases.
Fast isel picks the FR32X/FR64X register classes when lowering pseudo select, but it didn't have the right opcode to go with it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360524 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-11 16:00:28 +00:00
Simon Pilgrim aada1e1a5e [X86][SSE] Tweaked HADD/HSUB SimplifyDemandedVectorElts
Try to ensure we LHS and RHS test coverage

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360519 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-11 14:47:54 +00:00
Simon Pilgrim 0da069aed5 [X86][SSE] Add integer HADD/HSUB SimplifyDemandedVectorElts tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360518 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-11 14:08:34 +00:00
Simon Pilgrim 474d5a5950 [X86][SSE] Add HADD/HSUB SimplifyDemandedVectorElts tests
Shows missed opportunities to simplify args.

Will add integer HADD/HSUB tests in a future commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360517 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-11 12:46:38 +00:00
Craig Topper 9668e7d9d2 [X86] Don't emit MOVNTDQA loads from fast-isel without SSE4.1.
We were checking for SSE4.1 for FP types, but not integer 128-bit types.

Fixes PR41837.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360512 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-11 04:19:33 +00:00
Craig Topper 723c191bb9 [X86] Add a test case for idempotent atomic operations with speculative load hardening. Fix an additional issue found by the test.
This test covers the fix from r360475 as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360511 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-11 04:00:27 +00:00
Mircea Trofin 10e38caf19 Skip over prefetches
Summary: Skip over prefetches when assigning debug info to instructions with memory operands. This way, the debug info is stable after instrumenting a binary with prefetches, allowing for iterative profiling and instrumentation.

Reviewers: davidxl

Reviewed By: davidxl

Subscribers: aprantl, hiraditya, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360471 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-10 21:27:55 +00:00
Nikita Popov 8e7f7e84fc [SDAG] Recursively legalize both vector mulo results
Split out from D61692 per RKSimon's suggestion. Vector op
legalization will automatically recursively legalize the returned
SDValue, but we need to take care of the other results ourselves.
Otherwise it will end up getting legalized only during op
legalization, by which point it might be too late (though I'm not
aware of any specific cases right now).

There are codegen differences because expansion occurs earlier now
and we don't get a DAGCombiner run in between.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360470 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-10 20:42:48 +00:00
Momchil Velikov 6f63f2faec Adjust MachineScheduler to use ProcResource counts
This fix allows the scheduler to take into account the number of instances of
each ProcResource specified. Previously a declaration in a scheduler of
ProcResource<1> would be treated identically to a declaration of
ProcResource<2>. Now the hazard recognizer would report a hazard only after all
of the resource instances are busy.

Patch by Jackson Woodruff and Momchil Velikov.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360441 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-10 16:54:32 +00:00
Robert Lougher c00a8f657a [X86] Avoid SFB - Fix inconsistent codegen with/without debug info
Fixes https://bugs.llvm.org/show_bug.cgi?id=40969

The functions findPotentiallyBlockedCopies and buildCopy are currently not
accounting for the presence of debug instructions. In the former this results
in the optimization not being trigerred, and in the latter results in
inconsistent codegen.

This patch enables the optimization to be performed in a debug build and
ensures the codegen is consistent with non-debug builds.

Patch by Chris Dawson.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360436 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-10 15:55:06 +00:00
Simon Pilgrim 1513e5ffee [X86][SSE] Add getHopForBuildVector vector splitting
If we only use the lower xmm of a ymm hop, then extract the xmm's (for free), perform the xmm hop and then insert back into a ymm (for free).

Fixes some of the regressions noted in D61782

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360435 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-10 15:46:04 +00:00
Lei Huang 5238a36901 [PowerPC] custom lower v2f64 fpext v2f32
Reduces scalarization overhead via custom lowering of v2f64 fpext v2f32.

eg. For the following IR
  %0 = load <2 x float>, <2 x float>* %Ptr, align 8
  %1 = fpext <2 x float> %0 to <2 x double>
  ret <2 x double> %1

Pre custom lowering:
  ld r3, 0(r3)
  mtvsrd f0, r3
  xxswapd vs34, vs0
  xscvspdpn f0, vs0
  xxsldwi vs1, vs34, vs34, 3
  xscvspdpn f1, vs1
  xxmrghd vs34, vs0, vs1

After custom lowering:
  lfd f0, 0(r3)
  xxmrghw vs0, vs0, vs0
  xvcvspdp vs34, vs0

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360429 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-10 14:04:06 +00:00
Tim Northover 06b700153b SelectionDAG: accommodate atomic floating stores.
We were applying a pointer truncation to floating types, which crashed LLVM.
That is Not A Good Thing(TM).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360421 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-10 11:23:04 +00:00
Sam Clegg b55344a743 [WebAssembly] Don't assume that strongly defined symbols are DSO-local
The current PIC model for WebAssembly is more like ELF in that it
allows symbol interposition.

This means that more functions end up being addressed via the GOT
and fewer directly added to the wasm table.

One effect is a reduction in the number of wasm table entries similar
to the previous attempt in https://reviews.llvm.org/D61539 which was
reverted.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360402 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-10 01:52:08 +00:00
Mircea Trofin 5b433966ac [llvm] X86DiscriminateMemOps: insert debug info when missing
Reviewers: davidxl

Reviewed By: davidxl

Subscribers: aprantl, hiraditya, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360396 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-10 00:12:51 +00:00
Stanislav Mekhanoshin 2ab8253e45 [AMDGPU] Pattern for v_xor3_b32
This also allows three op patterns to use increased constant bus
limit of GFX10.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360395 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-10 00:09:01 +00:00
Philip Reames 4b4cf0d82d [X86] Improve lowering of idemptotent RMW operations
The current lowering uses an mfence. mfences are substaintially higher latency than the locked operations originally requested, but we do want to avoid contention on the original cache line. As such, use a locked instruction on a cache line assumed to be thread local.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360393 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-09 23:23:42 +00:00
Simon Pilgrim 2c238253be [X86][SSE] Fold add(shuffle(),shuffle()) to hadd on 'slow' targets (PR39920)
As reported on PR39920, "slow horizontal ops" targets tend to internally expand to 2*shuffle+add/sub - so if we can reduce 2*shuffle+add/sub to a hadd/sub then we should do it - similar port usage but reduced instruction count.

This works out in most cases, although the "PR22377" regression in vector-shuffle-combining.ll is annoying - going from 2*shuffle+add+shuffle to hadd+2*shuffle - I've opened PR41813 to cover this.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360360 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-09 17:45:01 +00:00
Nemanja Ivanovic e515896823 [PowerPC][NFC] Add test for D60506 to show differences in code-gen
Differential revision: https://reviews.llvm.org/D61723


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360338 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-09 12:26:39 +00:00
Sam Parker 0008934906 [ARM][CGP] Guard against signext args and sitofp
Add an Argument that has the SExtAttr attached, as well as SIToFP
instructions, as values that generate sign bits. SIToFP doesn't
strictly do this and could be treated as a sink to be sign-extended.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360331 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-09 11:56:16 +00:00