OSDN Git Service
Changpeng Fang [Thu, 18 Jan 2018 22:57:57 +0000 (22:57 +0000)]
AMDGPU/SI: Fix typos in d16 support patch the buffer intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322906
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 18 Jan 2018 22:55:43 +0000 (22:55 +0000)]
[CodeView] Add line numbers for inlined call sites
We did this for inline call site line tables, but we hadn't done it for
regular function line tables yet. This patch copies that logic from
encodeInlineLineTable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322905
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 18 Jan 2018 22:55:14 +0000 (22:55 +0000)]
[CodeView] Sink complex inline functions to .cpp file, NFC
I'm cleaning up this code before I attempt to fix a line table bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322904
91177308-0d34-0410-b5e6-
96231b3b80d8
Changpeng Fang [Thu, 18 Jan 2018 22:08:53 +0000 (22:08 +0000)]
AMDGPU/SI: Add d16 support for image intrinsics.
Summary:
This patch implements d16 support for image load, image store and image sample intrinsics.
Reviewers:
Matt, Brian.
Differential Revision:
https://reviews.llvm.org/D3991
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322903
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 18 Jan 2018 21:45:51 +0000 (21:45 +0000)]
Typo fix SIBABRT -> SIGABRT.
Based on a patch by Henry Wong!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322902
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Thu, 18 Jan 2018 21:21:48 +0000 (21:21 +0000)]
[test] Actually check the common parts in CodeGen/ARM/global-merge-external.ll. NFC.
Previously, these parts weren't ever checked. The label patterns
need to be extended to match successfully on macho.
Differential Revision: https://reviews.llvm.org/D42126
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322900
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 18 Jan 2018 20:49:33 +0000 (20:49 +0000)]
Support: Add missing #include.
This #include is necessary to provide the definitions of _fpclass
and _FPCLASS_NZ when building with libc++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322885
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Thu, 18 Jan 2018 20:33:35 +0000 (20:33 +0000)]
[DWARFv5] Number the line-table's directory array correctly.
The compilation directory has always been #0, but as of DWARF v5 it is
explicitly listed in the line-table section instead of implicitly
being a reference to the compile_unit DIE's DW_AT_comp_dir attribute.
This means the dumper should number the dumped array starting with 0
or 1 depending on the DWARF version of the line table.
References in the generated DWARF are correct, it's just the dumper
that was wrong. Also some assembler-coded tests were similarly
confused about directory numbers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322884
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Thu, 18 Jan 2018 19:57:35 +0000 (19:57 +0000)]
we have now https support for apt.llvm.org. Updating the URL
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322881
91177308-0d34-0410-b5e6-
96231b3b80d8
Dimitry Andric [Thu, 18 Jan 2018 19:30:30 +0000 (19:30 +0000)]
Follow-up to rL322875 by initializing the do_libcxxabi variable properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322879
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Thu, 18 Jan 2018 19:21:27 +0000 (19:21 +0000)]
[AArch64][GlobalISel] Add isel support for global values in the large code model.
Fixes PR35958.
Differential Revision: https://reviews.llvm.org/D42175
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322878
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 18 Jan 2018 19:17:26 +0000 (19:17 +0000)]
[X86][SSE] Regenerate vector promotion tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322877
91177308-0d34-0410-b5e6-
96231b3b80d8
Ana Pazos [Thu, 18 Jan 2018 18:54:05 +0000 (18:54 +0000)]
[RISCV] Fixed setting predicates for compressed instructions.
Summary:
Fixed setting predicates for compressed instructions.
Some instructions were being generated with C extension
enabled only, without proper checks for the other
required extensions like F, D and 32 and 64-bit target checks.
Affected instructions:
C_FLD, C_FLW, C_LD, C_FSD, C_FSW, C_SD,
C_JAL, C_ADDIW, C_SUBW, C_ADDW,
C_FLDSP, C_FLWSP, C_LDSP, C_FSDSP, C_FSWSP, C_SDSP
Reviewers: asb, shiva0217
Reviewed By: asb
Subscribers: rbar, johnrusso, simoncook, jordy.potman.lists, sabuasal, niosHD, llvm-commits
Differential Revision: https://reviews.llvm.org/D42132
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322876
91177308-0d34-0410-b5e6-
96231b3b80d8
Dimitry Andric [Thu, 18 Jan 2018 18:39:13 +0000 (18:39 +0000)]
Add a -no-libcxxabi option to the test-release.sh script.
On FreeBSD, it is currently not possible to build libcxxabi and link
against it, so we have been building releases with -no-libs for quite
some time.
However, libcxx and libunwind should build without problems, so provide
an option to skip just libcxxabi.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322875
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 18 Jan 2018 18:38:32 +0000 (18:38 +0000)]
[X86][AVX] Add 256/512-bit slow PMULLD tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322874
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 18 Jan 2018 18:35:01 +0000 (18:35 +0000)]
Speed up iteration of CodeView record streams.
There's some abstraction overhead in the underlying
mechanisms that were being used, and it was leading to an
abundance of small but not-free copies being made. This
showed up on a profile. Eliminating this and going back to
a low-level byte-based implementation speeds up lld with
/DEBUG between 10 and 15%.
Differential Revision: https://reviews.llvm.org/D42148
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322871
91177308-0d34-0410-b5e6-
96231b3b80d8
Francis Visoiu Mistrih [Thu, 18 Jan 2018 18:05:15 +0000 (18:05 +0000)]
[CodeGen][NFC] Rename IsVerbose to IsStandalone in Machine*::print
Committed r322867 too soon.
Differential Revision: https://reviews.llvm.org/D42239
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322868
91177308-0d34-0410-b5e6-
96231b3b80d8
Francis Visoiu Mistrih [Thu, 18 Jan 2018 17:59:06 +0000 (17:59 +0000)]
[CodeGen] Print RegClasses on MI in verbose mode
r322086 removed the trailing information describing reg classes for each
register.
This patch adds printing reg classes next to every register when
individual operands/instructions/basic blocks are printed. In the case
of dumping MIR or printing a full function, by default don't print it.
Differential Revision: https://reviews.llvm.org/D42239
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322867
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Thu, 18 Jan 2018 17:34:27 +0000 (17:34 +0000)]
[SLP] Fix test checks, NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322865
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 18 Jan 2018 16:23:40 +0000 (16:23 +0000)]
[ADT] Just give up on GCC, I can't fix this.
While the memmove workaround fixed it for GCC 6.3. GCC 4.8 and GCC 7.1
are still broken. I have no clue what's going on, just blacklist GCC for
now.
Needless to say this code is ubsan, asan and msan-clean.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322862
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 18 Jan 2018 15:47:59 +0000 (15:47 +0000)]
[ADT] Add a workaround for GCC miscompiling the trivially copyable Optional
I've seen random crashes with GCC 4.8, GCC 6.3 and GCC 7.3, triggered by
my Optional change. All of them affect a different set of targets. This
change fixes the instance of the problem I'm seeing on my local machine,
let's hope it's good enough for the other instances too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322859
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 18 Jan 2018 15:25:32 +0000 (15:25 +0000)]
[TargetLowering] add punctuation for readability; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322855
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam McCall [Thu, 18 Jan 2018 15:02:28 +0000 (15:02 +0000)]
[MachineOutliner] Fix r322788 - don't write to working directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322850
91177308-0d34-0410-b5e6-
96231b3b80d8
Joel Jones [Thu, 18 Jan 2018 14:57:55 +0000 (14:57 +0000)]
[docs] Make ReleaseProcess.rst 80 column. NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322849
91177308-0d34-0410-b5e6-
96231b3b80d8
Francis Visoiu Mistrih [Thu, 18 Jan 2018 14:52:14 +0000 (14:52 +0000)]
[CodeGen][NFC] Refactor MachineInstr::print
* Handle more cases where the MI is not attached yet
* Add similar asserts like in MIRPrinter::print
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322848
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 18 Jan 2018 14:19:04 +0000 (14:19 +0000)]
[HWAsan] Fix uninitialized variable.
Found by msan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322847
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 18 Jan 2018 13:42:02 +0000 (13:42 +0000)]
[X86] Add PR35918 test case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322846
91177308-0d34-0410-b5e6-
96231b3b80d8
Klaus Kretzschmar [Thu, 18 Jan 2018 12:58:50 +0000 (12:58 +0000)]
test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322844
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Thu, 18 Jan 2018 12:36:38 +0000 (12:36 +0000)]
[RISCV] Codegen support for the standard RV32M instruction set extension
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322843
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Thu, 18 Jan 2018 11:34:02 +0000 (11:34 +0000)]
[RISCV] Implement frame pointer elimination
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322839
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 18 Jan 2018 11:26:24 +0000 (11:26 +0000)]
[ADT] Split optional to only include copy mechanics and dtor for non-trivial types.
This makes uses of Optional more transparent to the compiler (and
clang-tidy) and generates slightly smaller code.
This is a re-land of r317019, which had issues with GCC 4.8 back then.
Those issues don't reproduce anymore, but I'll watch the buildbots
closely in case anything goes wrong.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322838
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew V. Tischenko [Thu, 18 Jan 2018 10:40:48 +0000 (10:40 +0000)]
A new test to demostrate the current SHLD/SHRD code generation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322828
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Thu, 18 Jan 2018 09:41:14 +0000 (09:41 +0000)]
[RISCV][NFC] Add nounwind to functions in div.ll and mul.ll
Committing this separately to minimise irrelevant changes for an upcoming
patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322825
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Thu, 18 Jan 2018 09:22:24 +0000 (09:22 +0000)]
[SelectionDAG] Convert assert to condtion
Follow-up to r322120 which can cause assertions for AArch64 because
v1f64 and v1i64 are legal types.
Differential Revision: https://reviews.llvm.org/D42097
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322823
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 18 Jan 2018 07:44:09 +0000 (07:44 +0000)]
[X86] Use vmovdqu64/vmovdqa64 for unmasked integer vector stores for consistency with loads.
Previously we used 64 for vXi64 stores and 32 for everything else. This change uses 64 for everything just like do for loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322820
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 18 Jan 2018 07:44:06 +0000 (07:44 +0000)]
[X86] Remove isel patterns for using unmasked vmovdqa32/vmovdqu32 for integer vector loads.
These patterns were just looking for a vXi64 bitcasted to vXi32, but there is no advantage to using vmovdqa32 over vmovdqa64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322819
91177308-0d34-0410-b5e6-
96231b3b80d8
Clement Courbet [Thu, 18 Jan 2018 07:26:34 +0000 (07:26 +0000)]
Revert "Add a value_type to ArrayRef."
clang OOMs on arm.
This reverts commit
a272b2f2ef63f7f602c9ef4d9e10dc4eb9f00aa1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322818
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 18 Jan 2018 06:47:09 +0000 (06:47 +0000)]
[X86] Remove windows line endings from a test file. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322817
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 18 Jan 2018 05:38:43 +0000 (05:38 +0000)]
Don't drop dso_local in LTO.
LTO sets dso_local as an optimization, so don't clear it.
This avoid clearing it from undefined hidden symbols, which would then
fail the verifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322814
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 18 Jan 2018 04:17:06 +0000 (04:17 +0000)]
[DAGCombiner] Add a DAG combine to turn a splat build_vector where the splat elemnt is a bitcast from a vector type into a concat_vector
For example, a build_vector of i64 bitcasted from v2i32 can be turned into a concat_vectors of the v2i32 vectors with a bitcast to a vXi64 type
Differential Revision: https://reviews.llvm.org/D42090
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322811
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 18 Jan 2018 02:08:23 +0000 (02:08 +0000)]
Make GlobalValues with non-default visibilility dso_local.
This is similar to r322317, but for visibility. It is not as neat
because we have to special case extern_weak.
The idea is the same as the previous change, make the transition to
explicit dso_local easier for the frontends. With this they only have
to add dso_local to symbols where we need some external information to
decide if it is dso_local (like it being part of an ELF executable).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322806
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Thu, 18 Jan 2018 02:06:56 +0000 (02:06 +0000)]
GlobalISel: Make MachineCSE runnable in the middle of the GlobalISel
Right now, it is not possible to run MachineCSE in the middle of the
GlobalISel pipeline. Being able to run generic optimizations between the
core passes of GlobalISel was one of the goals of the new ISel framework.
This is the first attempt to do it.
The problem is that MachineCSE pass assumes all register operands have a
register class, which, in GlobalISel context, won't be true until after the
InstructionSelect pass. The reason for this behaviour is that before
replacing one virtual register with another, MachineCSE pass (and most of
the other optimization machine passes) must check if the virtual registers'
constraints have a (sufficiently large) intersection, and constrain the
resulting register appropriately if such intersection exists.
GlobalISel extends the representation of such constraints from just a
register class to a triple (low-level type, register bank, register
class).
This commit adds MachineRegisterInfo::constrainRegAttrs method that extends
MachineRegisterInfo::constrainRegClass to such a triple.
The idea is that going forward we should use:
- RegisterBankInfo::constrainGenericRegister within GlobalISel's
InstructionSelect pass
- MachineRegisterInfo::constrainRegClass within SelectionDAG ISel
- MachineRegisterInfo::constrainRegAttrs everywhere else regardless
the target and instruction selector it uses.
Patch by Roman Tereshin. Thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322805
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Thu, 18 Jan 2018 01:15:45 +0000 (01:15 +0000)]
[WebAssembly] Remove duplicated RTLIB names
Remove the tight coupling between llvm/CodeGenRuntimeLibcalls.def and
the table of supported singatures for wasm. This will allow adding new libcalls
without changing wasm's signature table.
Also, some cleanup:
Use ManagedStatics instead of const tables to avoid memory/binary bloat.
Use a StringMap instead of a linear search for name lookup.
Differential Revision: https://reviews.llvm.org/D35592
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322802
91177308-0d34-0410-b5e6-
96231b3b80d8
Volkan Keles [Thu, 18 Jan 2018 01:10:30 +0000 (01:10 +0000)]
Fix the failure caused by r322773
Do not run GlobalISel if `-fast-isel=0 -global-isel=false`.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322800
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Thu, 18 Jan 2018 00:00:58 +0000 (00:00 +0000)]
[MachineOutliner] Add DISubprograms to outlined functions.
Before, it wasn't possible to get backtraces inside outlined functions. This
commit adds DISubprograms to the IR functions created by the outliner which
makes this possible. Also attached a test that ensures that the produced
debug information is correct. This is useful to users that want to debug
outlined code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322789
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 17 Jan 2018 23:55:23 +0000 (23:55 +0000)]
[CodeGen] Hoist common AsmPrinter code out of X86, ARM, and AArch64
Every known PE COFF target emits /EXPORT: linker flags into a .drective
section. The AsmPrinter should handle this.
While we're at it, use global_values() and emit each export flag with
its own .ascii directive. This should make the .s file output more
readable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322788
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Wed, 17 Jan 2018 23:29:25 +0000 (23:29 +0000)]
[LangRef] Clarify Varargs forwarding for musttail calls.
This clarification was suggested by @efriedma in D41335, which uses this
behavior to inline musttail calls with varargs.
Reviewers: hfinkel, efriedma, rnk
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D41861
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322786
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Wed, 17 Jan 2018 23:24:38 +0000 (23:24 +0000)]
[hwasan] LLVM-level flags for linux kernel-compatible hwasan instrumentation.
Summary:
-hwasan-mapping-offset defines the non-zero shadow base address.
-hwasan-kernel disables calls to __hwasan_init in module constructors.
Unlike ASan, -hwasan-kernel does not force callback instrumentation.
This is controlled separately with -hwasan-instrument-with-calls.
Reviewers: kcc
Subscribers: srhines, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D42141
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322785
91177308-0d34-0410-b5e6-
96231b3b80d8
Volkan Keles [Wed, 17 Jan 2018 22:34:21 +0000 (22:34 +0000)]
Add a TargetOption to enable/disable GlobalISel
Summary:
This patch adds a new target option in order to control GlobalISel.
This will allow the users to enable/disable GlobalISel prior to the
backend by calling `TargetMachine::setGlobalISel(bool Enable)`.
No test case as there is already a test to check GlobalISel
command line options.
See: CodeGen/AArch64/GlobalISel/gisel-commandline-option.ll.
Reviewers: qcolombet, aemerson, ab, dsanders
Reviewed By: qcolombet
Subscribers: rovka, javed.absar, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D42137
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322773
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 17 Jan 2018 22:29:16 +0000 (22:29 +0000)]
Add support for emitting libcalls for x86_fp80 -> fp128 and vice-versa
compiler_rt doesn't provide them (yet), but libgcc does. PR34076.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322772
91177308-0d34-0410-b5e6-
96231b3b80d8
Easwaran Raman [Wed, 17 Jan 2018 22:24:23 +0000 (22:24 +0000)]
Add a ProfileCount class to represent entry counts.
Summary:
The class wraps a uint64_t and an enum to represent the type of profile
count (real and synthetic) with some helper methods.
Reviewers: davidxl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D41883
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322771
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 17 Jan 2018 22:19:31 +0000 (22:19 +0000)]
[X86][MMX] Add PR35982 test cases
FEMMS has the same problem as EMMS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322770
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 17 Jan 2018 22:04:36 +0000 (22:04 +0000)]
[LegalizeDAG] Fix ATOMIC_CMP_SWAP_WITH_SUCCESS legalization.
The code wasn't zero-extending correctly, so the comparison could
spuriously fail.
Adds some AArch64 tests to cover this case.
Inspired by D41791.
Differential Revision: https://reviews.llvm.org/D41798
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322767
91177308-0d34-0410-b5e6-
96231b3b80d8
Javed Absar [Wed, 17 Jan 2018 21:58:35 +0000 (21:58 +0000)]
[SCEV] Fix typo. NFC.
Fix confusing typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322765
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 17 Jan 2018 20:34:29 +0000 (20:34 +0000)]
[globalisel][tablegen] Honour priority order within nested instructions.
It appears that we haven't been prioritizing rules that contain nested
instructions properly. InstructionOperandMatcher didn't override
isHigherPriorityThan so it never compared the instructions/operands/predicates
inside nested instructions.
Fixes PR35926. Thanks to Diana Picus for the bug report.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322754
91177308-0d34-0410-b5e6-
96231b3b80d8
Zaara Syeda [Wed, 17 Jan 2018 20:00:15 +0000 (20:00 +0000)]
Revert [PowerPC] This reverts commit rL322721
Failing build bots. Revert the commit now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322748
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Wed, 17 Jan 2018 19:57:19 +0000 (19:57 +0000)]
[MDA] Use common code instead of reimplementing same. [NFC]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322747
91177308-0d34-0410-b5e6-
96231b3b80d8
Aditya Nandakumar [Wed, 17 Jan 2018 19:31:33 +0000 (19:31 +0000)]
[GISel] Make constrainSelectedInstRegOperands() available to the legalizer. NFC
https://reviews.llvm.org/D42149
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322743
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Wed, 17 Jan 2018 19:28:43 +0000 (19:28 +0000)]
[WebAssembly] Remove debug names from symbol table
Get rid of DEBUG_FUNCTION_NAME symbols. When we actually debug
data, maybe we'll want somewhere to put it... but having a symbol
that just stores the name of another symbol seems odd.
It means you have multiple Symbols with the same name, one
containing the actual function and another containing the name!
Store the names in a vector on the WasmObjectFile when reading
them in. Also stash them on the WasmFunctions themselves.
The names are //not// "symbol names" or aliases or anything,
they're just the name that a debugger should show against the
function body itself. NB. The WasmObjectFile stores them so that
they can be exported in the YAML losslessly, and hence the tests
can be precise.
Enforce that the CODE section has been read in before reading
the "names" section. Requires minor adjustment to some tests.
Patch by Nicholas Wilson!
Differential Revision: https://reviews.llvm.org/D42075
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322741
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 17 Jan 2018 19:19:55 +0000 (19:19 +0000)]
Use a got to access a hidden weak undefined on MachO.
Trying to link
__attribute__((weak, visibility("hidden"))) extern int foo;
int *main(void) {
return &foo;
}
on OS X fails with
ld: 32-bit RIP relative reference out of range (-
4294971318 max is +/-2GB): from _main (0x100000FAB) to _foo@0x00001000 (0x00000000) in '_main' from test.o for architecture x86_64
The problem being that 0 cannot be computed as a fixed difference from
%rip. Exactly the same issue exists on ELF and we can use the same
solution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322739
91177308-0d34-0410-b5e6-
96231b3b80d8
Joel Galenson [Wed, 17 Jan 2018 19:19:05 +0000 (19:19 +0000)]
[ARM] Optimize {s,u}mul.with.overflow.
This extends my previous patches to also optimize overflow-checked multiplies during SelectionDAG.
Differential revision: https://reviews.llvm.org/D40922
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322738
91177308-0d34-0410-b5e6-
96231b3b80d8
Joel Galenson [Wed, 17 Jan 2018 19:19:05 +0000 (19:19 +0000)]
[ARM] Optimize {s,u}{add,sub}.with.overflow.
The ARM backend contains code that tries to optimize compares by replacing them with an existing instruction that sets the flags the same way. This allows it to replace a "cmp" with a "adds", generalizing the code that replaces "cmp" with "sub". It also heuristically disables sinking of instructions that could potentially be used to replace compares (currently only if they're next to each other).
Differential revision: https://reviews.llvm.org/D38378
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322737
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Neilson [Wed, 17 Jan 2018 19:15:21 +0000 (19:15 +0000)]
[Attributes] Fix crash when attempting to remove alignment from an attribute list/set
Summary:
Discovered while working on a patch to move alignment in
@llvm.memcpy/move/set from an arg into parameter attributes.
The current implementations of AttributeSet::removeAttribute() and
AttributeList::removeAttribute crash when attempting to remove the
alignment attribute. Currently, these implementations add the
to-be-removed attributes to an AttrBuilder and then remove
the builder from the list/set. Alignment is special in that it
must be added to a builder with an integer value for the alignment;
attempts to add alignment to a builder without a value is an error.
This change fixes the removeAttribute implementations for AttributeSet and
AttributeList to make them able to remove the alignment, and other similar,
attributes.
Reviewers: rnk, chandlerc, pete, javed.absar, reames
Reviewed By: rnk
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D41951
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322735
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 17 Jan 2018 19:12:48 +0000 (19:12 +0000)]
[X86][BTVER2] Reduce instregex usage (PR35955)
Most are just replaced with instrs lists, but a few regexps have been further generalized to match more instructions with a single pattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322734
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 17 Jan 2018 19:04:18 +0000 (19:04 +0000)]
[InstCombine] add baseline tests for D39958; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322733
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 17 Jan 2018 18:58:22 +0000 (18:58 +0000)]
[X86] Teach LowerBUILD_VECTOR to recognize pair-wise splats of 32-bit elements and use a 64-bit broadcast
If we are splatting pairs of 32-bit elements, we can use a 64-bit broadcast to get the job done.
We could probably could probably do this with other sizes too, for example four 16-bit elements. Or we could broadcast pairs of 16-bit elements using a 32-bit element broadcast. But I've left that as a future improvement.
I've also restricted this to AVX2 only because we can only broadcast loads under AVX.
Differential Revision: https://reviews.llvm.org/D42086
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322730
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Wed, 17 Jan 2018 18:48:50 +0000 (18:48 +0000)]
[utils] Make .cfi_startproc optional for powerpc
Summary: llc sometimes may not emit .cfi_startproc which makes func_dict to have less entries.
Subscribers: nemanjai, llvm-commits
Differential Revision: https://reviews.llvm.org/D42144
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322725
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 17 Jan 2018 18:46:01 +0000 (18:46 +0000)]
[X86] When legalizing (v64i1 select i8, v64i1, v64i1) make sure not to introduce bitcasts to i64 in 32-bit mode
We legalize selects of masks with scalar conditions using a bitcast to an integer type. But if we are in 32-bit mode we can't convert v64i1 to i64. So instead split the v64i1 to v32i1 and concat it back together. Each half will then be legalized by bitcasting to i32 which is fine.
The test case is a little indirect. If we have the v64i1 select in IR it will get legalized by legalize vector ops which has a run of type legalization after it. That type legalization run is able to fix this i64 bitcast. So in order to avoid that we need a build_vector of a splat which legalize vector ops will ignore. Legalize DAG will then turn that into a select via LowerBUILD_VECTORvXi1. And the select will get legalized. In this case there is no type legalizer run to cleanup the bitcast.
This fixes pr35972.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322724
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 17 Jan 2018 18:41:27 +0000 (18:41 +0000)]
[X86][SSE] Add v4i16 PMULLD tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322723
91177308-0d34-0410-b5e6-
96231b3b80d8
Zaara Syeda [Wed, 17 Jan 2018 18:22:55 +0000 (18:22 +0000)]
[PowerPC] Add handling for ColdCC calling convention and a pass to mark
candidates with coldcc attribute.
This patch adds support for the coldcc calling convention for Power.
This changes the set of non-volatile registers. It includes a pass to stress
test the implementation by marking all static directly called functions with
the coldcc attribute through the option -enable-coldcc-stress-test. It also
includes an option, -ppc-enable-coldcc, to add the coldcc attribute to
functions which are cold at all call sites based on BlockFrequencyInfo when
the containing function does not call any non cold functions.
Differential Revision: https://reviews.llvm.org/D38413
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322721
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 17 Jan 2018 18:16:28 +0000 (18:16 +0000)]
Fix MSVC "not all control paths return a value" warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322719
91177308-0d34-0410-b5e6-
96231b3b80d8
Tatyana Krasnukha [Wed, 17 Jan 2018 17:58:28 +0000 (17:58 +0000)]
[ARC] Add missing condition codes.
Summary: Added VS and VC, required for disassembling.
Reviewers: petecoup
Reviewed By: petecoup
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D42172
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322718
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Paulsson [Wed, 17 Jan 2018 17:16:07 +0000 (17:16 +0000)]
[SystemZ] Handle BRCTH branches correctly in SystemZLongBranch.cpp.
BRCTH is capable of a long branch which needs to be recognized during branch
relaxation. This is done by checking for ExtraRelaxSize == 0.
Review: Ulrich Weigand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322688
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 17 Jan 2018 16:30:01 +0000 (16:30 +0000)]
AMDGPU: Error in SIAnnotateControlFlow instead of assert
This assert typically happens if an unstructured CFG is passed
to the pass. This can happen if the pass is run independently
without the structurizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322685
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 17 Jan 2018 16:27:17 +0000 (16:27 +0000)]
Add tests for ConstantFoldTerminator preserving DomTree
With my bad luck I separately implemented the DomTree preservation
for ConstantFoldTerminator before r322401 was committed. Commit the
tests which I think still provide some value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322683
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Wed, 17 Jan 2018 15:25:37 +0000 (15:25 +0000)]
[ARM GlobalISel] Rename local variable. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322667
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Wed, 17 Jan 2018 15:01:19 +0000 (15:01 +0000)]
[ARM GlobalISel] Add instselect tests for G_FPEXT and G_FPTRUNC
G_FPEXT and G_FPTRUNC are handled by TableGen'erated code, just add
tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322665
91177308-0d34-0410-b5e6-
96231b3b80d8
Pablo Barrio [Wed, 17 Jan 2018 14:39:29 +0000 (14:39 +0000)]
[AArch64] Fix incorrect LD1 of 16-bit FP vectors in big endian
Summary:
Loading a vector of 4 half-precision FP sometimes results in an LD1
of 2 single-precision FP + a reversal. This results in an incorrect
byte swap due to the conversion from little endian to big endian.
In order to generate the correct byte swap, it is easier to
generate the correct LD1 of 4 half-precision FP, thus avoiding the
subsequent reversal.
Reviewers: craig.topper, jmolloy, olista01
Reviewed By: olista01
Subscribers: efriedma, samparker, SjoerdMeijer, rogfer01, aemerson, rengolin, javed.absar, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D41863
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322663
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 17 Jan 2018 14:39:28 +0000 (14:39 +0000)]
[InstCombine] fix demanded-bits propagation for zext/trunc
I was comparing the demanded-bits implementations between InstCombine
and TargetLowering as part of investigating questions in D42088 and
noticed that this was wrong in IR. We were losing all of the prior
known bits when we got back to the 'zext'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322662
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 17 Jan 2018 14:27:35 +0000 (14:27 +0000)]
[InstCombine] add test to show hole in demanded bits; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322660
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Wed, 17 Jan 2018 14:17:12 +0000 (14:17 +0000)]
[RISCV] Allow RISCVAsmBackend::writeNopData to generate c.nop when supported
When the compressed instruction set is enabled, the 16-bit c.nop can be
generated if necessary.
Differential Revision: https://reviews.llvm.org/D41221
Patch by Shiva Chen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322658
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Wed, 17 Jan 2018 14:14:14 +0000 (14:14 +0000)]
[ARM GlobalISel] Map G_FPEXT and G_FPTRUNC to FPR
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322657
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniil Fukalov [Wed, 17 Jan 2018 14:05:05 +0000 (14:05 +0000)]
[AMDGPU] add LDS f32 intrinsics
added llvm.amdgcn.atomic.{add|min|max}.f32 intrinsics
to allow generate ds_{add|min|max}[_rtn]_f32 instructions
needed for OpenCL float atomics in LDS
Reviewed by: arsenm
Differential Revision: https://reviews.llvm.org/D37985
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322656
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitry Preobrazhensky [Wed, 17 Jan 2018 14:00:48 +0000 (14:00 +0000)]
[AMDGPU][MC][GFX9] Enable inline constants for SDWA operands
See bug 35771: https://bugs.llvm.org/show_bug.cgi?id=35771
Differential Revision: https://reviews.llvm.org/D42058
Reviewers: vpykhtin, artem.tamazov, arsenm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322655
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Wed, 17 Jan 2018 13:34:10 +0000 (13:34 +0000)]
[ARM GlobalISel] Legalize G_FPEXT and G_FPTRUNC
Mark G_FPEXT and G_FPTRUNC as legal or libcall, depending on hardware
support, but only for conversions between float and double.
Also add the necessary boilerplate so that the LegalizerHelper can
introduce the required libcalls. This also works only for float and
double, but isn't too difficult to extend when the need arises.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322651
91177308-0d34-0410-b5e6-
96231b3b80d8
Ivan A. Kosarev [Wed, 17 Jan 2018 13:29:54 +0000 (13:29 +0000)]
[Transforms] Support making mutable versions of new-format TBAA access tags
Differential Revision: https://reviews.llvm.org/D41565
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322650
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 17 Jan 2018 13:01:06 +0000 (13:01 +0000)]
[X86] Don't mutate shuffle arguments after early-out for AVX512
The match* functions have the annoying behavior of modifying its inputs.
Save and restore the inputs, just in case the early out for AVX512 is
hit. This is still not great and its only a matter of time this kind of
bug happens again, but I couldn't come up with a better pattern without
rewriting significant chunks of this code. Fixes PR35977.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322644
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 17 Jan 2018 13:00:58 +0000 (13:00 +0000)]
[X86] Constify DebugLoc parameters. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322643
91177308-0d34-0410-b5e6-
96231b3b80d8
Hiroshi Inoue [Wed, 17 Jan 2018 12:29:38 +0000 (12:29 +0000)]
[NFC] fix trivial typos in comments
"the the" -> "the"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322636
91177308-0d34-0410-b5e6-
96231b3b80d8
Pavel Labath [Wed, 17 Jan 2018 11:52:13 +0000 (11:52 +0000)]
Don't emit apple accelerator tables on non-darwin targets
Summary:
Currently -glldb turns on emission of apple tables on all targets, but
lldb is only really capable of consuming them on darwin. Furthermore,
making lldb consume these tables is not straight-forward because of the
differences in how the debug info is distributed on darwin vs. elf
targets.
The darwin debug model assumes that the debug info (along with
accelerator tables) will either remain in the .o files or it will be
linked into a dsym bundle by a linker that knows how to merge these
tables. In the elf world, all present linkers will simply concatenate
these accelerator tables into the shared object. Since the tables are
not self-terminating, this renders the tables unusable, as the debugger
cannot pry the individual tables apart anymore.
It might theoretically be possible to make the tables work with split
dwarf, as that is somewhat similar to the apple .o model, but
unfortunately right now the combination of -glldb and -gsplit-dwarf
produces broken object files.
Until these issues are resolved there is no point in emitting the apple
tables for these targets. At best, it wastes space; at worst, it breaks
compilation and prevents the user from getting other benefits of -glldb.
Reviewers: probinson, aprantl, dblaikie
Subscribers: emaste, dim, llvm-commits, JDevlieghere
Differential Revision: https://reviews.llvm.org/D41986
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322633
91177308-0d34-0410-b5e6-
96231b3b80d8
Pavel Labath [Wed, 17 Jan 2018 11:11:53 +0000 (11:11 +0000)]
Rewrite debugger tuning test case to not depend on apple sections
Summary:
In a follow-up commit I'll change the rules for emission of accelerator
tables, which means we won't be able to use them as a litmus test for
the debugger tuning options. Instead of sections, I base the test on the
presence/absence of some debug info attributes and opcodes:
LLDB - prefers DW_OP_form_tls_address and uses DW_AT_APPLE_optimized
GDB - prefers DW_OP_GNU_push_tls_address and does not use the optimized
attribute
SCE - prefers DW_OP_form_tls_address and does not use the optimized
attribute
Reviewers: probinson, aprantl, dblaikie
Subscribers: JDevlieghere, llvm-commits
Differential Revision: https://reviews.llvm.org/D41985
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322630
91177308-0d34-0410-b5e6-
96231b3b80d8
Javed Absar [Wed, 17 Jan 2018 11:03:06 +0000 (11:03 +0000)]
[SCEV] fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322629
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 17 Jan 2018 10:56:54 +0000 (10:56 +0000)]
[X86][AVX] Add extra 'interleaved+lanepermute' shuffle test
Possible missed opportunity to use 64-bit lane permute on AVX1 in lowerShuffleAsRepeatedMaskAndLanePermute
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322628
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Wed, 17 Jan 2018 10:33:05 +0000 (10:33 +0000)]
[ThinLTO] - Remove code duplication. NFC.
Refactors 3 copies of isExpected.
Splitted from D42107.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322627
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew V. Tischenko [Wed, 17 Jan 2018 10:12:06 +0000 (10:12 +0000)]
Allow usage of X86-prefixes as separate instrs.
Differential Revision: https://reviews.llvm.org/D42102
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322623
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Eveson [Wed, 17 Jan 2018 09:01:29 +0000 (09:01 +0000)]
[MC] Fix -stack-size-section on ARM
Change symbol values in the stack_size section from being 8 bytes, to being a target dependent size.
Differential Revision: https://reviews.llvm.org/D42108
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322619
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 17 Jan 2018 03:58:21 +0000 (03:58 +0000)]
[X86] In LowerBUILD_VECTOR, rename ExtVT to EltVT so it makes sense.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322616
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 17 Jan 2018 03:50:21 +0000 (03:50 +0000)]
[X86] Remove duplicate lines from scheduler models. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322615
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Smith [Wed, 17 Jan 2018 03:48:07 +0000 (03:48 +0000)]
[pdbutil] Replace 0 byte PDB input with correct version to fix failing unit test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322614
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Wed, 17 Jan 2018 03:12:06 +0000 (03:12 +0000)]
[Support] Return an enum instead of an unsigned; NFC.
We seem to be (logically) returning ArchExtKinds here in all cases, so
the return type should reflect that.
The static_cast is necessary because `A.ID` is actually an `unsigned`,
presumably since we use `decltype(A)` to represent extended attributes
for both ARM and AArch64, which use distinct `ArchExtKinds`.
We can't trivially make the same change for ARM, because one of the
values it returns is the bitwise-or of two `ARM::ArchExtKind`s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322613
91177308-0d34-0410-b5e6-
96231b3b80d8