1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
Commit Graph

209104 Commits

Author SHA1 Message Date
Kazu Hirata
1320039253 [PGO] Use isa instead of dyn_cast (NFC) 2020-12-30 17:45:38 -08:00
Kazu Hirata
ac063c5d33 [ARM] Declare Op within an if statement (NFC) 2020-12-30 17:45:36 -08:00
Fangrui Song
6ea0ccdb82 [ThinLTO][test] Add visibility related tests
Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D92899
2020-12-30 16:58:20 -08:00
Fangrui Song
9b494cc6bf [TargetMachine] Drop implied dso_local for definitions in ELF static relocation model/PIE
TargetMachine::shouldAssumeDSOLocal currently implies dso_local for such definitions.

Since clang -fno-pic add the dso_local specifier, we don't need to special case.
2020-12-30 16:57:50 -08:00
Fangrui Song
92d413a192 [test] Add explicit dso_local to definitions in ELF static relocation model tests 2020-12-30 16:52:23 -08:00
Fangrui Song
70d6d6eed0 [LowerEmuTls] Copy dso_local from <var> to __emutls_v.<var>
This effect is not testable until we drop the implied dso_local for ELF
static/PIE defined symbols from TargetMachine::shouldAssumeDSOLocal.
2020-12-30 16:11:32 -08:00
Fangrui Song
69b323b913 [test] Add explicit dso_local to definitions in ELF static relocation model tests 2020-12-30 15:47:16 -08:00
Lang Hames
ca329c6814 [ORC] Remove some stale debugging output. 2020-12-31 10:34:38 +11:00
Fangrui Song
9340bda1b4 [RISCV][test] Add explicit dso_local to definitions in ELF static relocation model tests 2020-12-30 15:28:11 -08:00
Fangrui Song
bf6e2312a8 [SystemZ][test] Add explicit dso_local to definitions in ELF static relocation model tests 2020-12-30 15:26:09 -08:00
Fangrui Song
72882bd65c [ARM][test] Add explicit dso_local to definitions in ELF static relocation model tests
TargetMachine::shouldAssumeDSOLocal currently implies dso_local for such definitions.

Adding explicit dso_local makes these tests align with the clang -fno-pic behavior
and allow the removal of the TargetMachine::shouldAssumeDSOLocal special case.
2020-12-30 15:23:21 -08:00
Fangrui Song
c0f4632683 [AArch64][test] Add explicit dso_local to definitions in ELF static relocation model tests
TargetMachine::shouldAssumeDSOLocal currently implies dso_local for such definitions.

Adding explicit dso_local makes these tests align with the clang -fno-pic behavior
and allow the removal of the TargetMachine::shouldAssumeDSOLocal special case.

Split tiny_model.ll to tiny-model-{static,pic}.ll
2020-12-30 15:03:06 -08:00
Fangrui Song
a9ab97c7f7 [test] Fix linux-preemption.ll 2020-12-30 14:44:43 -08:00
Fangrui Song
c2a599b0fa [X86][test] Add explicit dso_local to definitions in ELF static relocation model tests
TargetMachine::shouldAssumeDSOLocal currently implies dso_local for such definitions.

Adding explicit dso_local makes these tests align with the clang -fno-pic behavior
and allow the removal of the TargetMachine::shouldAssumeDSOLocal special case.
2020-12-30 14:40:50 -08:00
Brandon Bergren
b28d1bd79b [PowerPC] Add addtional test that retroactively catches PR47259
Due to the unfortunate way the bug could only be triggered when reading SPRG[0-3] into a register lower than %r4 with the "mfsprg %rX, 0" syntax, the tests did not detect it.

(It could not be triggered for "mfsprg0, %r2" because that pattern was already in the table, so the earlier "correct" match took effect)

As a canary, add an intentionally ambiguous "mfsprg 2, 2" and "mtsprg 2, 2" check that would have caught the problem.

Reviewed By: ZhangKang

Differential Revision: https://reviews.llvm.org/D86489
2020-12-30 15:23:48 -06:00
Roman Lebedev
1b015376c4 [LoopIdiom] 'left-shift until bittest': don't forget to check that PHI node is in loop header
Fixes an issue reported by Peter Collingbourne in
https://reviews.llvm.org/D91726#2475301
2020-12-30 23:58:41 +03:00
Roman Lebedev
ad123bc854 [SimplifyCFG] Teach SwitchToLookupTable() to preserve DomTree 2020-12-30 23:58:41 +03:00
Roman Lebedev
0b74a66880 [SimplifyCFG] Teach switchToSelect() to preserve DomTree 2020-12-30 23:58:40 +03:00
Roman Lebedev
d35e297c1e [SimplifyCFG] Teach SimplifyBranchOnICmpChain() to preserve DomTree 2020-12-30 23:58:40 +03:00
Craig Topper
ae6deb0659 [RISCV] Cleanup some V intrinsic names used in tests to match the type overloads used. Add some missing double tests on rv32. NFC
The matching for intrinsic names is forgiving about types in the
name being absent or wrong. Once the intrinsic is parsed its
name will remangled to include the real types.

