Commit Graph

723 Commits

Author SHA1 Message Date
Brendon Cahoon c5c6cf3239 [Hexagon] Implement noreturn optimization
Eliminate the stack frame in functions with the noreturn nounwind
attributes, and when the noreturn-stack-elim target feature is
enabled. This reduces the code and stack space needed for noreturn
functions.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346532 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 18:16:24 +00:00
Krzysztof Parzyszek dab756ad3e [Hexagon] Place globals with explicit .sdata section in small data
Both -fPIC and -G0 disable placement of globals in small data section,
but if a global has an explicit section assigmnent placing it in small
data, it should go there anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346523 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09 17:31:22 +00:00
Krzysztof Parzyszek b7577abc11 [Hexagon] Do not reduce load size for globals in small-data
Small-data (i.e. GP-relative) loads and stores allow 16-bit scaled
offset. For a load of a value of type T, the small-data area is
equivalent to an array "T sdata[65536]". This implies that objects
of smaller sizes need to be closer to the beginning of sdata,
while larger objects may be farther away, or otherwise the offset
may be insufficient to reach it. Similarly, an object of a larger
size should not be accessed via a load of a smaller size.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345975 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-02 14:17:47 +00:00
Daniel Sanders 14550f9fb5 [MC] Implement EmitRawText in MCNullStreamer
Summary:
This adds dummy implementation of `EmitRawText` in `MCNullStreamer`.

This fixes the behavior of `AsmPrinter` with `MCNullStreamer` on targets
on which no integrated assembler is used. An attempt to emit inline asm
on such a target would previously lead to a crash, since `AsmPrinter` does not
check for `hasRawTextSupport` in `EmitInlineAsm` and calls `EmitRawText`
anyway if integrated assembler is disabled (the behavior has changed
in D2686).

Error message printed by MCStreamer:

> EmitRawText called on an MCStreamer that doesn't support it, something
> must not be fully mc'ized

Patch by Eugene Sharygin

Reviewers: dsanders, echristo

Reviewed By: dsanders

Subscribers: eraman, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345841 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-01 15:41:11 +00:00
Krzysztof Parzyszek aaf702f58f [Hexagon] Make sure not to use GP-relative addressing with PIC
Make sure that -relocation-model=pic prevents use of GP-relative
addressing modes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345731 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-31 15:54:31 +00:00
Matthias Braun 83c015bd73 MachineOperand/MIParser: Do not print debug-use flag, infer it
The debug-use flag must be set exactly for uses on DBG_VALUEs.  This is
so obvious that it can be trivially inferred while parsing. This will
reduce noise when printing while omitting an information that has little
value to the user.

The parser will keep recognizing the flag for compatibility with old
`.mir` files.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345671 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-30 23:28:27 +00:00
Fangrui Song 5fca605075 [Pipeliner] Mark swp-art-deps-rec.ll as REQUIRES: asserts after rL345319
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345359 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-26 03:15:56 +00:00
Sumanth Gundapaneni 4b57585e55 [Pipeliner] Ignore Artificial dependences while computing recurrences.
The artificial dependencies are not real dependencies. In some cases, they
form circuits with bigger MII. However, they are used to schedule instructions
better.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345319 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-25 21:27:08 +00:00
Justin Bogner db46784d64 Reapply "[MachineCopyPropagation] Reimplement CopyTracker in terms of register units"
Recommits r342942, which was reverted in r343189, with a fix for an
issue where we would propagate unsafely if we defined only the upper
part of a register.

Original message:

  Change the copy tracker to keep a single map of register units
  instead of 3 maps of registers. This gives a very significant
  compile time performance improvement to the pass. I measured a
  30-40% decrease in time spent in MCP on x86 and AArch64 and much
  more significant improvements on out of tree targets with more
  registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344942 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-22 19:51:31 +00:00
