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

208892 Commits

Author SHA1 Message Date
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
ShihPo Hung
86074b81a9 [RISCV] Add intrinsics for vcompress instruction
This patch defines vcompress intrinsics and lower to V instructions.

We work with @rogfer01 from BSC to come out this patch.

Authored-by: Roger Ferrer Ibanez <rofirrim@gmail.com>
Co-Authored-by: ShihPo Hung <shihpo.hung@sifive.com>

Differential revision: https://reviews.llvm.org/D93809
2020-12-29 18:38:15 -08:00
Kai Luo
e1420f7acb [PowerPC] Add mir test to show effect of optimizeCompareInstr when equalityOnly is true. NFC. 2020-12-30 02:23:05 +00:00
Kai Luo
72298af4c5 [PowerPC] Remaining KnownBits should be constant when performing non-sign comparison
In `PPCTargetLowering::DAGCombineTruncBoolExt`, when checking if it's correct to perform the transformation for non-sign comparison, as the comment says
```
      // This is neither a signed nor an unsigned comparison, just make sure
      // that the high bits are equal.
```
Origin check
```
      if (Op1Known.Zero != Op2Known.Zero || Op1Known.One != Op2Known.One)
        return SDValue();
```
is not strong enough. For example,
```
Op1Known = 111x000x;
Op2Known = 111x000x;
```
Bit 4, besides bit 0, is still unknown and affects the final result.

This patch fixes https://bugs.llvm.org/show_bug.cgi?id=48388.

Reviewed By: nemanjai, #powerpc

Differential Revision: https://reviews.llvm.org/D93092
2020-12-30 02:00:47 +00:00
Lang Hames
cf3fe0c756 [ORC] Move Orc RPC code into Shared, rename some RPC types.
Moves all headers from Orc/RPC to Orc/Shared, and from the llvm::orc::rpc
namespace into llvm::orc::shared. Also renames RPCTypeName to
SerializationTypeName and Function to RPCFunction.

In addition to being a more reasonable home for this code, this will make it
easier for the upcoming Orc runtime to re-use the Serialization system for
creating and parsing wrapper-function binary blobs.
2020-12-30 12:48:20 +11:00
Haowei Wu
8395b2b8fd Revert "[llvm-elfabi] Add flag to preserve timestamp when output is the same"
This reverts commit fddb41744958d21635a60622cfb4067122810bcc. which
causes test failures on Mac builders.
2020-12-29 17:26:22 -08:00
Zakk Chen
16ba1c6d5e [RISCV] Define vsext/vzext intrinsics.
Define vsext/vzext intrinsics.and lower to V instructions.
Define new fraction register class fields in LMULInfo and a
NoReg to present invalid LMUL register classes.

Authored-by: ShihPo Hung <shihpo.hung@sifive.com>
Co-Authored-by: Zakk Chen <zakk.chen@sifive.com>

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D93893
2020-12-29 16:50:53 -08:00
LLVM GN Syncbot
6c090490e1 [gn build] Port 480936e741d 2020-12-30 00:40:53 +00:00
Yuanfang Chen
09aff20364 Reland "[NewPM][CodeGen] Introduce CodeGenPassBuilder to help build codegen pipeline" (again)
This reverts commit 16c8f6e91344ec9840d6aa9ec6b8d0c87a104ca3 with fix.

-Wswitch catched an unhandled enum value due to recent commits in
TargetPassConfig.cpp.
2020-12-29 16:39:55 -08:00
LLVM GN Syncbot
8e2bd407c8 [gn build] Port 16c8f6e9134 2020-12-30 00:29:58 +00:00
Yuanfang Chen
222d17450a Revert "Reland "[NewPM][CodeGen] Introduce CodeGenPassBuilder to help build codegen pipeline""
This reverts commit 21314940c4856e0cb81b664fd2d2117d1b7dc3e3.

Build failure in some bots.
2020-12-29 16:29:07 -08:00
LLVM GN Syncbot
3c9678a435 [gn build] Port 21314940c48 2020-12-29 23:18:48 +00:00
Yuanfang Chen
015989c61b Reland "[NewPM][CodeGen] Introduce CodeGenPassBuilder to help build codegen pipeline"
This reverts commit 94427af60c66ffea655a3084825c6c3a9deec1ad (relands
4646de5d75cfce3da4ddeffb6eb8e66e38238800 with fix).

Use "return std::move(AsmStreamer);" instead of "return AsmStreamer;" in
LVMTargetMachine::createMCStreamer. Unlike Clang, GCC seems having trouble
inserting a implicit lvalue->rvalue conversion.
2020-12-29 15:17:23 -08:00