This commit fixes the names to have at least enough correct types
so that the name used in the test is a prefix of the canonical name.
The big missing part is the type for the VL parameter which changes
size between rv32 and rv64.

While I was in here I noticed that we were missing some tests for
double on rv32 so I fixed that by copying from rv64 and fixing up
the VL argument type.
2020-12-30 12:37:11 -08:00
Fangrui Song
e9c67e8f20 [update_llc_test_checks] Support Windows .seh_proc for x86 2020-12-30 12:32:47 -08:00
Sanjay Patel
26db8e9958 [LoopUtils] reduce FMF and min/max complexity when forming reductions
I don't know if there's some way this changes what the vectorizers
may produce for reductions, but I have added test coverage with
3567908 and 5ced712 to show that both passes already have bugs in
this area. Hopefully this does not make things worse before we can
really fix it.
2020-12-30 15:22:26 -05:00
Sanjay Patel
e6523c4a2f [LoopVectorizer] add test to show wrong FMF propagation; NFC 2020-12-30 15:13:57 -05:00
Fangrui Song
d0a0143df2 [update_llc_test_checks] Support .Lfunc$local for x86 -relocation-model=pic dsolocal tests 2020-12-30 11:59:36 -08:00
Nico Weber
43b6fad3a7 [gn build] Switch copy_bundle_data from pax to cpio
This will hopefully fix the build not becoming clean when using Ninja
1.9+. Ninja 1.9 enabled high-resolution time stamps, but pax doesn't
correctly set high-resolution timestamps on its output.

See https://github.com/nico/hack/blob/master/notes/copydir.md for a
detailed writeup of problem and alternatives.
2020-12-30 13:59:03 -05:00
Yuanfang Chen
aa2b3e535c Fix LLVM_ENABLE_MODULES=On build
for commit 480936e741d588d53b9e2d9c5935b5daa0fdee25.
2020-12-30 10:54:04 -08:00
Fangrui Song
659464b45b [PowerPC][test] Add explicit dso_local to definitions in ELF static relocation model tests
TargetMachine::shouldAssumeDSOLocal currently implies dso_local for such definitions.

Adding explicit dso_local makes these tests align with the clang -fpic behavior
and allow the removal of the TargetMachine::shouldAssumeDSOLocal special case.

Rewrite preemption.ll to dsolocal-static.ll and dsolocal-pic.ll, and add
"PIC Level" metadata.
2020-12-30 10:32:34 -08:00
Andrew Litteken
12eae9940e [IROutliner] Adding option to enable outlining from linkonceodr functions
There are functions that the linker is able to automatically
deduplicate, we do not outline from these functions by default. This
allows for outlining from those functions.

Tests:
llvm/test/Transforms/IROutliner/outlining-odr.ll

Reviewers: jroelofs, paquette

Differential Revision: https://reviews.llvm.org/D87309
2020-12-30 12:08:04 -06:00
Sanjay Patel
33952ff99f [SLP] add fadd reduction test to show broken FMF propagation; NFC 2020-12-30 11:27:50 -05:00
Bogdan Graur
a7fe711836 Fixes warning 'enumeration value not handled in switch'.
This was introduced in commit: 981a0bd85811fe49379fdbef35528e2c2f3511a3.

Differential Revision: https://reviews.llvm.org/D93944
2020-12-30 06:56:29 -08:00
Sanjay Patel
6e879de8bb [IR] remove 'NoNan' param when creating FP reductions
This is no-functional-change-intended (AFAIK, we can't
isolate this difference in a regression test).

That's because the callers should be setting the IRBuilder's
FMF field when creating the reduction and/or setting those
flags after creating. It doesn't make sense to override this
one flag alone.

This is part of a multi-step process to clean up the FMF
setting/propagation. See PR35538 for an example.
2020-12-30 09:51:23 -05:00
Juneyoung Lee
9cc6c0581f Remove functions from *-inseltpoison.ll tests if unnecessary
X-inseltpoison.ll is a copy of X.ll with insertelement/shufflevector's
placeholder replaced with poison.
This commit removes a few redundant functions which do not contain any
shufflevector/insertelement.
2020-12-30 23:50:37 +09:00
Wang, Pengfei
f29fb0bf5c [X86][AMX] Fix compilation warning introduced by 981a0bd8. 2020-12-30 22:22:13 +08:00
Juneyoung Lee
1ec361c6b1 clang-format, address warnings 2020-12-30 23:05:07 +09:00
Juneyoung Lee
46421cee58 Use unary CreateShuffleVector if possible
As mentioned in D93793, there are quite a few places where unary `IRBuilder::CreateShuffleVector(X, Mask)` can be used
instead of `IRBuilder::CreateShuffleVector(X, Undef, Mask)`.
Let's update them.