Krzysztof Parzyszek 0129666367 [Hexagon] Remove support for V4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344791 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-19 17:31:11 +00:00
Fangrui Song 5eae65a2bb [pipeliner] Fix test added in rL344748 to require asserts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344775 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-19 06:20:01 +00:00
Sumanth Gundapaneni 39197f38a5 [Pipeliner] copyToPhi DAG Mutation to improve scheduling.
In a loop, create artificial dependences between the source of a
COPY/REG_SEQUENCE to the use in next iteration.

Eg:
SRC ----Data Dep--> COPY
COPY ---Anti Dep--> PHI (implies, to be used in next iteration)
PHI ----Data Dep--> USE

This patches creates
USE ----Artificial Dep---> SRC

This will effectively schedule the COPY late to eliminate additional copies.
Before this patch, the schedule can be
SRC, COPY, USE : The COPY is used in next iteration and it needs to be
preserved.

After this patch, the schedule can be
USE, SRC, COPY : The COPY is used in next iteration and the live interval is
reduced.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344748 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-18 15:51:16 +00:00
Bjorn Pettersson ffc5ec8c81 [TwoAddressInstructionPass] Replace subregister uses when processing tied operands
Summary:
TwoAddressInstruction pass typically rewrites
  %1:short = foo %0.sub_lo:long
as
  %1:short = COPY %0.sub_lo:long
  %1:short = foo %1:short
when having tied operands.

If there are extra un-tied operands that uses the same reg and
subreg, such as the second and third inputs to fie here:
  %1:short = fie %0.sub_lo:long, %0.sub_hi:long, %0.sub_lo:long
then there was a bug which replaced the register %0 also for
the un-tied operand, but without changing the subregister indices.
So we used to get:
  %1:short = COPY %0.sub_lo:long
  %1:short = fie %1, %1.sub_hi:short, %1.sub_lo:short
With this fix we instead get:
  %1:short = COPY %0.sub_lo:long
  %1:short = fie %1, %0.sub_hi:long, %1

Reviewers: arsenm, JesperAntonsson, kparzysz, MatzeB

Reviewed By: MatzeB

Subscribers: bjope, kparzysz, wdng, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344492 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-15 08:36:03 +00:00
Sumanth Gundapaneni 2141d14618 [Hexagon] Restrict compound instructions with constant value.
Having a constant value operand in the compound instruction
is not always profitable. This patch improves coremark by ~4% on
Hexagon.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344284 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-11 19:48:15 +00:00
Nirav Dave df002d74e3 [DAGCombine] Improve Load-Store Forwarding
Summary:
Extend analysis forwarding loads from preceeding stores to work with
extended loads and truncated stores to the same address so long as the
load is fully subsumed by the store.

Hexagon's swp-epilog-phis.ll and swp-memrefs-epilog1.ll test are
deleted as they've no longer seem to be relevant.

Reviewers: RKSimon, rnk, kparzysz, javed.absar

Subscribers: sdardis, nemanjai, hiraditya, atanasyan, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344142 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-10 14:15:52 +00:00
Krzysztof Parzyszek 4cd3487f7f [Hexagon] Fix extracting subvectors of non-HVX vNi1
Patch by Brendon Cahoon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@343596 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-02 15:05:43 +00:00
Krzysztof Parzyszek beae29ccd4 [Hexagon] Remove incorrect pattern for swiz
The pattern had a couple of problems:
- It was checking for loads of bytes in the reverse order to what it
  should have been looking for.
- It would replace loads of bytes with a load of a word without making
  sure that the alignment was correct.

Thanks to Eli Friedman for pointing it out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@343514 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-01 18:24:40 +00:00
Bjorn Pettersson 32a3289434 [MachineVerifier] Relax checkLivenessAtDef regarding dead subreg defs
Summary:
Consider an instruction that has multiple defs of the same
vreg, but defining different subregs:
  %7.sub1:rc, dead %7.sub2:rc = inst

Calling checkLivenessAtDef for the live interval associated
with %7 incorrectly reported "live range continues after a
dead def". The live range for %7 has a dead def at the slot
index for "inst" even if the live range continues (given that
there are later uses of %7.sub1).

