oota-llvm.git
9 years agoAVX-512: Added VPACK* instructions forms for KNL and SKX
Elena Demikhovsky [Mon, 4 May 2015 09:14:02 +0000 (09:14 +0000)]
AVX-512: Added VPACK* instructions forms for KNL and SKX
and their intrinsics
by Asaf Badouh (asaf.badouh@intel.com)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236414 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReplace windows_error calls with mapWindowsError.
Yaron Keren [Mon, 4 May 2015 04:48:10 +0000 (04:48 +0000)]
Replace windows_error calls with mapWindowsError.

After r210687, windows_error does nothing but call mapWindowsError.
Other Windows/*.inc files directly call mapWindowsError. This patch
updates Path.inc and Process.inc to do the same.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236409 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agollvm-cov: Warn if object file is newer than profile
Justin Bogner [Mon, 4 May 2015 04:09:38 +0000 (04:09 +0000)]
llvm-cov: Warn if object file is newer than profile

Looking at coverage with an out of date profile can be confusing.
Provide a little hint that something might be wrong.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236408 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDeprecate in-source autotools builds
Jonathan Roelofs [Mon, 4 May 2015 02:04:54 +0000 (02:04 +0000)]
Deprecate in-source autotools builds

This is a followup from:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150323/268067.html

Upgrade instructions:
  $ mv llvm/include/llvm/Config/config.h ./config.h.BACKUP
  # copy the configure line from line 7 of llvm/config.log
  # (for example: `$ ./configure --no-create --no-recursion`)
  $ mkdir build
  $ cd build
  # run the configure line, but this time with '../llvm' at the beginning:
  $ ../llvm/configure --no-create --no-recursion

These warnings will soon be turned into hard errors after a week.  Speak up now
if this is going to be a problem for you.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236399 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[TableGen] Replace 'static_cast' with 'cast'.
Craig Topper [Mon, 4 May 2015 01:35:42 +0000 (01:35 +0000)]
[TableGen] Replace 'static_cast' with 'cast'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236398 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[TableGen] Formatting cleanup. Mostly removing trailing whitespace and unnecessary...
Craig Topper [Mon, 4 May 2015 01:35:39 +0000 (01:35 +0000)]
[TableGen] Formatting cleanup. Mostly removing trailing whitespace and unnecessary curly braces. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236397 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMasked gather and scatter intrinsics - enabled codegen for KNL.
Elena Demikhovsky [Sun, 3 May 2015 07:12:25 +0000 (07:12 +0000)]
Masked gather and scatter intrinsics - enabled codegen for KNL.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236394 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix typo in comment.
Nico Weber [Sat, 2 May 2015 21:34:39 +0000 (21:34 +0000)]
Fix typo in comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236392 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SSE2] Minor tidyup of v16i8 SHL lowering. NFC.
Simon Pilgrim [Sat, 2 May 2015 14:42:43 +0000 (14:42 +0000)]
[SSE2] Minor tidyup of v16i8 SHL lowering. NFC.

Removed code that was replicating v8i16 'shift + mask' implementation that is done more nicely by making use of LowerScalarImmediateShift

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236388 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[DAGCombiner] Enabled vector float/double -> int constant folding
Simon Pilgrim [Sat, 2 May 2015 13:04:07 +0000 (13:04 +0000)]
[DAGCombiner] Enabled vector float/double -> int constant folding

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236387 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoLine ending fix
Simon Pilgrim [Sat, 2 May 2015 11:50:47 +0000 (11:50 +0000)]
Line ending fix

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236386 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SSE] Added vector int (i32 and i64) -> float/double conversion tests
Simon Pilgrim [Sat, 2 May 2015 11:42:47 +0000 (11:42 +0000)]
[SSE] Added vector int (i32 and i64) -> float/double conversion tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236385 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SSE] Added vector float/double -> i32 and i64 conversion tests
Simon Pilgrim [Sat, 2 May 2015 11:18:47 +0000 (11:18 +0000)]
[SSE] Added vector float/double -> i32 and i64 conversion tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236384 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDebugInfo: Use low_pc relative debug_ranges under fission when the CU has a low_pc
David Blaikie [Sat, 2 May 2015 02:31:49 +0000 (02:31 +0000)]
DebugInfo: Use low_pc relative debug_ranges under fission when the CU has a low_pc

Seems we were setting the base address on the wrong DwarfCompileUnit
object so it wasn't being used when generating the ranges.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236377 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRework test to use FileCheck by making sure we have no xmm registers
Eric Christopher [Sat, 2 May 2015 01:06:17 +0000 (01:06 +0000)]
Rework test to use FileCheck by making sure we have no xmm registers
with numbers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236373 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMC: Tidy up comments and clean up formatting a bit. NFC.
Jim Grosbach [Sat, 2 May 2015 00:44:14 +0000 (00:44 +0000)]
MC: Tidy up comments and clean up formatting a bit. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236368 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix spelling.
Jim Grosbach [Sat, 2 May 2015 00:44:07 +0000 (00:44 +0000)]
Fix spelling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236367 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "[WinEH] Add an EH registration and state insertion pass for 32-bit x86"
Reid Kleckner [Fri, 1 May 2015 22:50:14 +0000 (22:50 +0000)]
Revert "[WinEH] Add an EH registration and state insertion pass for 32-bit x86"

This reverts commit r236359. Things are still broken despite testing. :(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236360 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRe-land "[WinEH] Add an EH registration and state insertion pass for 32-bit x86"
Reid Kleckner [Fri, 1 May 2015 22:40:25 +0000 (22:40 +0000)]
Re-land "[WinEH] Add an EH registration and state insertion pass for 32-bit x86"

This reverts commit r236340.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236359 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] r236351 fix does not work on builder configurations yet.
Colin LeMahieu [Fri, 1 May 2015 22:39:20 +0000 (22:39 +0000)]
[Hexagon] r236351 fix does not work on builder configurations yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236358 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AArch64][FastISel] Variant of the logical instructions that use two input
Quentin Colombet [Fri, 1 May 2015 21:34:57 +0000 (21:34 +0000)]
[AArch64][FastISel] Variant of the logical instructions that use two input
registers cannot write on SP.

rdar://problem/20748715

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236352 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Removing variable unused in release.
Colin LeMahieu [Fri, 1 May 2015 21:30:22 +0000 (21:30 +0000)]
[Hexagon] Removing variable unused in release.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236351 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Adding expression MC emission and removing XFAIL from test that hits this...
Colin LeMahieu [Fri, 1 May 2015 21:14:21 +0000 (21:14 +0000)]
[Hexagon] Adding expression MC emission and removing XFAIL from test that hits this code path.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236348 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AArch64][FastISel] Fix the setting of kill flags for MUL -> UMULH sequences.
Quentin Colombet [Fri, 1 May 2015 20:57:11 +0000 (20:57 +0000)]
[AArch64][FastISel] Fix the setting of kill flags for MUL -> UMULH sequences.

rdar://problem/20748715

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236346 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix compilation of PDBApiTest.
Zachary Turner [Fri, 1 May 2015 20:51:49 +0000 (20:51 +0000)]
Fix compilation of PDBApiTest.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236345 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix build.
Zachary Turner [Fri, 1 May 2015 20:33:10 +0000 (20:33 +0000)]
Fix build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236343 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[llvm-pdbdump] Support dynamic load address and external symbols.
Zachary Turner [Fri, 1 May 2015 20:24:26 +0000 (20:24 +0000)]
[llvm-pdbdump] Support dynamic load address and external symbols.

This patch adds the --load-address command line option to
llvm-pdbdump, which dumps all addresses assuming the module has
loaded at the specified address.

Additionally, this patch adds an option to llvm-pdbdump to support
dumping of public symbols (i.e. symbols with external linkage).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236342 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReapply [RuntimeDyldELF] Fold Placeholder into Addend
Keno Fischer [Fri, 1 May 2015 20:21:45 +0000 (20:21 +0000)]
Reapply [RuntimeDyldELF] Fold Placeholder into Addend

This reapplies r235060 and 235070, which were reverted because of test failures
in LLDB. The failure was caused because at  moment RuntimeDyld is processing
relocations for all sections, irrespective of whether we actually load them
into memory or not, but RuntimeDyld was not actually remembering where in memory
the unrelocated section is. This commit includes a fix for that issue by
remembering that pointer, though the longer term fix should be to stop processing
unneeded sections.

Original Summary:

This allows us to get rid of the original unrelocated object file after
we're done processing relocations (but before applying them).
MachO and COFF already do not require this (currently we have temporary hacks
to prevent ownership from being released, but those are brittle and should be
removed soon).

The placeholder mechanism allowed the relocation resolver to look at original
object file to obtain more information that are required to apply the
relocations. This is usually necessary in two cases:

- For relocations targetting sub-word memory locations, there may be pieces
  of the instruction at the target address which we should not override.
- Some relocations on some platforms allow an extra addend to be encoded in
  their immediate fields.

The problem is that in the second case the information cannot be recovered
after the relocations have been applied once because they will have been
overridden. In the first case we also need to be careful to not use any bits
that aren't fixed and may have been overriden by applying a first relocation.

In the past both have been fixed by just looking at original object file. This
patch attempts to recover the information from the first by looking at the
relocated object file, while the extra addend in the second case is read
upon relocation processing and addend to the regular addend.

I have tested this on X86. Other platforms represent my best understanding
of how those relocations should work, but I may have missed something because
I do not have access to those platforms.
We will keep the ugly workarounds in place for a couple of days, so this commit
can be reverted if it breaks the bots.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236341 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "[WinEH] Add an EH registration and state insertion pass for 32-bit x86"
Reid Kleckner [Fri, 1 May 2015 20:14:04 +0000 (20:14 +0000)]
Revert "[WinEH] Add an EH registration and state insertion pass for 32-bit x86"

This reverts commit r236339, it breaks the win32 clang-cl self-host.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236340 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[WinEH] Add an EH registration and state insertion pass for 32-bit x86
Reid Kleckner [Fri, 1 May 2015 20:04:54 +0000 (20:04 +0000)]
[WinEH] Add an EH registration and state insertion pass for 32-bit x86

This pass is responsible for constructing the EH registration object
that gets linked into fs:00, which is all it does in this change. In the
future, it will also insert stores to update the EH state number.

I considered keeping this functionality in WinEHPrepare, but it's pretty
separable and X86 specific. It has conceptually very little to do with
the task of WinEHPrepare, which is currently outlining.  WinEHPrepare is
also in theory useful on ARM, but this logic is pretty x86 specific.

Reviewers: andrew.w.kaylor, majnemer

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236339 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ARM] Transfer the internal flag in thumb2 size reduction.
Pete Cooper [Fri, 1 May 2015 18:57:32 +0000 (18:57 +0000)]
[ARM] Transfer the internal flag in thumb2 size reduction.

Converting from t2LDRs to tLDRr caused the shift argument to drop the internal flag.  This would then throw machine verifier errors.

Unfortunately i'm having trouble reducing a test case.  I'm going to keep trying, but so far its a scary combination of machine sinking, an 'and i1', loads feeding loads, and a bunch of code which shouldn't change IT block formation, but does.  Its not useful to commit a test in that state as we have no way of knowing if it even hits this code reliably in future.

rdar://problem/20752113

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236333 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMove unit test into anonymous namespace as per convention.
Douglas Katzman [Fri, 1 May 2015 18:51:06 +0000 (18:51 +0000)]
Move unit test into anonymous namespace as per convention.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236332 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoYAML: Fix the output of sequences that contain flow sequences.
Alex Lorenz [Fri, 1 May 2015 18:34:25 +0000 (18:34 +0000)]
YAML: Fix the output of sequences that contain flow sequences.

This patch fixes a bug where the YAML Output class emitted
a sequence of flow sequences without the '-' characters.
Before:

  seq:
    [ a, b ]
    [ c, d ]

After:

  seq:
    - [ a, b ]
    - [ c, d ]

Reviewers: Justin Bogner

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236329 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUpdate YamlIO documentation for the ScalarTraits class.
Alex Lorenz [Fri, 1 May 2015 18:20:23 +0000 (18:20 +0000)]
Update YamlIO documentation for the ScalarTraits class.

This patch adds the missing context parameter to the
input and output methods in ScalarTraits.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236328 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoARM: Align functions containing Thumb-2 jump tables to 4 bytes.
Peter Collingbourne [Fri, 1 May 2015 18:05:59 +0000 (18:05 +0000)]
ARM: Align functions containing Thumb-2 jump tables to 4 bytes.

Functions with jump tables need an alignment of 4 because they use the ADR
instruction, which aligns the PC to 4 bytes before adding an offset.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236327 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix infinite recursion in ScaledNumber::toInt.
Diego Novillo [Fri, 1 May 2015 17:59:15 +0000 (17:59 +0000)]
Fix infinite recursion in ScaledNumber::toInt.

Patch from dexonsmith. The call to toInt() was calling compareTo() which
in some cases would call back to toInt(), creating an infinite loop.

Fixed by simplifying the logic in compareTo() to avoid the co-recursion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236326 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Sparc] Repair fixups in little endian mode.
James Y Knight [Fri, 1 May 2015 17:13:02 +0000 (17:13 +0000)]
[Sparc] Repair fixups in little endian mode.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236324 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix omission from adding sparcel (original http://reviews.llvm.org/D9263)
Douglas Katzman [Fri, 1 May 2015 16:49:58 +0000 (16:49 +0000)]
Fix omission from adding sparcel (original reviews.llvm.org/D9263)

"obviously" it needs to go in parseArch *and* getArchTypeForLLVMName.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236322 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove std::move on return of temporary.
Benjamin Kramer [Fri, 1 May 2015 15:26:22 +0000 (15:26 +0000)]
Remove std::move on return of temporary.

No functionality change. Found by -Wpessimizing-move.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236318 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove std::move on return of temporary.
Benjamin Kramer [Fri, 1 May 2015 15:25:29 +0000 (15:25 +0000)]
Remove std::move on return of temporary.

No functionality change. Found by -Wpessimizing-move.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236317 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove std::move on return when it could prevent copy elision.
Benjamin Kramer [Fri, 1 May 2015 15:16:11 +0000 (15:16 +0000)]
Remove std::move on return when it could prevent copy elision.

Found by -Wpessimizing-move, no functional change. The APFloat and
PassManager change doesn't affect codegen as returning a by-value
argument will always result in a move.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236316 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips] [IAS] Fix error messages for using LI with 64-bit immediates.
Toma Tabacu [Fri, 1 May 2015 12:19:27 +0000 (12:19 +0000)]
[mips] [IAS] Fix error messages for using LI with 64-bit immediates.

Summary:
LI should never accept immediates larger than 32 bits.
The additional Is32BitImm boolean also paves the way for unifying the functionality that LA and LI have in common.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236313 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CMake] Also search for prefixed versions of ld.gold
Niels Ole Salscheider [Fri, 1 May 2015 11:58:30 +0000 (11:58 +0000)]
[CMake] Also search for prefixed versions of ld.gold

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236312 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips] [IAS] Slightly improve shift instruction generation in expandLoadImm.
Toma Tabacu [Fri, 1 May 2015 10:26:47 +0000 (10:26 +0000)]
[mips] [IAS] Slightly improve shift instruction generation in expandLoadImm.

Summary:
Generate one DSLL32 of 0 instead of two consecutive DSLL of 16.
In order to do this I had to change createLShiftOri's template argument from a bool to an unsigned.

This also gave me the opportunity to rewrite the mips64-expansions.s test, as it was testing the same cases multiple times and skipping over other cases.
It was also somewhat unreadable, as the CHECK lines were grouped in a huge block of text at the beginning of the file.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236311 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SelectionDAG] Unary vector constant folding integer legality fixes
Simon Pilgrim [Fri, 1 May 2015 08:20:04 +0000 (08:20 +0000)]
[SelectionDAG] Unary vector constant folding integer legality fixes

This patch fixes issues with vector constant folding not correctly handling scalar input operands if they require implicit truncation - this was tested with llvm-stress as recommended by Patrik H Hagglund.

The patch ensures that integer input scalars from a build vector are correctly truncated before folding, and that constant integer scalar results are promoted to a legal type before inclusion in the new folded build vector.

I have added another crash test case and also a test for UINT_TO_FP / SINT_TO_FP using an non-truncated scalar input, which was failing before this patch.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236308 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Add VCC as an implict def of SI_KILL
Tom Stellard [Fri, 1 May 2015 03:44:09 +0000 (03:44 +0000)]
R600/SI: Add VCC as an implict def of SI_KILL

When SI_KILL has a register operand, its lowered form writes to vcc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236307 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Fix verifier errors from the SIAnnotateControlFlow pass
Tom Stellard [Fri, 1 May 2015 03:44:08 +0000 (03:44 +0000)]
R600/SI: Fix verifier errors from the SIAnnotateControlFlow pass

This pass was generating 'Instruction does not dominate all uses!'
errors for programs which had loops with a condition variable that
depended on the result of a phi instruction from outside of the loop.

The pass was inserting new phi nodes outside of the loop which used values
defined inside the loop.

http://bugs.freedesktop.org/show_bug.cgi?id=90056

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236306 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ARM][TEST] Strengthen test against smarter reg alloc.
Quentin Colombet [Fri, 1 May 2015 00:45:55 +0000 (00:45 +0000)]
[ARM][TEST] Strengthen test against smarter reg alloc.
Follow-up of r236247.

rdar://problem/20770899

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236296 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ARM] optimizeSelect should clear kill flags.
Pete Cooper [Thu, 30 Apr 2015 23:57:47 +0000 (23:57 +0000)]
[ARM] optimizeSelect should clear kill flags.

If we move an instruction from one block down to a MOVC and predicate it,
then the original instruction could be moved in to a loop.  In this case,
its invalid for any kill flags to remain on there.

Fails with -verfy-machineinstrs.

rdar://problem/20752113

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236290 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoInstrProf: Instrumenter support for setting profile output from command line
Justin Bogner [Thu, 30 Apr 2015 23:49:23 +0000 (23:49 +0000)]
InstrProf: Instrumenter support for setting profile output from command line

This change is the second of 3 patches to add support for specifying
the profile output from the command line via -fprofile-instr-generate=<path>,
where the specified output path/file will be overridden by the
LLVM_PROFILE_FILE environment variable.

This patch adds the necessary support to the llvm instrumenter, specifically
a new member of GCOVOptions for clang to save the specified filename, and
support for calling the new compiler-rt interface from __llvm_profile_init.

Patch by Teresa Johnson. Thanks!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236288 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix typo
Matt Arsenault [Thu, 30 Apr 2015 23:20:56 +0000 (23:20 +0000)]
Fix typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236283 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCommute the internal flag on MachineOperands.
Pete Cooper [Thu, 30 Apr 2015 23:14:14 +0000 (23:14 +0000)]
Commute the internal flag on MachineOperands.

When commuting a thumb instruction in the size reduction pass, thumb
instructions are represented as a bundle and so some operands may be marked
as internal.  The internal flag has to move with the operand when commuting.

This test is sensitive to register allocation so can't specifically check that
this error was happening, but so long as it continues to pass with -verify then
hopefully its still ok.

rdar://problem/20752113

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236282 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Object] Teach Object and llvm-objdump about ".hidden"
Davide Italiano [Thu, 30 Apr 2015 23:08:53 +0000 (23:08 +0000)]
[Object] Teach Object and llvm-objdump about ".hidden"

Differential Revision: http://reviews.llvm.org/D9416
Reviewed by: rafael

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236279 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix -Wpessimizing-move warnings by removing std::move calls.
Richard Trieu [Thu, 30 Apr 2015 23:07:00 +0000 (23:07 +0000)]
Fix -Wpessimizing-move warnings by removing std::move calls.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236278 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove unnecessary break.
Rafael Espindola [Thu, 30 Apr 2015 22:41:12 +0000 (22:41 +0000)]
Remove unnecessary break.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236275 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AArch64] Fix bad register class constraint in fast-isel for TST instruction.
Quentin Colombet [Thu, 30 Apr 2015 22:27:20 +0000 (22:27 +0000)]
[AArch64] Fix bad register class constraint in fast-isel for TST instruction.

rdar://problem/20748715

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236273 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDon't always apply kill flag in thumb2 ABS pseudo expansion.
Pete Cooper [Thu, 30 Apr 2015 22:15:59 +0000 (22:15 +0000)]
Don't always apply kill flag in thumb2 ABS pseudo expansion.

The expansion for t2ABS was always setting the kill flag on the rsb instruction.
It should instead only be set on rsb if it was set on the original ABS instruction.

rdar://problem/20752113

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236272 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Use 4 byte preferred aggregate alignment on Win32
Reid Kleckner [Thu, 30 Apr 2015 22:11:59 +0000 (22:11 +0000)]
[X86] Use 4 byte preferred aggregate alignment on Win32

This helps reduce the frequency of stack realignment prologues in 32-bit
X86 Windows code. Before this change and the corresponding clang change,
we would take the max of the type preferred alignment and the explicit
alignment on the alloca.

If you don't override aggregate alignment in datalayout, you get a
default of 8. This dates back to 2007 / r34356, and changing it seems
prohibitively difficult at this point.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236270 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoInstCombineSimplifyDemanded: Remove nsw/nuw flags when optimizing demanded bits
Matthias Braun [Thu, 30 Apr 2015 22:05:30 +0000 (22:05 +0000)]
InstCombineSimplifyDemanded: Remove nsw/nuw flags when optimizing demanded bits

When optimizing demanded bits of the operands of an Add we have to
remove the nsw/nuw flags as we have no guarantee anymore that we don't
wrap.  This is legal here because the top bit is not demanded.  In fact
this operaion was already performed but missed in the case of an Add
with a constant on the right side.  To fix this this patch refactors the
code to unify the code paths in SimplifyDemandedUseBits() handling of
Add/Sub:

- The transformation of Add->Or is removed from the simplify demand
  code because the equivalent transformation exists in
  InstCombiner::visitAdd()
- KnownOnes/KnownZero are not adjusted for Add x, C anymore as
  computeKnownBits() already performs these computations.
- The simplification of the operands is unified. In this new version
  constant on the right side of a Sub are shrunk now as I could not find
  a reason why not to do so.
- The special case for clearing nsw/nuw in ShrinkDemandedConstant() is
  not necessary anymore as the caller does that already.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236269 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoInstCombine: Move Sub->Xor rule from SimplifyDemanded to InstCombine
Matthias Braun [Thu, 30 Apr 2015 22:04:26 +0000 (22:04 +0000)]
InstCombine: Move Sub->Xor rule from SimplifyDemanded to InstCombine

The rule that turns a sub to xor if the LHS is 2^n-1 and the remaining bits
are known zero, does not use the demanded bits at all: Move it to the
normal InstCombine code path.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236268 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSimplify the creation of compressed debug sections.
Rafael Espindola [Thu, 30 Apr 2015 21:51:58 +0000 (21:51 +0000)]
Simplify the creation of compressed debug sections.

This is actually fairly simple in the current code layout: Check if we should
compress just before writing out and everything else just works.

This removes the last case in which the object writer was creating a
fragment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236267 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix comment in test. NFC.
Andrea Di Biagio [Thu, 30 Apr 2015 21:22:28 +0000 (21:22 +0000)]
Fix comment in test. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236262 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReplace unreachable code with llvm_unreachable.
Rafael Espindola [Thu, 30 Apr 2015 21:20:06 +0000 (21:20 +0000)]
Replace unreachable code with llvm_unreachable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236261 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDon't create a MCSectionData when we don't have to.
Rafael Espindola [Thu, 30 Apr 2015 21:10:06 +0000 (21:10 +0000)]
Don't create a MCSectionData when we don't have to.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236260 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix for PR23103. Correctly propagate the 'IsUndef' flag to the register operands...
Andrea Di Biagio [Thu, 30 Apr 2015 21:03:29 +0000 (21:03 +0000)]
Fix for PR23103. Correctly propagate the 'IsUndef' flag to the register operands of a commuted instruction.

Revision 220239 exposed a latent bug in method
'TargetInstrInfo::commuteInstruction'. When commuting the operands of a machine
instruction, method 'commuteInstruction' didn't correctly propagate the
'IsUndef' flag to the register operands of the new (commuted) instruction.

Before this patch, the following instruction:
  %vreg4<def> = VADDSDrr  %vreg14, %vreg5<undef>; FR64:%vreg4,%vreg14,%vreg5

was wrongly converted by method 'commuteInstruction' into:
  %vreg4<def> = VADDSDrr  %vreg5, %vreg14<undef>; FR64:%vreg4,%vreg5,%vreg14

The correct instruction should have been:
  %vreg4<def> = VADDSDrr  %vreg5<undef>, %vreg14; FR64:%vreg4,%vreg5,%vreg14

This patch fixes the problem in method 'TargetInstrInfo::commuteInstruction'.
When swapping the operands of a machine instruction, we now make sure that
'IsUndef' flags are correctly set.
Added test case 'pr23103.ll'.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236258 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAvoid an extra loop over the sections.
Rafael Espindola [Thu, 30 Apr 2015 20:57:14 +0000 (20:57 +0000)]
Avoid an extra loop over the sections.

Add string to the section header string table as we add sections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236257 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake the section table a member of ELFObjectWriter.
Rafael Espindola [Thu, 30 Apr 2015 20:53:27 +0000 (20:53 +0000)]
Make the section table a member of ELFObjectWriter.

This avoids passing it around and lets us build a small helper to add
a section to the table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236255 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoNothing inherits from this, drop the protected:
Rafael Espindola [Thu, 30 Apr 2015 20:37:36 +0000 (20:37 +0000)]
Nothing inherits from this, drop the protected:

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236253 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFor llvm-objdump, with the -archive-headers and -macho options, use the -non-verbose
Kevin Enderby [Thu, 30 Apr 2015 20:30:42 +0000 (20:30 +0000)]
For llvm-objdump, with the -archive-headers and -macho options, use the -non-verbose
option to print the archive headers using raw numeric values.  Also add the -archive-member-offsets
for use with these to also trigger printing of the offset of the archive member from the start
of the archive.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236252 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoExhaustively test all triples in TripleTest.
Douglas Katzman [Thu, 30 Apr 2015 20:08:44 +0000 (20:08 +0000)]
Exhaustively test all triples in TripleTest.

Iteration over all permutations didn't really work,
due to evolution of the underlying enums.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236251 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMips: Remove dead declaration
Matt Arsenault [Thu, 30 Apr 2015 19:35:43 +0000 (19:35 +0000)]
Mips: Remove dead declaration

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236250 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMachineVerifier: Don't crash if MachineOperand has no parent
Matt Arsenault [Thu, 30 Apr 2015 19:35:41 +0000 (19:35 +0000)]
MachineVerifier: Don't crash if MachineOperand has no parent

If you somehow added a MachineOperand to an instruction
that did not have the parent set, the verifier would
crash since it attempts to use the operand's parent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236249 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDon't rewrite jumps to empty BBs to landing pads.
Pete Cooper [Thu, 30 Apr 2015 18:58:23 +0000 (18:58 +0000)]
Don't rewrite jumps to empty BBs to landing pads.

In the test case here, the 'unreachable' BB was removed by BranchFolding because its empty.

It then rewrote the jump from 'entry' to jump to its fallthrough, which was a landing pad.

This results in 'entry' jumping to 2 different landing pads, which fails the machine verifier.

rdar://problem/20750162

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236248 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ARM] Do not generate invalid encoding for stack adjust, even if this is just
Quentin Colombet [Thu, 30 Apr 2015 18:52:49 +0000 (18:52 +0000)]
[ARM] Do not generate invalid encoding for stack adjust, even if this is just
temporary.

Because of that:
1. The machine verifier was complaining on such code.
2. The generate code worked just because the thumb reduction size pass fixed the
opcode.

rdar://problem/20749824

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236247 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAArch64: add BFC alias for the BFI/BFM instructions.
Tim Northover [Thu, 30 Apr 2015 18:28:58 +0000 (18:28 +0000)]
AArch64: add BFC alias for the BFI/BFM instructions.

Unlike 32-bit ARM, AArch64 can use wzr/xzr to implement this without the need
for a separate instruction.

rdar://18679590

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236245 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd a note about permitting default member initializers
Reid Kleckner [Thu, 30 Apr 2015 18:17:12 +0000 (18:17 +0000)]
Add a note about permitting default member initializers

Use them in WinEHPrepare so that we can spot any toolchain bugs that
come up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236244 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReinstate revisions r234755, r234759, r234760
Jan Vesely [Thu, 30 Apr 2015 17:15:56 +0000 (17:15 +0000)]
Reinstate revisions r234755, r234759, r234760

changes:
  Don't apply on hexagon and NVPTX since they no longer claim to support UADDO/USUBO
  Add location to getConstant
  Drop comment about the ops being turned into expand

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236240 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMove equality function for AliasAnalysis::Location from DenseMapInfo to Location...
Daniel Berlin [Thu, 30 Apr 2015 16:15:07 +0000 (16:15 +0000)]
Move equality function for AliasAnalysis::Location from DenseMapInfo to Location struct so it can be used in other types of maps

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236237 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoWrite sections mostly in one pass.
Rafael Espindola [Thu, 30 Apr 2015 14:21:49 +0000 (14:21 +0000)]
Write sections mostly in one pass.

During ELF writing, there is no need to further relax the sections, so we
should not be creating fragments. This patch avoids doing so in all cases
but debug section compression (that is next).

Also, the ELF format is fairly simple to write. We can do a single pass over
the sections to write them out and compute the section header table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236235 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSilencing an "enumeral and non-enumeral type in conditional expression" warning;...
Aaron Ballman [Thu, 30 Apr 2015 14:03:12 +0000 (14:03 +0000)]
Silencing an "enumeral and non-enumeral type in conditional expression" warning; NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236234 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDon't check for offsets in tests where it is not relevant.
Rafael Espindola [Thu, 30 Apr 2015 13:57:06 +0000 (13:57 +0000)]
Don't check for offsets in tests where it is not relevant.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236233 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix private constructor for ScaledNumber.
Diego Novillo [Thu, 30 Apr 2015 13:22:48 +0000 (13:22 +0000)]
Fix private constructor for ScaledNumber.

Summary:
The private constructor for ScaledNumber was using uint64_t instead of
DigitsT. This was preventing instantiations of ScaledNumber with
anything other than uint64_t types.

In implementing the tests, I ran into another issue. Operators >>= and
<<= did not have variants for accepting other ScaledNumber as the shift
argument. This is expected by the SCALED_NUMBER_BOP.

It makes no sense to allow shifting a ScaledNumber by another
ScaledNumber, so the patch includes two new templates for shifting
ScaledNumbers.

Reviewers: dexonsmith

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236232 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCheck the entire content of the comdat group.
Rafael Espindola [Thu, 30 Apr 2015 13:08:09 +0000 (13:08 +0000)]
Check the entire content of the comdat group.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236230 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix typo in comment. NFC.
Diego Novillo [Thu, 30 Apr 2015 12:27:51 +0000 (12:27 +0000)]
Fix typo in comment. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236227 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips] Sorted instructions in mips64r6 disassembly tests. NFC.
Daniel Sanders [Thu, 30 Apr 2015 10:52:42 +0000 (10:52 +0000)]
[mips] Sorted instructions in mips64r6 disassembly tests. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236223 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips][mips64r6] Sorted instructions in test. NFC.
Daniel Sanders [Thu, 30 Apr 2015 10:23:48 +0000 (10:23 +0000)]
[mips][mips64r6] Sorted instructions in test. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236221 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips][msa] Rename main check prefix to 'ALL' in basic operations tests. NFC
Daniel Sanders [Thu, 30 Apr 2015 09:57:37 +0000 (09:57 +0000)]
[mips][msa] Rename main check prefix to 'ALL' in basic operations tests. NFC

Summary:
The majority of the checks are subtarget independent. The few that aren't
will be corrected shortly.

Reviewers: vkalintiris

Reviewed By: vkalintiris

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236220 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips][msa] Use CHECK-LABEL where missing, and remove checks matching the .size direc...
Daniel Sanders [Thu, 30 Apr 2015 09:56:30 +0000 (09:56 +0000)]
[mips][msa] Use CHECK-LABEL where missing, and remove checks matching the .size directive. NFC.

Summary:

Reviewers: vkalintiris

Reviewed By: vkalintiris

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236219 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips] Add missing signext attributes to MSA basic operations tests. NFC.
Daniel Sanders [Thu, 30 Apr 2015 09:24:09 +0000 (09:24 +0000)]
[mips] Add missing signext attributes to MSA basic operations tests. NFC.

Summary:
This doesn't make much difference to MIPS32, but it will simplify a
MIPS64r6 bugfix which will follow shortly by removing unnecessary
sign-extension of parameters.

Reviewers: vkalintiris

Reviewed By: vkalintiris

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236216 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd convenient overloads for CreateInsertElement and CreateExtractElement methods...
Pawel Bylica [Thu, 30 Apr 2015 09:01:22 +0000 (09:01 +0000)]
Add convenient overloads for CreateInsertElement and CreateExtractElement methods in IRBuilder

Summary:
This pathc add convenient overloads for CreateInsertElement and CreateExtractElement methods in IRBuilder
where vector index can be uint64_t instead of Value*.

Test Plan: Unit test included.

Reviewers: majnemer

Reviewed By: majnemer

Subscribers: majnemer, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236214 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSilence unused warning in non-assert builds.
Daniel Jasper [Thu, 30 Apr 2015 09:01:21 +0000 (09:01 +0000)]
Silence unused warning in non-assert builds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236213 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoInline local variable to silence unused warning.
Daniel Jasper [Thu, 30 Apr 2015 08:51:13 +0000 (08:51 +0000)]
Inline local variable to silence unused warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236212 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMasked gather and scatter - added DAGCombine visitors
Elena Demikhovsky [Thu, 30 Apr 2015 08:38:48 +0000 (08:38 +0000)]
Masked gather and scatter - added DAGCombine visitors
and AVX-512 instruction selection patterns.
All other patches, including tests will follow.

http://reviews.llvm.org/D7665

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236211 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SSE] Fix for MUL v16i8 on pre-SSE41 targets (PR23369).
Simon Pilgrim [Thu, 30 Apr 2015 08:23:16 +0000 (08:23 +0000)]
[SSE] Fix for MUL v16i8 on pre-SSE41 targets (PR23369).

Sign extension of i8 to i16 was placing the unpacked bytes in the lower byte instead of the upper byte.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236209 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[TableGen] Cleanup formatting by moving operators from beginning of line to end of...
Craig Topper [Thu, 30 Apr 2015 05:54:22 +0000 (05:54 +0000)]
[TableGen] Cleanup formatting by moving operators from beginning of line to end of previous line. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236206 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[TableGen] Used range-based for loop. NFC.
Craig Topper [Thu, 30 Apr 2015 05:54:20 +0000 (05:54 +0000)]
[TableGen] Used range-based for loop. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236205 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[TableGen] Merge a variable assignment and a return to drop curly braces. Fold an...
Craig Topper [Thu, 30 Apr 2015 05:12:52 +0000 (05:12 +0000)]
[TableGen] Merge a variable assignment and a return to drop curly braces. Fold an assignment into an if. Use auto on the result of a couple dyn_casts. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236204 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[InstCombine] Add new rule for MIN(MAX(~A, ~B), ~C) et. al.
Sanjoy Das [Thu, 30 Apr 2015 04:56:04 +0000 (04:56 +0000)]
[InstCombine] Add new rule for MIN(MAX(~A, ~B), ~C) et. al.

Summary:
Optimizing these well are especially interesting for IRCE since it
"clamps" values by generating this sort of pattern through SCEV
expressions.

Depends on D9352.

Reviewers: majnemer

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236203 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[InstCombine] Add a new formula for SMIN.
Sanjoy Das [Thu, 30 Apr 2015 04:56:00 +0000 (04:56 +0000)]
[InstCombine] Add a new formula for SMIN.

Summary:
After this change `MatchSelectPattern` recognizes the following form
of SMIN:

  Y >s C ? ~Y : ~C == ~Y <s ~C ? ~Y : ~C = SMIN(~Y, ~C)

Reviewers: majnemer

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236202 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDon't overflow GCTable
Filipe Cabecinhas [Thu, 30 Apr 2015 04:09:41 +0000 (04:09 +0000)]
Don't overflow GCTable

Summary: Bug found with AFL fuzz.

Reviewers: rafael, dexonsmith

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236200 91177308-0d34-0410-b5e6-96231b3b80d8