1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 13:02:52 +02:00
Commit Graph

134175 Commits

Author SHA1 Message Date
Hrvoje Varga
52c95ef5b8 [mips][micromips] Implement LD, LLD, LWU, SD, DSRL, DSRL32 and DSRLV instructions
Differential Revision: http://reviews.llvm.org/D16625

llvm-svn: 273850
2016-06-27 08:23:28 +00:00
Simon Pilgrim
e3422baa57 [X86][AVX] Peek through bitcasts to find the source of broadcasts
AVX1 can only broadcast vectors as floats/doubles, so for 256-bit vectors we insert bitcasts if we are shuffling v8i32/v4i64 types. Unfortunately the presence of these bitcasts prevents the current broadcast lowering code from peeking through cases where we have concatenated / extracted vectors to create the 256-bit vectors.

This patch allows us to peek through bitcasts as long as the number of elements doesn't change (i.e. element bitwidth is the same) so the broadcast index is not affected.

Note this bitcast peek is different from the stage later on which doesn't care about the type and is just trying to find a load node.

Differential Revision: http://reviews.llvm.org/D21660

llvm-svn: 273848
2016-06-27 07:44:32 +00:00
Igor Breger
859963f633 [ConstantFolding] Fix bitcast vector of i1.
Differential Revision: http://reviews.llvm.org/D21735

llvm-svn: 273845
2016-06-27 06:42:54 +00:00
Rafael Espindola
09be7f4091 Mips: Fix access to private functions.
llvm-svn: 273843
2016-06-27 03:19:40 +00:00
Sanjay Patel
17b343e65b add tests for potential select transforms
llvm-svn: 273833
2016-06-26 23:44:21 +00:00
Rafael Espindola
662fbc0736 Use isPositionIndependent predicate. NFC.
llvm-svn: 273830
2016-06-26 22:38:44 +00:00
Rafael Espindola
d20db3aec9 Use isPositionIndependent. NFC.
llvm-svn: 273829
2016-06-26 22:32:53 +00:00
Rafael Espindola
eef48f9ee2 Use isPositionIndependent predicate.
llvm-svn: 273828
2016-06-26 22:30:06 +00:00
Rafael Espindola
f48b6e0687 Use isPositionIndependent predicate. NFC.
llvm-svn: 273827
2016-06-26 22:24:01 +00:00
Rafael Espindola
b7b569afff Refactor a duplicated predicate. NFC.
llvm-svn: 273826
2016-06-26 22:13:55 +00:00
Marcin Koscielnicki
6a9131b3fe [lit] Add SANITIZER_IGNORE_CVE_2016_2143 to pass_vars.
This variable is used by ASan (and other sanitizers in the future)
on s390x-linux to override a check for CVE-2016-2143 in the running
kernel (see revision 267747 on compiler-rt).  Since the check simply
checks if the kernel version is in a whitelist of known-good versions,
it may miss distribution kernels, or manually-patched kernels - hence
the need for this variable.  To enable running the ASan testsuite on
such kernels, this variable should be passed from the environment
down to the testcases.

Differential Revision: http://reviews.llvm.org/D19888

llvm-svn: 273825
2016-06-26 21:49:58 +00:00
Benjamin Kramer
725f4a1120 Apply clang-tidy's modernize-loop-convert to lib/Analysis.
Only minor manual fixes. No functionality change intended.

llvm-svn: 273816
2016-06-26 17:27:42 +00:00
Nico Weber
0999f8e41d Revert r273807 (and r273809, r273810), it caused PR28311
llvm-svn: 273815
2016-06-26 15:10:34 +00:00
Benjamin Kramer
ccf6a0078a Apply clang-tidy's modernize-loop-convert to lib/MC.
Only minor manual fixes. No functionality change intended.

llvm-svn: 273814
2016-06-26 14:49:00 +00:00
Benjamin Kramer
d1562c81ee Apply clang-tidy's modernize-loop-convert to most of lib/IR.
Only minor manual fixes. No functionality change intended.

llvm-svn: 273813
2016-06-26 14:10:56 +00:00
Benjamin Kramer
b50c926a4d [CodeExtractor] Merge DEBUG statements in an attempt to fix the msvc
build.

There's a known bug in msvc 2013 that fails to compile do-while loops
inside of ranged for loops.

llvm-svn: 273811
2016-06-26 13:39:33 +00:00
Amjad Aboud
5ab7972a04 Fixed build failure (due to unused variable error) in r273807.
llvm-svn: 273810
2016-06-26 13:36:23 +00:00
Amjad Aboud
ae2245ccca Fixed build failure (due to unused variable error) in r273807.
llvm-svn: 273809
2016-06-26 12:43:33 +00:00
Benjamin Kramer
eef5ae3754 Apply clang-tidy's modernize-loop-convert to most of lib/Transforms.
Only minor manual fixes. No functionality change intended.