This patch adjusts MachineVerifier::checkLivenessAtDef
to allow dead subregister definitions, unless we are checking
a subrange (when tracking subregister liveness).

A limitation is that we do not detect the situation when the
live range continues past an instruction that defines the
full virtual register by multiple dead subreg defines.

I also removed some dead code related to physical register
in checkLivenessAtDef. Wwe only call that method for virtual
registers, so I added an assertion instead.

Reviewers: kparzysz

Reviewed By: kparzysz

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342618 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-20 06:59:18 +00:00
Michael Berg 9de32f78e1 Copy utilities updated and added for MI flags
Summary: This patch adds a GlobalIsel copy utility into MI for flags and updates the instruction emitter for the SDAG path.  Some tests show new behavior and I added one for GlobalIsel which mirrors an SDAG test for handling nsw/nuw.

Reviewers: spatel, wristow, arsenm

Reviewed By: arsenm

Subscribers: wdng

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342576 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-19 18:52:08 +00:00
Krzysztof Parzyszek 00a938c3c1 [PostRASink] Make sure to remove subregisters from live-ins as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342492 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-18 16:10:51 +00:00
Krzysztof Parzyszek 5d5475af09 [Hexagon] Use shuffles when lowering "gather" shufflevectors
Shufflevector instructions in LLVM IR that extract a subset of elements
of a longer input into a shorter vector can be done using VECTOR_SHUFFLEs.
This will avoid expanding them into constly extracts and inserts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342091 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-12 22:14:52 +00:00
Roman Lebedev b866f37ebd [Hexagon] [Test] Remove undef and infinite loop from test
Summary:
The undef and the infinite loop at the end cause this test to be translated
unpredictably. In particular, the checked-for `mpy` disappears under
certain legal optimizations (e.g. the one in D50222).
Since the use of these constructs is not relevant to the behavior tested,
according to the header comment, this change, suggested by @kparzysz,
eliminates them.

Was initially committed in r341046, but was reverted.

Patch by: hermord (Dmytro Shynkevych)!

Reviewers: kparzysz

Reviewed By: kparzysz

Subscribers: lebedev.ri, llvm-commits, kparzysz

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341943 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-11 14:06:14 +00:00
Sid Manning a06762109f Add support for getRegisterByName.
Support required to build the Hexagon Linux kernel.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341658 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-07 13:36:21 +00:00
Krzysztof Parzyszek 09f9778d84 [Hexagon] Don't packetize new-value stores with any other stores
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341409 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-04 21:07:27 +00:00
Sid Manning c4a79cd8d6 Revert [Hexagon] Add support for getRegisterByName.
Support required to build the Hexagon Linux kernel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341331 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-03 17:59:10 +00:00
Sid Manning 8a0d68fb02 [Hexagon] Add support for getRegisterByName.
Support required to build the Hexagon Linux kernel.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341238 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-31 19:08:23 +00:00
Krzysztof Parzyszek 07df95450a [Hexagon] Check validity of register class when generating bitsplit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341137 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-30 22:26:43 +00:00
Roman Lebedev af61b7b6b9 Revert "[Hexagon][Test] Remove undef and infinite loop from test"
Bots are unhappy:

/Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-incremental/llvm/test/CodeGen/Hexagon/swp-const-tc2.ll:10:14: error: CHECK-NOT: excluded string found in input
; CHECK-NOT: = mpy
             ^
<stdin>:22:6: note: found here
 r5 += mpyi(r2,r3)
     ^~~~~

This reverts commit r341046.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341049 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-30 10:01:03 +00:00
Roman Lebedev c5079f070c [Hexagon][Test] Remove undef and infinite loop from test
Summary:
As suggested in D50222, this has been refactored into a separate patch.

The undef and the infinite loop at the end cause this test to be translated
unpredictably. In particular, the checked-for `mpy` disappears under
certain legal optimizations (e.g. the one in D50222).
Since the use of these constructs is not relevant to the behavior tested,
according to the header comment, this change, suggested by @kparzysz,
eliminates them.