Actually, it would have been more natural if the patches were made in this order:
(1) let them use unary CreateShuffleVector first
(2) update IRBuilder::CreateShuffleVector to use poison as a placeholder value (D93793)

The order is swapped, but in terms of correctness it is still fine.

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D93923
2020-12-30 22:36:08 +09:00
Juneyoung Lee
8d67481f66 [SimplifyCFG] Add tests for select form and/or for creating select from icmps 2020-12-30 22:15:39 +09:00
Juneyoung Lee
07065b2ec3 [ConstraintElimination] Add support for select form of and/or
This patch adds support for select form of and/or.
Currently there is an ongoing effort for moving towards using `select a, b, false` instead of `and i1 a, b` and
`select a, true, b` instead of `or i1 a, b` as well.
D93065 has links to relevant changes.

Alive2 proof: (undef input was disabled due to timeout :( )
- and: https://alive2.llvm.org/ce/z/AgvFbQ
- or: https://alive2.llvm.org/ce/z/KjLJyb

Differential Revision: https://reviews.llvm.org/D93935
2020-12-30 21:27:36 +09:00
Luo, Yuanke
2d40e003cd [X86] Refactor AMX test case, remove unnecessary code.
Differential Revision: https://reviews.llvm.org/D93792
2020-12-30 15:40:20 +08:00
Fangrui Song
28b6140818 Move -fno-semantic-interposition dso_local logic from TargetMachine to Clang CodeGenModule
This simplifies TargetMachine::shouldAssumeDSOLocal and and gives frontend the
decision to use dso_local. For LLVM synthesized functions/globals, they may lose
inferred dso_local but such optimizations are probably not very useful.

Note: the hasComdat() condition in canBenefitFromLocalAlias (D77429) may be dead now.
(llvm/CodeGen/X86/semantic-interposition-comdat.ll)
(Investigate whether we need test coverage when Fuchsia C++ ABI is clearer)
2020-12-29 23:37:55 -08:00
Andrew Litteken
14a409567f [IROutliner] Adding support for swift errors in the IROutliner
Since some values can be swift errors, we need to make sure that we
correctly propagate the parameter attributes.

Tests found at:
llvm/test/Transforms/IROutliner/outlining-swift-error.ll

Reviewers: jroelofs, paquette

Recommit of: 71867ed5e6606a93f0c1413f205afe3bb16317fe

Differential Revision: https://reviews.llvm.org/D87742
2020-12-30 01:17:27 -06:00
Andrew Litteken
1cee7bbe41 Revert "[IROutliner] Adding support for swift errors"
This reverts commit 71867ed5e6606a93f0c1413f205afe3bb16317fe.

Reverting for lack of commit messages.
2020-12-30 01:17:27 -06:00
Andrew Litteken
439ed397d0 [IROutliner] Adding support for swift errors 2020-12-30 01:14:55 -06:00
Juneyoung Lee
261cf33770 [ConstraintElimination] Add tests for select form and/or (NFC) 2020-12-30 16:05:19 +09:00
Luo, Yuanke
4ef6280b52 [X86] Add x86_amx type for intel AMX.
The x86_amx is used for AMX intrisics. <256 x i32> is bitcast to x86_amx when
it is used by AMX intrinsics, and x86_amx is bitcast to <256 x i32> when it
is used by load/store instruction. So amx intrinsics only operate on type x86_amx.
It can help to separate amx intrinsics from llvm IR instructions (+-*/).
Thank Craig for the idea. This patch depend on https://reviews.llvm.org/D87981.

Differential Revision: https://reviews.llvm.org/D91927
2020-12-30 13:52:13 +08:00
Fangrui Song
0aec9ce280 [X86][test] Improve global address offset folding tests 2020-12-29 21:39:29 -08:00
Craig Topper
a4e63dffe1 [Verifier] Remove declaration of method that was removed 8.5 years ago. NFC 2020-12-29 21:04:19 -08:00
Haowei Wu
85e960e3f0 [llvm-elfabi] Add flag to preserve timestamp when output is the same
This change adds '--write-if-changed' flag to llvm-elfabi tool. When
enabled, llvm-elfabi will not overwrite the existing file if the
content of the file will not be changed, which preserves the
timestamp.

Differential Revision: https://reviews.llvm.org/D92902
2020-12-29 20:27:06 -08:00
Kazu Hirata
d6be2b089a [Analysis, IR] Use *Map::lookup (NFC) 2020-12-29 19:23:24 -08:00
Kazu Hirata
db085a4bfd [Transforms/Utils] Construct SmallVector with iterator ranges (NFC) 2020-12-29 19:23:23 -08:00
Kazu Hirata
6fefce8f75 [Analysis] Use llvm::append_range (NFC) 2020-12-29 19:23:21 -08:00