llvm-svn: 273808
2016-06-26 12:28:59 +00:00
Amjad Aboud
176666301d [codeview] Improved array type support.
Added support for:
1. Multi dimension array.
2. Array of structure type, which previously was declared incompletely.
3. Dynamic size array.

Differential Revision: http://reviews.llvm.org/D21526

llvm-svn: 273807
2016-06-26 11:44:45 +00:00
Sanjoy Das
05cfa64175 [RSForGC] Appease MSVC
llvm-svn: 273805
2016-06-26 05:42:52 +00:00
Craig Topper
2b27d2d659 [X86] Rewrite lowerVectorShuffleWithPSHUFB to not require a ZeroableMask to be created. We can do everything with the starting mask and zeroable bit vector. This removes the last usage of isSingleInputShuffleMask. NFC
llvm-svn: 273804
2016-06-26 05:10:56 +00:00
Craig Topper
df3e57d430 [X86] Replace calls to isSingleInputShuffleMask with just checking if V2 is UNDEF. Canonicalization and creation of shuffle vector ensures this is equivalent.
llvm-svn: 273803
2016-06-26 05:10:53 +00:00
Craig Topper
04ac0be8d0 [SelectionDAG] Use DAG.getCommutedVectorShuffle instead of reimplementing it.
llvm-svn: 273802
2016-06-26 05:10:49 +00:00
Sanjoy Das
ab35eb89e2 [LoopUnswitch] Unswitch on conditions feeding into guards
Summary:
This is a straightforward extension of what LoopUnswitch does to
branches to guards.  That is, we unswitch

```
for (;;) {
  ...
  guard(loop_invariant_cond);
  ...
}
```

into

```
if (loop_invariant_cond) {
  for (;;) {
    ...
    // There is no need to emit guard(true)
    ...
  }
} else {
  for (;;) {
    ...
    guard(false);
    // SimplifyCFG will clean this up by adding an
    // unreachable after the guard(false)
    ...
  }
}
```

Reviewers: majnemer

Subscribers: mcrosier, llvm-commits, mzolotukhin

Differential Revision: http://reviews.llvm.org/D21725

llvm-svn: 273801
2016-06-26 05:10:45 +00:00
Sanjoy Das
ed6f2dc00b [RSForGC] Bring the BDVState struct up to code; NFC
llvm-svn: 273800
2016-06-26 04:55:35 +00:00
Sanjoy Das
443b13473a [RSForGC] Bring computeLiveInValues up to code; NFC
llvm-svn: 273799
2016-06-26 04:55:32 +00:00
Sanjoy Das
0ee5e74148 [RSForGC] Bring computeLiveOutSeed up to code; NFC
llvm-svn: 273798
2016-06-26 04:55:30 +00:00
Sanjoy Das
92ca848bb6 [RSForGC] Bring computeLiveInValues up to code; NFC
llvm-svn: 273797
2016-06-26 04:55:26 +00:00
Sanjoy Das
64500bf238 [RSForGC] Bring recomputeLiveInValues up to code; NFC
llvm-svn: 273796
2016-06-26 04:55:23 +00:00
Sanjoy Das
53da9ed482 [RSForGC] Bring containsGCPtrType, isGCPointerType up to code; NFC
llvm-svn: 273795
2016-06-26 04:55:19 +00:00
Sanjoy Das
44a6662586 [RSForGC] Bring analyzeParsePointLiveness up to code; NFC
llvm-svn: 273794
2016-06-26 04:55:17 +00:00
Sanjoy Das
5c121c8bf9 [RSForGC] Bring meetBDVStateImpl up to code; NFC
llvm-svn: 273793
2016-06-26 04:55:13 +00:00
Sanjoy Das
4a8af29610 [RSForGC] Get rid of the unnecessary MeetBDVStates struct; NFC
All of its implementation is in just one function.

llvm-svn: 273792
2016-06-26 04:55:10 +00:00
Sanjoy Das
5723757547 [RSForGC] Bring findBasePointer up to code; NFC
Name-casing and minor style changes to bring the function up to the LLVM
coding style.

llvm-svn: 273791
2016-06-26 04:55:05 +00:00
David Majnemer
4bf2509bdc [Object, COFF] An import data directory might not consist soley of imports
The last import is the penultimate entry, the last entry is nulled out.
Data beyond the null entry should not be considered to hold import
entries.

This fixes PR28302.

N.B.  I am working on a reduced testcase, the one in PR28302 is too
large.