Patch by: hermord (Dmytro Shynkevych)!

Reviewers: kparzysz

Reviewed By: kparzysz

Subscribers: llvm-commits, kparzysz

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341046 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-30 09:32:15 +00:00
Brendon Cahoon 6d962e3374 [Pipeliner] Fix incorrect phi values in the epilog and kernel
The code that generates the loop definition operand for phis
in the epilog and kernel is incorrect in some cases.

In the kernel, when a phi refers to another phi, the code that
updates PhiOp2 needs to include the stage difference between
the two phis.

In the epilog, the check for using the loop definition instead
of the phi definition uses the StageDiffAdj value (the difference
between the phi stage and the loop definition stage), but the
adjustment is not needed to determine if the current stage
contains an iteration with the loop definition.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340782 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-27 22:04:50 +00:00
Bjorn Pettersson 9a9829f273 [CodeGen] Set FrameSetup/FrameDestroy on BUNDLE instructions
Summary:
If any of the bundled instructions are marked as FrameSetup
or FrameDestroy, then that property is set on the BUNDLE
instruction as well.

As long as the scheduler/packetizer aren't mixing
prologue/epilogue instructions (i.e. all the bundled
instructions have the same property) then this simply gives
the bundle the correct property (so when using a bundle
iterator in late passes a bundle will be correctly identified
as FrameSetup/FrameDestroy).

When for example bundling a mix of FrameSetup instructions
with non-FrameSetup instructions it could be discussed if
the bundle should have the property or not. The choice here
has been to set these properties on the BUNDLE instruction if
any of the bundled instructions have the property set.

Reviewers: #debug-info, kparzysz

Reviewed By: kparzysz

Subscribers: vsk, thegameg, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340680 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-25 11:26:17 +00:00
Krzysztof Parzyszek 34868d785f [Hexagon] Enable interleaving in loop vectorizer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340447 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-22 20:15:04 +00:00
Bjorn Pettersson 6a7eb84023 Change how finalizeBundle selects debug location for the BUNDLE instruction
Summary:
Previously a BUNDLE instruction inherited the DebugLoc from the
first instruction in the bundle, even if that DebugLoc had no
DILocation. With this commit this is changed into selecting the
first DebugLoc that has a DILocation, by searching among the
bundled instructions.

The idea is to reduce amount of bundles that are lacking
debug locations.

Reviewers: #debug-info, JDevlieghere

Reviewed By: JDevlieghere

