Commit Graph

2875 Commits

Author SHA1 Message Date
Sheng c644488a8b Rename `MCFixedLenDisassembler.h` as `MCDecoderOps.h`
The name `MCFixedLenDisassembler.h` is out of date after D120958.

Rename it as `MCDecoderOps.h` to reflect the change.

Reviewed By: myhsu

Differential Revision: https://reviews.llvm.org/D124987
2022-05-15 08:44:58 +08:00
Vasileios Porpodas fa8a9fea47 Recommit "[SLP][TTI] Refactoring of `getShuffleCost` `Args` to work like `getArithmeticInstrCost`"
This reverts commit 6a9bbd9f20.

Code review: https://reviews.llvm.org/D124202
2022-04-26 14:02:40 -07:00
Chris Bieneman 3143840f21 NFC. Add missing DXILPointerTyID case
This resolves -Werror hexigon build failures.
2022-04-25 20:08:33 -05:00
Krzysztof Parzyszek 0278dee1e5 [Hexagon] Generate TargetConstant in SelectAnyInt
At some point in instruction selection, A2_tfrsi Constant:i32<...> was
created, where the "Constant" came from SelectAnyInt. Since it wasn't
a TargetConstant, it was selected again, leading to
  %vreg = A2_tfrsi ...
  ...   = A2_tfrsi %vreg
which is not a valid code.
2022-04-22 10:36:37 -07:00
Krzysztof Parzyszek 16c93aaa4a [Hexagon] Establish size limit for RegisterSet in hexbit
This should reduce compilation time for huge functions.
2022-04-20 14:16:24 -07:00
Muhammad Omair Javaid 42ebfa8269 Revert "[AArch64] Set maximum VF with shouldMaximizeVectorBandwidth"
This reverts commit 64b6192e81.

This broke LLVM AArch64 buildbot clang-aarch64-sve-vls-2stage:

https://lab.llvm.org/buildbot/#/builders/176/builds/1515

llvm-tblgen crashes after applying this patch.
2022-04-13 04:53:07 +05:00
Matt Arsenault c4ea925f50 AtomicExpand: Change return type for shouldExpandAtomicStoreInIR
Use the same enum as the other atomic instructions for consistency, in
preparation for addition of another strategy.

Introduce a new "Expand" option, since the store expansion does not
use cmpxchg. Alternatively, the existing CmpXChg strategy could be
renamed to Expand.
2022-04-06 22:34:04 -04:00
Simon Pilgrim 60c6e9649d [Hexagon] Fix out of range shift warning. NFC. 2022-04-05 13:45:17 +01:00
Jingu Kang 64b6192e81 [AArch64] Set maximum VF with shouldMaximizeVectorBandwidth
Set the maximum VF of AArch64 with 128 / the size of smallest type in loop.

Differential Revision: https://reviews.llvm.org/D118979
2022-04-05 13:16:52 +01:00
Shao-Ce SUN 662b9fa02c [NFC][CodeGen] Add a setTargetDAGCombine use ArrayRef
Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D122557
2022-03-29 09:53:24 +08:00
Jyotsna Verma 65a2f6ad9c [Hexagon] Create an intrinsic to profile using a custom handler
The intrinsic is lowered into a hexagon pseudo instruction which
after register allocation is expanded into A2_tfrsi and J2_call.
2022-03-28 10:31:41 -05:00
Kazu Hirata 6212871968 [Target] Apply clang-tidy fixes for readability-redundant-member-init (NFC) 2022-03-27 22:22:37 -07:00
Maksim Panchenko 4ae9745af1 [Disassember][NFCI] Use strong type for instruction decoder
All LLVM backends use MCDisassembler as a base class for their
instruction decoders. Use "const MCDisassembler *" for the decoder
instead of "const void *". Remove unnecessary static casts.

Reviewed By: skan