llvm-svn: 273790
2016-06-26 04:36:32 +00:00
Vedant Kumar
0bf7c0b1b7 [llvm-cov] Simplify the way expansion views are rendered (NFC)
If a sub-view has already been rendered, it's helpful to re-render the
expansion site before rendering the next expansion view. Make this fact
explicit in the rendering interface, instead of hiding it behind an
awkward Optional<LineRef> parameter.

llvm-svn: 273789
2016-06-26 02:45:13 +00:00
Craig Topper
ba6158b462 [X86] Convert ==/!= comparisons with -1 for checking undef in shuffle lowering to comparisons of <0 or >=0. While there do the same for other kinds of index checks that can just check for greater than 0. No functional change intended.
llvm-svn: 273788
2016-06-25 19:05:29 +00:00
Craig Topper
a945a83a5f [X86] Pull similar bitcasts on different paths to earlier shared point. NFC
llvm-svn: 273787
2016-06-25 19:05:23 +00:00
Jan Vesely
c5dee3b656 AMDGPU/R600: Fix GlobalValue regressions.
Don't cast GV expression to MCSymbolRefExpr. r272705 changed GV to binary
expressions by including offset even if the offset it 0
(we haven't hit this sooner since tested workloads don't include static offsets)
We don't really care about the type of expression, so set it directly.
Fixes: r272705

Consider section relative relocations. Since all const as data is in one boffer section relative is equivalent to abs32.
Fixes: r273166

Differential Revision: http://reviews.llvm.org/D21633

llvm-svn: 273785
2016-06-25 18:24:16 +00:00
Sanjay Patel
7be14224bc update tests to use FileCheck
llvm-svn: 273784
2016-06-25 17:39:10 +00:00
Michael Gottesman
751d2dc853 [cmake] Port the llvm-config option --build-mode to LLVMConfig.cmake via the variable LLVM_BUILD_TYPE.
This is just a small step in the direction of making LLVMConfig.cmake a complete
replacement for llvm-config.

For those unfamiliar, llvm-config --build-mode prints out CMAKE_BUILD_TYPE. Thus
as one can imagine, LLVM_BUILD_TYPE is @CMAKE_BUILD_TYPE@.

llvm-svn: 273782
2016-06-25 11:31:50 +00:00
Hubert Tong
6872827a0f Reapply r273664 with workaround for MSVC
Reviewers: rsmith, faisalv, aaron.ballman

Subscribers: llvm-commits, cfe-commits, nwilson

Differential Revision: http://reviews.llvm.org/D19770

llvm-svn: 273781
2016-06-25 11:23:59 +00:00
David Majnemer
daa0b9b3c4 Just a small cleanup
No functional change is intended

llvm-svn: 273780
2016-06-25 08:34:38 +00:00
David Majnemer
eecff2722a Revert "[SimplifyCFG] Stop inserting calls to llvm.trap for UB"
This reverts commit r273778, it seems to break UBSan :/

llvm-svn: 273779
2016-06-25 08:19:55 +00:00
David Majnemer
9f643fc17a [SimplifyCFG] Stop inserting calls to llvm.trap for UB
SimplifyCFG had logic to insert calls to llvm.trap for two very
particular IR patterns: stores and invokes of undef/null.

While InstCombine canonicalizes certain undefined behavior IR patterns
to stores of undef, phase ordering means that this cannot be relied upon
in general.

There are much better tools than llvm.trap: UBSan and ASan.

N.B. I could be argued into reverting this change if a clear argument as
to why it is important that we synthesize llvm.trap for stores, I'd be
hard pressed to see why it'd be useful for invokes...

llvm-svn: 273778
2016-06-25 08:04:19 +00:00
David Majnemer
3c5c29ea74 [InstSimplify] Replace calls to null with undef
Calling null is undefined behavior, we can simplify the resulting value
to undef.

llvm-svn: 273777
2016-06-25 07:37:30 +00:00
David Majnemer
a8dc7a78cf [SimplifyCFG] Replace calls to null/undef with unreachable
Calling null is undefined behavior, a call to undef can be trivially
treated as a call to null.

llvm-svn: 273776
2016-06-25 07:37:27 +00:00
NAKAMURA Takumi
44505218ac Fix a typo in FindAvailableLoadedValue, introduced by r273734. [-Wdocumentation]
llvm-svn: 273774
2016-06-25 06:03:14 +00:00
Vedant Kumar
3d4d8ef75b [llvm-cov] Make an API more consistent, NFC
Make renderExpansionView() look a bit more like renderLine(), and
clarify its doxygen comment.

llvm-svn: 273773
2016-06-25 05:48:59 +00:00