Subscribers: JDevlieghere, mattd, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340267 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-21 10:59:50 +00:00
Krzysztof Parzyszek c7000f73ec [Hexagon] Expand vgather pseudos during packetization
This will allow packetizing the vgather expansion with other instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340028 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-17 14:24:24 +00:00
Krzysztof Parzyszek 0ea64366b0 [Hexagon] Map ISD::TRAP to J2_trap0(#0)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339365 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-09 18:03:45 +00:00
Krzysztof Parzyszek 18b615c164 [Hexagon] Diagnose misaligned absolute loads and stores
Differential Revision: https://reviews.llvm.org/D50405


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339272 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-08 17:00:09 +00:00
Krzysztof Parzyszek 9b5ab2cc21 [Hexagon] Allow use of gather intrinsics even with no-packets
Vgather requires must be in a packet with a store, which contradicts
the no-packets feature. As a consequence, gather/scatter could not be
used with no-packets. Relax this, and allow gather packets as exceptions
to the no-packets requirements.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339177 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-07 20:33:47 +00:00
Krzysztof Parzyszek 0b5d0cfa8e [Hexagon] Simplify CFG after atomic expansion
This will remove suboptimal branching from the generated ll/sc loops.
The extra simplification pass affects a lot of testcases, which have
been modified to accommodate this change: either by modifying the
test to become immune to the CFG simplification, or (less preferablt)
by adding option -hexagon-initial-cfg-clenaup=0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338774 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-02 22:17:53 +00:00
Krzysztof Parzyszek 2618edfa4c [Hexagon] Simplify A4_rcmp[n]eqi R, 0
Consider cases when register R is known to be zero/non-zero, or when it
is defined by a C2_muxii instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338251 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-30 14:28:02 +00:00
Krzysztof Parzyszek a9364fc185 [Hexagon] Properly scale bit index when extracting elements from vNi1
For example v = <2 x i1> is represented as bbbbaaaa in a predicate register,
where b = v[1], a = v[0]. Extracting v[1] is equivalent to extracting bit 4
from the predicate register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337934 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25 16:20:59 +00:00
Krzysztof Parzyszek 6884c73229 [Hexagon] Handle unnamed globals in HexagonConstExpr
Instead of comparing names, compare positions in the parent module.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337723 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-23 18:30:17 +00:00
Krzysztof Parzyszek 15f33310a8 [Hexagon] Disable packets in test to avoid ordering issues in checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337624 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-20 21:55:55 +00:00
Krzysztof Parzyszek e29dbca952 [Hexagon] Avoid introducing calls into coalesced range of HVX vector pairs
If an HVX vector register is to be coalesced into a vector pair, make
sure that the vector pair will not have a function call in its live range,
unless it already had one. All HVX vector registers are volatile, so
any vector register live across a function call will have to be spilled.

If a vector needs to be spilled, and it's coalesced into a vector pair
then the whole pair will need to be spilled (even if only a part of it is
live), taking extra stack space.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337073 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-13 23:42:29 +00:00
Krzysztof Parzyszek d94b2b4b7f [Hexagon] Change .mir testcase to make sure function is not in SSA form
If a machine function satisfies SSA, the IsSSA property is assumed even
if the pass to be executed runs after existing from SSA. If the pass
output then does not conform to SSA, a verifier error will be flagged
(with expensive checks enabled).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336682 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-10 14:49:54 +00:00
Krzysztof Parzyszek c5c3efb2ec [Hexagon] Add implicit uses even when untied explicit uses are present
An explicit untied use is not sufficient to maintain liveness of a
register redefined in a predicated instruction. For example
  %1 = COPY %0
  ...
  %1 = A2_paddif %2, %1, 1
could become
  $r1 = COPY $r0
  ...
  $r1 = A2_paddif $p0, $r1, 1
and later
  $r1 = COPY $r0                ;; this is not really dead!
  ...
  $r1 = A2_paddif $p0, $r0, 1


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336662 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-10 12:57:49 +00:00
Simon Pilgrim 93aa3932e7 [DAGCombiner] Ensure we use the correct CC result type in visitSDIV (REAPPLIED)
We could get away with it for constant folded cases, but not for rL335719.

Thanks to Krzysztof Parzyszek for noticing.

Reapply original commit rL335821 which was reverted at rL335871 due to a WebAssembly bug that was fixed at rL335884.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335886 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-28 17:33:41 +00:00
Haojian Wu 5ed53954fb Revert "[DAGCombiner] Ensure we use the correct CC result type in visitSDIV"
This reverts commit r335821.

This crashes the webassembly test, run "ninja check-llvm-codegen-webassembly" to reproduce.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335871 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-28 16:25:57 +00:00
Simon Pilgrim 5796a8d871 [DAGCombiner] Ensure we use the correct CC result type in visitSDIV
We could get away with it for constant folded cases, but not for rL335719.

Thanks to Krzysztof Parzyszek for noticing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335821 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-28 09:54:28 +00:00
Brendon Cahoon 6b3e4d2fb7 [Hexagon] Add a "generic" cpu
Add the generic processor for Hexagon so that it can be used
with 3rd party programs that create a back-end with the
"generic" CPU. This patch also enables the JIT for Hexagon.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335641 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-26 18:44:05 +00:00
Krzysztof Parzyszek 40afa1876f [Hexagon] Replace .ll test for expanding post-ra pesudos with .mir
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335158 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-20 19:22:27 +00:00