Differential Revision: https://reviews.llvm.org/D122245
2022-03-25 18:53:59 -07:00
Vasileios Porpodas 39aa202aff Recommit "[SLP] Fix lookahead operand reordering for splat loads." attempt 3, fixed assertion crash.
Original review: https://reviews.llvm.org/D121354

This reverts commit e6ead19b77.
2022-03-23 18:32:17 -07:00
Arthur Eubanks e6ead19b77 Revert "Recommit "[SLP] Fix lookahead operand reordering for splat loads." attempt 2, fixed assertion crash."
This reverts commit 27bd8f9492.

Causes crashes, see comments in D121973
2022-03-23 10:57:45 -07:00
Vasileios Porpodas 27bd8f9492 Recommit "[SLP] Fix lookahead operand reordering for splat loads." attempt 2, fixed assertion crash.
Original review: https://reviews.llvm.org/D121354

This reverts commit f7d7d2a08d.
2022-03-22 16:41:55 -07:00
Arthur Eubanks f7d7d2a08d Revert "Recommit "[SLP] Fix lookahead operand reordering for splat loads.""
This reverts commit 79613185d3.

Causes crashes, see comments in https://reviews.llvm.org/D121973.
2022-03-22 13:33:49 -07:00
Vasileios Porpodas 79613185d3 Recommit "[SLP] Fix lookahead operand reordering for splat loads."
Original review: https://reviews.llvm.org/D121354

The original commit 9136145eb0 broke the build on several targets.

Differential Revision: https://reviews.llvm.org/D121973
2022-03-21 15:57:32 -07:00
Philip Reames ee7324b898 Rename mayBeMemoryDependent to mayHaveNonDefUseDependency [nfc] 2022-03-21 10:01:40 -07:00
Shengchen Kan 37b378386e [NFC][CodeGen] Rename some functions in MachineInstr.h and remove duplicated comments 2022-03-16 20:25:42 +08:00
serge-sans-paille ed98c1b376 Cleanup includes: DebugInfo & CodeGen
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup
Differential Revision: https://reviews.llvm.org/D121332
2022-03-12 17:26:40 +01:00
Krzysztof Parzyszek 108910c667 [Hexagon] Handle v2f16 in build_vector in isel 2022-03-07 11:54:24 -08:00
Benjamin Kramer 924eac4942 [Hexagon] Move single-use global tables into their only user and turn them into StringSwitch
Delete the unused globals. NFCI.
2022-03-06 19:23:09 +01:00
Krzysztof Parzyszek 2cd13e8b00 [Hexagon] Recognize "access size" for dcfetch
Dcfetch doesn't really have an access size, but the immediate
offset is scaled as for an 8-byte access, so treat it as such.
2022-03-02 12:57:51 -08:00
Jameson Nash c4b1a63a1b mark getTargetTransformInfo and getTargetIRAnalysis as const
Seems like this can be const, since Passes shouldn't modify it.

Reviewed By: wsmoses

Differential Revision: https://reviews.llvm.org/D120518
2022-02-25 14:30:44 -05:00
Simon Pilgrim 7104f0c4ab [Hexagon] aligned load/store patterns - use cast<> instead of dyn_cast<> to avoid dereference of nullptr
The pointer is always referenced inside isAlignedMemNode, so assert the cast is correct instead of returning nullptr
2022-02-18 10:36:40 +00:00
Roman Lebedev 371fcb720e
[SimplifyCFG][PhaseOrdering] Defer lowering switch into an integer range comparison and branch until after at least the IPSCCP
That transformation is lossy, as discussed in
https://github.com/llvm/llvm-project/issues/53853
and https://github.com/rust-lang/rust/issues/85133#issuecomment-904185574

This is an alternative to D119839,
which would add a limited IPSCCP into SimplifyCFG.

Unlike lowering switch to lookup, we still want this transformation
to happen relatively early, but after giving a chance for the things
like CVP to do their thing. It seems like deferring it just until
the IPSCCP is enough for the tests at hand, but perhaps we need to
be more aggressive and disable it until CVP.

Fixes https://github.com/llvm/llvm-project/issues/53853
Refs. https://github.com/rust-lang/rust/issues/85133

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D119854
2022-02-17 12:13:55 +03:00
Shao-Ce SUN 2aed07e96c [NFC][MC] remove unused argument `MCRegisterInfo` in `MCCodeEmitter`
Reviewed By: skan

Differential Revision: https://reviews.llvm.org/D119846
2022-02-16 13:10:09 +08:00
Krzysztof Parzyszek 02e7479e6b [Hexagon] Add patterns for select(i1, Q, Q) 2022-02-11 09:45:20 -08:00
serge-sans-paille ef736a1c39 Cleanup LLVMMC headers
There's a few relevant forward declarations in there that may require downstream
adding explicit includes:

llvm/MC/MCContext.h no longer includes llvm/BinaryFormat/ELF.h, llvm/MC/MCSubtargetInfo.h, llvm/MC/MCTargetOptions.h
llvm/MC/MCObjectStreamer.h no longer include llvm/MC/MCAssembler.h
llvm/MC/MCAssembler.h no longer includes llvm/MC/MCFixup.h, llvm/MC/MCFragment.h

Counting preprocessed lines required to rebuild llvm-project on my setup:
before: 1052436830
after:  1049293745

Which is significant and backs up the change in addition to the usual benefits of
decreasing coupling between headers and compilation units.

Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup
Differential Revision: https://reviews.llvm.org/D119244
2022-02-09 11:09:17 +01:00
Krzysztof Parzyszek 0792161c00 [Hexagon] Fix operation actions for v128f16
There were more cases of operations that should have been "Custom" for
v128f16, but ended up "Legal" (e.g. load and store).
2022-02-08 15:28:37 -08:00
Krzysztof Parzyszek 7403c02f06 [Hexagon] Fix crash with shuffle_vector of v128f16 2022-02-08 13:05:22 -08:00
Kazu Hirata 3a3cb929ab [llvm] Use = default (NFC) 2022-02-06 22:18:35 -08:00
Krzysztof Parzyszek c935f6e048 [Hexagon] Punt on registers without reaching defs in addr mode opt
This fixes https://github.com/llvm/llvm-project/issues/52636.
2022-02-01 09:52:59 -08:00
Benjamin Kramer f15014ff54 Revert "Rename llvm::array_lengthof into llvm::size to match std::size from C++17"
This reverts commit ef82063207.

- It conflicts with the existing llvm::size in STLExtras, which will now
  never be called.
- Calling it without llvm:: breaks C++17 compat
2022-01-26 16:55:53 +01:00
serge-sans-paille ef82063207 Rename llvm::array_lengthof into llvm::size to match std::size from C++17
As a conquence move llvm::array_lengthof from STLExtras.h to
STLForwardCompat.h (which is included by STLExtras.h so no build
breakage expected).
2022-01-26 16:17:45 +01:00
Nikita Popov aa97bc116d [NFC] Remove uses of PointerType::getElementType()
Instead use either Type::getPointerElementType() or
Type::getNonOpaquePointerElementType().

This is part of D117885, in preparation for deprecating the API.
2022-01-25 09:44:52 +01:00
Jim Lin f533011252 [Hexagon] Use llvm::Register instead of unsigned in HexagonConstExtenders.cpp. NFC.
Reviewed By: kparzysz

Differential Revision: https://reviews.llvm.org/D117851
2022-01-24 16:06:25 +08:00
Jim Lin d6b0734837 [NFC] Use Register instead of unsigned 2022-01-19 20:17:04 +08:00
Pranav Bhandarkar bde1032588 [Hexagon] Fix optimize address mode pass only handle BaseImmOffset mode
This is a fix for a crash in the HexagonOptAddrMode pass that was looking
for the third operand (offset) in the following instruction that does not,
in fact, have a third operand:

  $r1 = L2_loadw_locked $r1

Additionally, this patch also adds an addrMode value to vgather pseudos
in the Hexagon backend.

Differential Revision: https://reviews.llvm.org/D117133
2022-01-14 15:45:23 -08:00
Kazu Hirata f44473ec4e [llvm] Remove redundant member initialization (NFC)
Identified with readability-redundant-member-init.
2022-01-08 11:56:44 -08:00
Vitaly Buka 5c46c1c23a Initialize output parameter
Or code like this have UB passing uninitialized CmpValue:

```
  int64_t CmpMask, CmpValue;
  if (!TII->analyzeCompare(MI, SrcReg, SrcReg2, CmpMask, CmpValue))
    return false;
  if (TII->optimizeCompareInstr(MI, SrcReg, SrcReg2, CmpMask, CmpValue, MRI)) {
```

Detected by msan with:
-Xclang -enable-noundef-analysis -mllvm -msan-eager-checks=1

Differential Revision: https://reviews.llvm.org/D116831
2022-01-07 15:21:22 -08:00
Sumanth Gundapaneni ec2945d031 [Hexagon] Reconize M2_mnaci in HexagonBitTracker 2022-01-07 14:48:29 -08:00
Krzysztof Parzyszek 07ecb98798 [Hexagon] Use map from HexagonDepArch instead of local one, NFC
Co-authored-by: Brian Cain <bcain@quicinc.com>
2022-01-07 13:02:57 -08:00
Krzysztof Parzyszek d9ee9a1419 [Hexagon] Extract condition into function, NFC
Co-authored-by: Brian Cain <bcain@quicinc.com>
2022-01-07 12:35:12 -08:00
Krzysztof Parzyszek dfbe74be63 [Hexagon] Fix release build break after 5476585673 2022-01-07 12:21:02 -08:00
Michael Lambert 028444c2b3 [Hexagon] Duplex error: wrong branch hint 2022-01-07 12:04:01 -08:00
colinl 4096ef3ed7 [Hexagon] Consider direction hint forming dealloc_return duplex 2022-01-07 12:04:00 -08:00
colinl 5476585673 [Hexagon] Improve check for subinstruction registers 2022-01-07 11:33:14 -08:00
Yuanxiang Ye 137642f433 [Hexagon] Reject accumulating on vd.tmp
Added hvx accum checker function and test cases.
2022-01-07 11:13:19 -08:00
Brian Cain 1f71e46f2a [Hexagon] Apply tiny core packet size slots limit 2022-01-07 10:33:12 -08:00
colinl a247360173 [Hexagon] Simplify AX instruction detection 2022-01-07 10:33:12 -08:00
Brian Cain 9af53d2f0c [Hexagon] s/Fatal/ReportErrors/
Rename argument from 'Fatal' => 'ReportErrors'.  HexagonShuffler refers to
this arg as 'ReportErrors' and calling it 'Fatal' in HexagonMCShuffler is
misleading and inconsistent.
2022-01-07 08:27:34 -08:00
Brian Cain a58a062fba [Hexagon] Show slot resources for errors
For a scalar packet resource error, emit details about the slots
available for each instruction in the packet.
2022-01-07 08:27:33 -08:00
Krzysztof Parzyszek 88397739a3 [Hexagon] Misc shuffling fixes
Co-authored-by: Brian Cain <bcain@quicinc.com>
2022-01-07 08:27:33 -08:00
Kazu Hirata f3a344d212 [Target] Remove redundant member initialization (NFC)
Identified with readability-redundant-member-init.
2022-01-06 22:01:44 -08:00
Colin LeMahieu e37b6a67f8 [Hexagon] Some compound opportunities missed in presence of branches
The lld testcase change from ddf1fb1f should take care of the build
breakage from before.
2022-01-06 14:16:23 -08:00
Brian Cain ddf1fb1f13 [Hexagon] Save results from partial compound
Previously compounding was all-or-nothing.  Now, the
compounding attempts will iterate and yield the most
compounds that still result in a valid packet.
2022-01-06 14:08:33 -08:00
Nico Weber 6c255ac969 Revert "[Hexagon] Some compound opportunities missed in presence of branches"
This reverts commit afdc6a0b8e.
Breaks check-lld, see e.g.:
https://lab.llvm.org/buildbot/#/builders/123/builds/8100/steps/8/logs/stdio
2022-01-06 15:32:14 -05:00
Colin LeMahieu afdc6a0b8e [Hexagon] Some compound opportunities missed in presence of branches 2022-01-06 09:25:56 -08:00
Brian Cain b17f036a99 [Hexagon] Consider HVX reg aliases for .cur warning 2022-01-06 08:59:08 -08:00
Ikhlas Ajbar 2819e5de42 [Hexagon] Handle instruction selection for select(I1,Q,Q)
Lower select(I1,Q,Q) by converting vector predicate Q to vector register V,
doing select(I1,V,V), and then converting the resulting V back to Q. Also,
try to avoid creating such situations in the first place.
2022-01-05 14:50:12 -08:00
Ikhlas Ajbar 3892baaa71 [Hexagon] Replace isImmValidForOpcode() with isExtendable flag 2022-01-05 13:19:02 -08:00
Krzysztof Parzyszek f6309db719 [Hexagon] Handle L2_loadb[sz]w[24]_io in HII::isValidOffset 2022-01-05 13:19:02 -08:00
Sumanth Gundapaneni 9d0f5c1f8e [Hexagon] Add missing memop instructions to HexagonInstrInfo
This patch updated HexagonInstrInfo API to deal with missing immediate
memop instructions that checks for the validity of the offset.
2022-01-05 13:19:02 -08:00
Sumanth Gundapaneni 69deb3c829 [Hexagon] Update instruction info for missing .cur post-increment cases 2022-01-05 13:19:02 -08:00
Shubham Pawar 41085357df [Hexagon] Extend OptAddrMode pass to vgather
This change extends the addressing mode optimization
pass to HVX vgather. This is specifically intended to
resolve compiler not generating indexed addresses for
vgather stores to vtcm. Changed the vgather pseudo
instructions to accept an immediate operand and handled
addition of appropriate immediate operand in addressing
mode optimization pass.
2022-01-05 08:44:21 -08:00
Joshua Herrera 9aa017342c [Hexagon] Add setting hvx-qfloat in HexagonMCSubtargetInfo 2022-01-05 07:54:33 -08:00
Mikael Holmen e2078d56ed [Hexagon] Fix warning about unused variable when compiling without asserts 2022-01-05 08:35:16 +01:00
Sumanth Gundapaneni 822448635e [Hexagon] Fix MachineSink not to hoist FP instructions that update USR.
Ideally we should make USR as Def for these floating point instructions.
However, it violates some assembler MCChecker rules. This patch fixes
the issue by marking these FP instructions as non-sinkable.
2022-01-04 15:55:22 -08:00
SANTANU DAS 52f347010a [Hexagon] Make A2_tfrsi not cheap for operands exceeding 16 bits
This patch aids to reduce code size since it removes generation
of back-to-back A2_tfrsi instructions. It is enabled only at -Os/-Oz.
2022-01-04 15:46:26 -08:00
Krzysztof Parzyszek 60944d132f [Hexagon] Convert codegen testcase from .ll to .mir 2022-01-04 15:41:32 -08:00
Brendon Cahoon 090f8ec8a8 [Hexagon] Fix some issues with packetizing slot0-only instructions 2022-01-04 14:35:37 -08:00
Harsha Jagasia 2b1c6df5a6 [Hexagon] Performance regression with b2b
For code below:
        {
                r7 = addasl(r3,r0,#2)
                r8 = addasl(r3,r2,#2)
                r5 = memw(r3+r0<<#2)
                r6 = memw(r3+r2<<#2)
        }
        {
                p1 = cmp.gtu(r6,r5)
                if (p1.new) memw(r8+#0) = r5
                if (p1.new) memw(r7+#0) = r6
        }
        {
                r0 = mux(p1,r2,r4)

        }

In packetizer, a new packet is created for the cmp instruction since
there arent enough resources in previous packet. Also it is determined
that the cmp stalls by 2 cycles since it depends on the prior load of r5.
In current packetizer implementation, the predicated store is evaluated
for whether it can go in the same packet as compare, and since the compare
stalls, the stall of the predicated store does not matter and it can go in
the same packet as the cmp. However the predicated store will stall for
more cycles because of its dependence on the addasl instruction and to
avoid that stall we can put it in a new packet.

Improve the packetizer to check if an instruction being added to packet
will stall longer than instruction already in packet and if so create a
new packet.
2022-01-04 14:09:47 -08:00
SANTANU DAS cff1a2ed51 [Hexagon] HVX .new store uses different resources
When checking resources in the post RA scheduler, see if a .new
vector store should be used instead of a regular vector store.

It may not be possible to schedule a regular vector store, but
it may be possible to schedule a .new version. If the correct one
isn't used, then the post RA scheduler may not generate the best
schedule.
2022-01-04 13:35:34 -08:00
Ikhlas Ajbar d6a68d08f3 [Hexagon] Refactor updateLatency() function
Co-authored-by: Sumanth Gundapaneni <sgundapa@quicinc.com>
2022-01-04 13:16:54 -08:00
Sumanth Gundapaneni 9b63fff3db [Hexagon] Update latencies on REG_SEQUENCE/COPY based on successors.
If there are multiple uses of the def of COPY/REG_SEQUENCE, set the
latency only if the latencies on all the uses are equal, otherwise set
it to default.
2022-01-04 12:30:30 -08:00
Brendon Cahoon db5b791595 [Hexagon] Fix an instruction move in HexagonVectorCombine
The HexagonVectorCombine pass was moving an instruction
incorrectly, which caused a use in a GEP that was not yet
defined.

HexagonVectorCombine removes a load from a group due to its
dependences, but in realignGroup, the load is processed anyways.
In realignGroup, when determining the maximum alignment, only
those instructions still in the group should be considered.
2022-01-04 11:41:42 -08:00
Tasmia Rahman e88eb6443f [Hexagon] Fix buildVector32 for v4i8 constants
The code for constructing a 32-bit constant from 4 8-bit constants has
a typo and uses one of the constants twice
2022-01-04 11:19:15 -08:00
Krzysztof Parzyszek 78f5014fea [Hexagon] Conversions to/from FP types, HVX and scalar
Co-authored-by: Anirudh Sundar Subramaniam <quic_sanirudh@quicinc.com>
Co-authored-by: Sumanth Gundapaneni <sgundapa@quicinc.com>
2022-01-04 11:03:51 -08:00
Kazu Hirata e5947760c2 Revert "[llvm] Remove redundant member initialization (NFC)"
This reverts commit fd4808887e.

This patch causes gcc to issue a lot of warnings like:

  warning: base class ‘class llvm::MCParsedAsmOperand’ should be
  explicitly initialized in the copy constructor [-Wextra]
2022-01-03 11:28:47 -08:00
Kazu Hirata fd4808887e [llvm] Remove redundant member initialization (NFC)
Identified with readability-redundant-member-init.
2022-01-01 16:18:18 -08:00
Kazu Hirata dd2ad7fa47 [Target] Use range-based for loops (NFC) 2022-01-01 10:14:05 -08:00
Kazu Hirata f8f5f1b3a4 [Hexagon] Use range-based for loops (NFC) 2021-12-31 15:17:25 -08:00
Krzysztof Parzyszek db83e3e507 [Hexagon] Generate HVX/FP arithmetic instructions
Co-authored-by: Anirudh Sundar Subramaniam <quic_sanirudh@quicinc.com>
Co-authored-by: Sumanth Gundapaneni <sgundapa@quicinc.com>
Co-authored-by: Joshua Herrera <joshherr@quicinc.com>
2021-12-30 12:47:30 -08:00
Krzysztof Parzyszek 9e6afbedb0 [Hexagon] Generate HVX/FP compare instructions
Co-authored-by: Anirudh Sundar Subramaniam <quic_sanirudh@quicinc.com>
2021-12-30 12:17:22 -08:00
Krzysztof Parzyszek e107374e40 [Hexagon] Explicitly use integer types when rescaling a mask 2021-12-30 10:14:00 -08:00
Krzysztof Parzyszek eb574259b6 [Hexagon] Handle HVX/FP {masked,wide} loads/stores
Co-authored-by: Rahul Utkoor <quic_rutkoor@quicinc.com>
Co-authored-by: Anirudh Sundar Subramaniam <quic_sanirudh@quicinc.com>
2021-12-30 10:14:00 -08:00
Krzysztof Parzyszek cd997689f2 [Hexagon] Fix isTypeForHVX to recognize floating point types
Co-authored-by: Sumanth Gundapaneni <sgundapa@quicinc.com>
2021-12-30 10:01:05 -08:00
Krzysztof Parzyszek 23423638cc [Hexagon] Handle HVX/FP shuffles, insertion and extraction
Co-authored-by: Anirudh Sundar Subramaniam <quic_sanirudh@quicinc.com>
2021-12-30 08:44:10 -08:00
Krzysztof Parzyszek 95c7dd8810 Revert "[Hexagon] Don't build two halves of HVX vector in parallel"
This reverts commit ba07f300c6.

A build-vector sequence is made of pairs: rotate+insert. When constructing
a single vector, this results in a chain of 2*N instructions. The rotate
operation is a permute operation, but the insert uses a multiplication
resource: insert and rotate can execute in the same cycle, but obviously
they cannot operate on the same vector. The original halving idea is still
beneficial since it does allow for insert/rotate overlap, and for hiding
insert's latency.
2021-12-30 07:57:11 -08:00
Krzysztof Parzyszek ba07f300c6 [Hexagon] Don't build two halves of HVX vector in parallel
There can only be one permute operations per packet, so this actually
pessimizes the code (due to the extra "or").
2021-12-29 11:00:01 -08:00
Joshua Herrera 505d57486e [Hexagon] Improve BUILD_VECTOR codegen
For vectors with repeating values, old codegen would rotate and insert
every duplicate element. This patch replaces that behavior with a splat
of the most common element, vinsert/vror only occur when needed.
2021-12-29 10:18:21 -08:00
Krzysztof Parzyszek 4df2aba294 [Hexagon] Calling conventions for floating point vectors
They are the same as for the other HVX vectors, but types need to be
listed explicitly. Also, add a detailed codegen testcase.

Co-authored-by: Abhikrant Sharma <quic_abhikran@quicinc.com>
2021-12-29 09:01:07 -08:00
Krzysztof Parzyszek 2ce586bc49 [Hexagon] Handle floating point splats
Co-authored-by: Anirudh Sundar Subramaniam <quic_sanirudh@quicinc.com>
2021-12-29 06:52:24 -08:00
Krzysztof Parzyszek 33fc675e16 [Hexagon] Handle floating point vector loads/stores 2021-12-29 05:52:39 -08:00
Kazu Hirata 8414321bec [Hexagon] Use range-based for loops (NFC) 2021-12-28 23:47:25 -08:00
Krzysztof Parzyszek 6a6ac3b36f [Hexagon] Support BUILD_VECTOR of floating point HVX vectors
Co-authored-by: Anirudh Sundar Subramaniam <quic_sanirudh@quicinc.com>
Co-authored-by: Ankit Aggarwal <aankit@quicinc.com>
2021-12-28 14:59:08 -08:00
Krzysztof Parzyszek 7df136bcf2 [Hexagon] Delete unused declaration of LowerHvxMul, NFC 2021-12-28 11:36:07 -08:00
Brian Cain 1e7bd93ff2 [Hexagon] Add HexagonMCInstrInfo::IsABranchingInst, NFC 2021-12-28 09:51:27 -08:00