oota-llvm.git
9 years ago[X86][SSE] Replace 128-bit SSE41 PMOVSX intrinsics with native IR
Simon Pilgrim [Wed, 23 Sep 2015 08:48:33 +0000 (08:48 +0000)]
[X86][SSE] Replace 128-bit SSE41 PMOVSX intrinsics with native IR

This patches removes the x86.sse41.pmovsx* intrinsics, provides a suitable upgrade path and updates relevant tests to sign extend a subvector instead.

LLVM counterpart to D12835

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

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

9 years ago[SCEV] Introduce ScalarEvolution::getOne and getZero.
Sanjoy Das [Wed, 23 Sep 2015 01:59:04 +0000 (01:59 +0000)]
[SCEV] Introduce ScalarEvolution::getOne and getZero.

Summary:
It is fairly common to call SE->getConstant(Ty, 0) or
SE->getConstant(Ty, 1); this change makes such uses a little bit
briefer.

I've refactored the call sites I could find easily to use getZero /
getOne.

Reviewers: hfinkel, majnemer, reames

Subscribers: sanjoy, llvm-commits

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

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

9 years agoRevert "Android support for SafeStack."
Evgeniy Stepanov [Wed, 23 Sep 2015 01:23:22 +0000 (01:23 +0000)]
Revert "Android support for SafeStack."

test/Transforms/SafeStack/abi.ll breaks when target is not supported;
needs refactoring.

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

9 years agoAndroid support for SafeStack.
Evgeniy Stepanov [Wed, 23 Sep 2015 01:03:51 +0000 (01:03 +0000)]
Android support for SafeStack.

Add two new ways of accessing the unsafe stack pointer:

* At a fixed offset from the thread TLS base. This is very similar to
  StackProtector cookies, but we plan to extend it to other backends
  (ARM in particular) soon. Bionic-side implementation here:
  https://android-review.googlesource.com/170988.
* Via a function call, as a fallback for platforms that provide
  neither a fixed TLS slot, nor a reasonable TLS implementation (i.e.
  not emutls).

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

9 years agoAdd a test case for the fix of profile update issue when lowering switch statement.
Cong Hou [Wed, 23 Sep 2015 00:34:56 +0000 (00:34 +0000)]
Add a test case for the fix of profile update issue when lowering switch statement.

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

9 years agoFixed an issue on updating profile data when lowering switch statement.
Cong Hou [Wed, 23 Sep 2015 00:20:27 +0000 (00:20 +0000)]
Fixed an issue on updating profile data when lowering switch statement.

Fixed the issue that when there is an edge from the jump table to the default statement, we should check it directly instead of checking if the sibling of the jump table header is a successor of the jump table header, which may not be the default statment but a successor of it.

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

9 years agodsymutil: Fix a comment. [-Wdocumentation]
NAKAMURA Takumi [Wed, 23 Sep 2015 00:19:20 +0000 (00:19 +0000)]
dsymutil: Fix a comment. [-Wdocumentation]

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

9 years agoAdd a unit test for r248341.
Adrian Prantl [Tue, 22 Sep 2015 23:42:47 +0000 (23:42 +0000)]
Add a unit test for r248341.

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

9 years agoIR: Add a setDWOId() method to DICompileUnit.
Adrian Prantl [Tue, 22 Sep 2015 23:21:06 +0000 (23:21 +0000)]
IR: Add a setDWOId() method to DICompileUnit.

Tested via clang.

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

9 years agoIR: Fix the return value of DICompileUnit::getDWOId.
Adrian Prantl [Tue, 22 Sep 2015 23:21:03 +0000 (23:21 +0000)]
IR: Fix the return value of DICompileUnit::getDWOId.

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

9 years agoDebug Info: Emit the dwo_name only in skeleton CUs, not in DWOs.
Adrian Prantl [Tue, 22 Sep 2015 23:21:00 +0000 (23:21 +0000)]
Debug Info: Emit the dwo_name only in skeleton CUs, not in DWOs.

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

9 years agoLiveIntervalAnalysis: Avoid multiple connected liveness components
Matthias Braun [Tue, 22 Sep 2015 22:37:44 +0000 (22:37 +0000)]
LiveIntervalAnalysis: Avoid multiple connected liveness components

We may have subregister defs which are unused but not discovered and
cleaned up prior to liveness analysis. This creates multiple connected
components in the resulting live range which are forbidden in the
MachineVerifier because they would unnecesarily constrain the register
allocator. Rewrite those dead definitions to define a newly created
virtual register.

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

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

9 years agoLiveInterval: Distribute subregister liveranges to new intervals in ConnectedVNInfoEq...
Matthias Braun [Tue, 22 Sep 2015 22:37:42 +0000 (22:37 +0000)]
LiveInterval: Distribute subregister liveranges to new intervals in ConnectedVNInfoEqClasses::Distribute()

This improves ConnectedVNInfoEqClasses::Distribute() to distribute the
segments and value numbers in the subranges instead of conservatively
clearing all subregister info.

No separate test here, just clearing the subrange instead of properly
distributing them would however break my upcoming fix regarding dead super
register definitions.

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

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

9 years ago[Unroll] Do not crash trying to propagate a value to vector load.
Michael Zolotukhin [Tue, 22 Sep 2015 22:27:12 +0000 (22:27 +0000)]
[Unroll] Do not crash trying to propagate a value to vector load.

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

9 years agodsymutil: Follow references to clang modules and recursively clone the
Adrian Prantl [Tue, 22 Sep 2015 22:20:50 +0000 (22:20 +0000)]
dsymutil: Follow references to clang modules and recursively clone the
debug info.

This does not yet resolve external type references.

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

9 years ago[Unroll] Follow-up for r247769: fix a bug in UnrolledInstAnalyzer::visitLoad.
Michael Zolotukhin [Tue, 22 Sep 2015 21:41:29 +0000 (21:41 +0000)]
[Unroll] Follow-up for r247769: fix a bug in UnrolledInstAnalyzer::visitLoad.

Apart from checking that GlobalVariable is a constant, we should check
that it's not a weak constant, in which case we can't propagate its
value.

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

9 years agoInstead of defining the operator delete() function, it is better to delete the functi...
Aaron Ballman [Tue, 22 Sep 2015 21:00:35 +0000 (21:00 +0000)]
Instead of defining the operator delete() function, it is better to delete the function so that any uses (even from within Node or its subclasses) do not accidentally call it. NFC intended.

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

9 years agodsymutil: Make -oso-prepend-path available to DwarfLinker.
Adrian Prantl [Tue, 22 Sep 2015 18:51:01 +0000 (18:51 +0000)]
dsymutil: Make -oso-prepend-path available to DwarfLinker.
NFC

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

9 years agodsymutil: Make resolveDIEReference and getUnitForOffset static functions.
Adrian Prantl [Tue, 22 Sep 2015 18:50:58 +0000 (18:50 +0000)]
dsymutil: Make resolveDIEReference and getUnitForOffset static functions.
NFC.

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

9 years agodsymutil: Make DwarfLinker::reportWarning() public. (NFC)
Adrian Prantl [Tue, 22 Sep 2015 18:50:51 +0000 (18:50 +0000)]
dsymutil: Make DwarfLinker::reportWarning() public. (NFC)

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

9 years agoRemove macho-dump. Its functionality is now covered by llvm-readobj.
Davide Italiano [Tue, 22 Sep 2015 17:46:10 +0000 (17:46 +0000)]
Remove macho-dump. Its functionality is now covered by llvm-readobj.

Approved by: Rafael Espindola, Eric Christopher, Jim Grosbach,
             Alex Rosenberg

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

9 years ago[ARM] Emit clrex in the expanded cmpxchg fail block.
Ahmed Bougacha [Tue, 22 Sep 2015 17:22:58 +0000 (17:22 +0000)]
[ARM] Emit clrex in the expanded cmpxchg fail block.

ARM counterpart to r248291:

In the comparison failure block of a cmpxchg expansion, the initial
ldrex/ldxr will not be followed by a matching strex/stxr.
On ARM/AArch64, this unnecessarily ties up the execution monitor,
which might have a negative performance impact on some uarchs.

Instead, release the monitor in the failure block.
The clrex instruction was designed for this: use it.

Also see ARMARM v8-A B2.10.2:
"Exclusive access instructions and Shareable memory locations".

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

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

9 years ago[AArch64] Emit clrex in the expanded cmpxchg fail block.
Ahmed Bougacha [Tue, 22 Sep 2015 17:21:44 +0000 (17:21 +0000)]
[AArch64] Emit clrex in the expanded cmpxchg fail block.

In the comparison failure block of a cmpxchg expansion, the initial
ldrex/ldxr will not be followed by a matching strex/stxr.
On ARM/AArch64, this unnecessarily ties up the execution monitor,
which might have a negative performance impact on some uarchs.

Instead, release the monitor in the failure block.
The clrex instruction was designed for this: use it.

Also see ARMARM v8-A B2.10.2:
"Exclusive access instructions and Shareable memory locations".

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

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

9 years agoFix a typo.
Adrian Prantl [Tue, 22 Sep 2015 15:31:14 +0000 (15:31 +0000)]
Fix a typo.

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

9 years agoMake helper function static. NFC.
Benjamin Kramer [Tue, 22 Sep 2015 14:34:57 +0000 (14:34 +0000)]
Make helper function static. NFC.

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

9 years ago[mips][sched] Split IIBranch into specific instruction classes.
Daniel Sanders [Tue, 22 Sep 2015 13:36:28 +0000 (13:36 +0000)]
[mips][sched] Split IIBranch into specific instruction classes.

Summary:
Almost no functional change since the InstrItinData's have been duplicated.
The one functional change is to remove IIBranch from the MSA branches. The
classes will be assigned to the MSA instructions as part of implementing
the P5600 scheduler.

II_IndirectBranchPseudo and II_ReturnPseudo can probably be removed. I've
preserved the itinerary information for the corresponding pseudo
instructions to avoid making a functional change to these pseudos in
this patch.

Reviewers: vkalintiris

Subscribers: llvm-commits

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

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

9 years ago[mips][sched] Temporarily rename IIAlu to IIM16Alu. NFC.
Daniel Sanders [Tue, 22 Sep 2015 12:36:28 +0000 (12:36 +0000)]
[mips][sched] Temporarily rename IIAlu to IIM16Alu. NFC.

Summary:
The only instructions left in IIAlu are MIPS16 specific. We're not
implementing a MIPS16 scheduler at this time so rename the class to make it
obvious that they are MIPS16 instructions.

Reviewers: vkalintiris

Subscribers: llvm-commits

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

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

9 years agoDon't raise inexact when lowering ceil, floor, round, trunc.
Stephen Canon [Tue, 22 Sep 2015 11:43:17 +0000 (11:43 +0000)]
Don't raise inexact when lowering ceil, floor, round, trunc.

The C standard has historically not specified whether or not these functions should raise the inexact flag. Traditionally on Darwin, these functions *did* raise inexact, and the llvm lowerings followed that conventions. n1778 (C bindings for IEEE-754 (2008)) clarifies that these functions should not set inexact. This patch brings the lowerings for arm64 and x86 in line with the newly specified behavior.  This also lets us fold some logic into TD patterns, which is nice.

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

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

9 years agoPrune trailing whitespaces.
NAKAMURA Takumi [Tue, 22 Sep 2015 11:19:03 +0000 (11:19 +0000)]
Prune trailing whitespaces.

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

9 years agoUntabify.
NAKAMURA Takumi [Tue, 22 Sep 2015 11:15:07 +0000 (11:15 +0000)]
Untabify.

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

9 years agoReformat blank lines.
NAKAMURA Takumi [Tue, 22 Sep 2015 11:14:39 +0000 (11:14 +0000)]
Reformat blank lines.

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

9 years agoReformat comment lines.
NAKAMURA Takumi [Tue, 22 Sep 2015 11:14:12 +0000 (11:14 +0000)]
Reformat comment lines.

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

9 years agoReformat.
NAKAMURA Takumi [Tue, 22 Sep 2015 11:13:55 +0000 (11:13 +0000)]
Reformat.

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

9 years agoARMInstrInfo.cpp: Reformat.
NAKAMURA Takumi [Tue, 22 Sep 2015 11:10:17 +0000 (11:10 +0000)]
ARMInstrInfo.cpp: Reformat.

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

9 years agoFix utf8 chars.
NAKAMURA Takumi [Tue, 22 Sep 2015 11:10:08 +0000 (11:10 +0000)]
Fix utf8 chars.

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

9 years ago[mips][ias] Implement .cpreturn directive.
Daniel Sanders [Tue, 22 Sep 2015 10:50:09 +0000 (10:50 +0000)]
[mips][ias] Implement .cpreturn directive.

Summary:
Based on a patch by David Chisnall. I've modified the original patch as follows:
* Moved the expansion to the TargetStreamers so that the directive isn't
  expanded when emitting assembly.
* Fixed an operand order bug.
* Changed the move instructions from DADDu to OR to match recent changes to GAS.

Reviewers: vkalintiris

Subscribers: llvm-commits, emaste, seanbruno, theraven

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

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

9 years ago[mips][sched] Added class for WSBH
Daniel Sanders [Tue, 22 Sep 2015 10:01:13 +0000 (10:01 +0000)]
[mips][sched] Added class for WSBH

Summary:
No functional change since no InstrItinData is provided.

Reviewers: vkalintiris

Subscribers: llvm-commits

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

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

9 years ago[llvm-mc-fuzzer] Support untested instruction discovery for variable length instructi...
Daniel Sanders [Tue, 22 Sep 2015 09:22:53 +0000 (09:22 +0000)]
[llvm-mc-fuzzer] Support untested instruction discovery for variable length instruction sets like microMIPS.

Summary:
For fixed length instructions, we can use -max_len to limit the fuzzer to a
single instruction. This doesn't work for variable length instruction sets
since a 4-byte input could consist of one 4-byte instruction or two 2-byte
instructions.

This patch adds a --insn-limit to llvm-mc-fuzzer to limit the input in
terms of instructions processed.

Reviewers: kcc

Subscribers: kcc, llvm-commits

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

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

9 years ago[X86][SSE] Match zero/any extension shuffles that don't start from the first element
Simon Pilgrim [Tue, 22 Sep 2015 08:16:08 +0000 (08:16 +0000)]
[X86][SSE] Match zero/any extension shuffles that don't start from the first element

This patch generalizes the lowering of shuffles as zero extensions to allow extensions that don't start from the first element. It now recognises extensions starting anywhere in the lower 128-bits or at the start of any higher 128-bit lane.

The motivation was to reduce the number of high cost pshufb calls, but it also improves the SSE2 case as well.

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

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

9 years agoRemove extra 'nullptr' entry from an array in tablegen register info file. It should...
Craig Topper [Tue, 22 Sep 2015 05:37:16 +0000 (05:37 +0000)]
Remove extra 'nullptr' entry from an array in tablegen register info file. It should never have been accessed.

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

9 years agoFix formatting of a tablegen register info file by putting a line break in a better...
Craig Topper [Tue, 22 Sep 2015 05:37:14 +0000 (05:37 +0000)]
Fix formatting of a tablegen register info file by putting a line break in a better place.

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

9 years agoUse makeArrayRef and None to simplify some code in a tablegen register info file...
Craig Topper [Tue, 22 Sep 2015 05:37:12 +0000 (05:37 +0000)]
Use makeArrayRef and None to simplify some code in a tablegen register info file. Additionally const correct a couple static array.

Previously the code added an extra nullptr entry to a static array and then created an ArrayRef with a size one less than the static array. If there were no other entries the array would just contain the nullptr and the ArrayRef would be crated with size 0.

Instead, put the right number of entries in the array and explicitly emit 'None' if the size would be 0. This allows the static array constructor of makeArrayRef to be used.

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

9 years agoAMDGPU: Remove unnecessary check
Matt Arsenault [Tue, 22 Sep 2015 04:17:45 +0000 (04:17 +0000)]
AMDGPU: Remove unnecessary check

If the instruction doesn't have enough operands, it
either shouldn't be marked as isCommutable or is malformed.

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

9 years agoLiveIntervalAnalysis: Factor common code into splitSeparateComponents; NFC
Matthias Braun [Tue, 22 Sep 2015 03:44:41 +0000 (03:44 +0000)]
LiveIntervalAnalysis: Factor common code into splitSeparateComponents; NFC

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

9 years ago[llvm-readobj/MachO] Ensure we always have valid CmdName/SegmentName.
Davide Italiano [Tue, 22 Sep 2015 02:14:43 +0000 (02:14 +0000)]
[llvm-readobj/MachO] Ensure we always have valid CmdName/SegmentName.

Otherwise we might end up printing garbage while dumping.

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

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

9 years agoRemove declarations for methods that do not exist.
Matthias Braun [Tue, 22 Sep 2015 01:52:44 +0000 (01:52 +0000)]
Remove declarations for methods that do not exist.

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

9 years agoFix r248164. [-Wdocumentation]
NAKAMURA Takumi [Tue, 22 Sep 2015 01:44:21 +0000 (01:44 +0000)]
Fix r248164. [-Wdocumentation]

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

9 years agoRemove unused TargetTransformInfo dependency from SafeStack pass.
Evgeniy Stepanov [Tue, 22 Sep 2015 00:44:32 +0000 (00:44 +0000)]
Remove unused TargetTransformInfo dependency from SafeStack pass.

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

9 years ago[LoopUnswitch] Require DominatorTree info.
Michael Zolotukhin [Tue, 22 Sep 2015 00:22:47 +0000 (00:22 +0000)]
[LoopUnswitch] Require DominatorTree info.

Summary:
We should either require the DT info to be available, or check if it's
available in every place we use DT (and we already miss such check in
one place, which causes failures in some cases). As other loop passes
preserve DT and it's usually available, it makes sense to just require
it here.

There is no regression test, because the bug only shows up if pass
manager decides to clean DT info right before LoopUnswitch. If
loop-unswitch is run separately, DT is available, so bug isn't exposed.

Reviewers: chandlerc, hfinkel

Subscribers: llvm-commits

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

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

9 years ago[SCEV] Use SaveAndRestore<T> instead of a hand rolled struct; NFCI.
Sanjoy Das [Tue, 22 Sep 2015 00:10:57 +0000 (00:10 +0000)]
[SCEV] Use SaveAndRestore<T> instead of a hand rolled struct; NFCI.

`ClearWalkingBEDominatingCondsOnExit` is exactly `SaveAndRestore<bool>`,
so use `SaveAndRestore<bool>` instead.

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

9 years agofunction names should start with a lower case letter; NFC
Sanjay Patel [Mon, 21 Sep 2015 23:03:16 +0000 (23:03 +0000)]
function names should start with a lower case letter; NFC

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

9 years agodon't repeat function/variable names in header comments; NFC
Sanjay Patel [Mon, 21 Sep 2015 22:47:23 +0000 (22:47 +0000)]
don't repeat function/variable names in header comments; NFC

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

9 years ago[LICM] Hoist calls to readonly argmemonly functions even with stores in the loop
Philip Reames [Mon, 21 Sep 2015 22:27:59 +0000 (22:27 +0000)]
[LICM] Hoist calls to readonly argmemonly functions even with stores in the loop

We know that an argmemonly function can only access memory pointed to by it's pointer arguments. Rather than needing to consider all possible stores as aliasing (as we do for a readonly function), we can only consider the aliasing of the pointer arguments.

Note that this change only addresses hoisting. I'm thinking about how to address speculation safety as well, but that will be a different change.

FYI, argmemonly disallows accessing memory through non-pointer typed arguments.

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

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

9 years agoFix for pr24866
Philip Reames [Mon, 21 Sep 2015 22:04:10 +0000 (22:04 +0000)]
Fix for pr24866

Turns out that not every basic block is guaranteed to have a node within the DominatorTree.  This is really hard to trigger, but the test case from the PR managed to do so.  There's active discussion continuing about what documentation and/or invariants needed cleaned up.

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

9 years agoFix UB: can't bind a reference to nullptr (NFC)
Mehdi Amini [Mon, 21 Sep 2015 21:29:43 +0000 (21:29 +0000)]
Fix UB: can't bind a reference to nullptr (NFC)

From: Mehdi Amini <mehdi.amini@apple.com>

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

9 years agoauto and range-for-ify some things to make changing container types a bit easier...
David Blaikie [Mon, 21 Sep 2015 21:07:50 +0000 (21:07 +0000)]
auto and range-for-ify some things to make changing container types a bit easier in the (possibly near) future

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

9 years ago[DAGCombiner] Improve FMA support for interpolation patterns
Simon Pilgrim [Mon, 21 Sep 2015 20:32:48 +0000 (20:32 +0000)]
[DAGCombiner] Improve FMA support for interpolation patterns

This patch adds support for combining patterns such as (FMUL(FADD(1.0, x), y)) and (FMUL(FSUB(x, 1.0), y)) to their FMA equivalents.

This is useful in particular for linear interpolation cases such as (FADD(FMUL(x, t), FMUL(y, FSUB(1.0, t))))

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

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

9 years ago[ARM] Do not scale vext with a factor
Jeroen Ketema [Mon, 21 Sep 2015 20:28:04 +0000 (20:28 +0000)]
[ARM] Do not scale vext with a factor

The vext pseudo-instruction takes the number of elements that need to be
extracted, not the number of bytes. Hence, use the number of elements
directly instead of scaling them with a factor.

Reviewers: Silviu Baranga, James Molloy
(not reflected in the differential revision)

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

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

9 years ago[DAGCombiner] Tidy up FMA combine helpers. NFCI.
Simon Pilgrim [Mon, 21 Sep 2015 20:15:03 +0000 (20:15 +0000)]
[DAGCombiner] Tidy up FMA combine helpers. NFCI.

Based on feedback for D13003.

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

9 years ago[LoopUtils,LV] Propagate fast-math flags on generated FCmp instructions
James Molloy [Mon, 21 Sep 2015 19:41:19 +0000 (19:41 +0000)]
[LoopUtils,LV] Propagate fast-math flags on generated FCmp instructions

We're currently losing any fast-math flags when synthesizing fcmps for
min/max reductions. In LV, make sure we copy over the scalar inst's
flags. In LoopUtils, we know we only ever match patterns with
hasUnsafeAlgebra, so apply that to any synthesized ops.

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

9 years agoRemove roundingMode argument in APFloat::mod
Stephen Canon [Mon, 21 Sep 2015 19:29:25 +0000 (19:29 +0000)]
Remove roundingMode argument in APFloat::mod

Because mod is always exact, this function should have never taken a rounding mode argument.  The actual implementation still has issues, which I'll look at resolving in a subsequent patch.

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

9 years agoAvoid SEGFAULT if a requested symbol section is absent.
Rafael Espindola [Mon, 21 Sep 2015 19:17:18 +0000 (19:17 +0000)]
Avoid SEGFAULT if a requested symbol section is absent.

Patch by Igor Kudrin!

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

9 years agoFix accidentally committed debug printing
Matt Arsenault [Mon, 21 Sep 2015 18:21:10 +0000 (18:21 +0000)]
Fix accidentally committed debug printing

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

9 years ago[ADT] Remove a couple of the always inline attributes I added.
Chandler Carruth [Mon, 21 Sep 2015 18:02:24 +0000 (18:02 +0000)]
[ADT] Remove a couple of the always inline attributes I added.

Based on conversations with Justin and a few others, these constructors
are really useful to have in the executable so that you can call them
from the debugger. After some measurements, these *particular* calls
aren't so problematic as to make them a good tradeoff for always inline.

Please let me know if there are other functions really needed for
debugging. The always inline attribute is a hack that we should only
really employ when it doesn't hurt.

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

9 years ago[DivergenceAnalysis] Separated definition of class into header.
Marcello Maggioni [Mon, 21 Sep 2015 17:58:14 +0000 (17:58 +0000)]
[DivergenceAnalysis] Separated definition of class into header.

The definition of the DivergenceAnalysis pass was in a CPP
file and wasn't accessible to users of the analysis to get it
through "getAnalysis<>()".
This patch extracts the definition into a separate header that
can be used by users of the analysis to fetch the results.

Patch by Volkan Keles (vkeles@apple.com)

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

9 years agoSelectionDAG: Use InsertNode for EntryNode
Matthias Braun [Mon, 21 Sep 2015 17:41:05 +0000 (17:41 +0000)]
SelectionDAG: Use InsertNode for EntryNode

This fixes problems where two nodes have persistent debug id 0 assigned.

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

9 years ago[FunctionAttrs] Extract a helper function for the core logic used to
Chandler Carruth [Mon, 21 Sep 2015 17:39:41 +0000 (17:39 +0000)]
[FunctionAttrs] Extract a helper function for the core logic used to
evaluate whether 'readonly' or 'readnone' apply to a given function.
This both reduces indentation and will make it easy to share the logic
with a new pass manager implementation.

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

9 years ago[SystemZ] Fix expansion of ISD::FPOW and ISD::FSINCOS
Ulrich Weigand [Mon, 21 Sep 2015 17:35:45 +0000 (17:35 +0000)]
[SystemZ] Fix expansion of ISD::FPOW and ISD::FSINCOS

The ISD::FPOW and ISD::FSINCOS opcodes default to Legal, but there
is no legal instruction for those on SystemZ.  This could cause
LLVM internal errors.  Fixed by setting the operation action to
Expand for those opcodes.

Also added test cases for all other LLVM IR intrinsics that should
generate a library call.  (Those already work correctly since the
default operation action is fine.)

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

9 years agoRevert "[ARM] Handle +t2dsp feature as an ArchExtKind in ARMTargetParser.def"
James Molloy [Mon, 21 Sep 2015 16:35:08 +0000 (16:35 +0000)]
Revert "[ARM] Handle +t2dsp feature as an ArchExtKind in ARMTargetParser.def"

This was committed without the code review (http://reviews.llvm.org/D12937) being approved.

This reverts commit r248152.

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

9 years agoAMDGPU: Move copy handling under switch like other instructions
Matt Arsenault [Mon, 21 Sep 2015 16:27:22 +0000 (16:27 +0000)]
AMDGPU: Move copy handling under switch like other instructions

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

9 years agoadd ShouldChangeType() variant that takes bitwidths
Sanjay Patel [Mon, 21 Sep 2015 16:09:37 +0000 (16:09 +0000)]
add ShouldChangeType() variant that takes bitwidths

This is more efficient for cases like D12965 where we already have widths.

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

9 years agoDAGCombiner: Replace store of FP constant after attemping store merges
Matt Arsenault [Mon, 21 Sep 2015 15:59:46 +0000 (15:59 +0000)]
DAGCombiner: Replace store of FP constant after attemping store merges

If storing multiple FP constants, some subset of the stores
would be replaced with integers due to visit order, so
MergeConsecutiveStores would only partially merge
these.

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

9 years agoFactor replacement of stores of FP constants into new function
Matt Arsenault [Mon, 21 Sep 2015 15:59:43 +0000 (15:59 +0000)]
Factor replacement of stores of FP constants into new function

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

9 years agoFix missing C++ mode comment
Matt Arsenault [Mon, 21 Sep 2015 15:59:41 +0000 (15:59 +0000)]
Fix missing C++ mode comment

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

9 years agodon't repeat function names in comments; NFC
Sanjay Patel [Mon, 21 Sep 2015 15:33:26 +0000 (15:33 +0000)]
don't repeat function names in comments; NFC

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

9 years ago[Machine Combiner] Refactor machine reassociation code to be target-independent.
Chad Rosier [Mon, 21 Sep 2015 15:09:11 +0000 (15:09 +0000)]
[Machine Combiner] Refactor machine reassociation code to be target-independent.

No functional change intended.
Patch by Haicheng Wu <haicheng@codeaurora.org>!

http://reviews.llvm.org/D12887
PR24522

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

9 years ago[ARM] Handle +t2dsp feature as an ArchExtKind in ARMTargetParser.def
Artyom Skrobov [Mon, 21 Sep 2015 12:43:10 +0000 (12:43 +0000)]
[ARM] Handle +t2dsp feature as an ArchExtKind in ARMTargetParser.def

Currently, the availability of DSP instructions (ACLE 6.4.7) is handled in a
hand-rolled tricky condition block in tools/clang/lib/Basic/Targets.cpp, with
a FIXME: attached.

This patch changes the handling of +t2dsp to be in line with other
architecture extensions.

Following review comments, also updating the description of FeatureDSPThumb2
in ARM.td.

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

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

9 years ago[X86][AVX512] add masked version for RSQRT14 & RCP14 Scalar FP
Asaf Badouh [Mon, 21 Sep 2015 10:23:53 +0000 (10:23 +0000)]
[X86][AVX512] add masked version for RSQRT14 & RCP14 Scalar FP

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

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

9 years ago[mips] Allow constant expressions in second argument of .cpsetup.
Daniel Sanders [Mon, 21 Sep 2015 09:26:55 +0000 (09:26 +0000)]
[mips] Allow constant expressions in second argument of .cpsetup.

Summary:
Also tightened up the test and made a trivial fix to prevent double-newline
after emitting .cpsetup directives.

Reviewers: vkalintiris

Subscribers: seanbruno, emaste, llvm-commits

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

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

9 years agoUse makeArrayRef or None to avoid unnecessarily mentioning the ArrayRef type extra...
Craig Topper [Mon, 21 Sep 2015 05:32:41 +0000 (05:32 +0000)]
Use makeArrayRef or None to avoid unnecessarily mentioning the ArrayRef type extra times. NFC

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

9 years agoDon't pass StringRefs around by const reference. Pass by value instead per coding...
Craig Topper [Mon, 21 Sep 2015 00:18:00 +0000 (00:18 +0000)]
Don't pass StringRefs around by const reference. Pass by value instead per coding standards. NFC

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

9 years agoCleanup places that passed SMLoc by const reference to pass it by value instead. NFC
Craig Topper [Sun, 20 Sep 2015 23:35:59 +0000 (23:35 +0000)]
Cleanup places that passed SMLoc by const reference to pass it by value instead. NFC

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

9 years ago[IndVars] Use C++11 style field initialization; NFCI.
Sanjoy Das [Sun, 20 Sep 2015 18:42:53 +0000 (18:42 +0000)]
[IndVars] Use C++11 style field initialization; NFCI.

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

9 years ago[IndVars] Don't add a level of indentation for namespace {. NFC.
Sanjoy Das [Sun, 20 Sep 2015 18:42:50 +0000 (18:42 +0000)]
[IndVars] Don't add a level of indentation for namespace {. NFC.

Whitespace-only change.

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

9 years agoadd test file ahead of any functional changes for PR22428
Sanjay Patel [Sun, 20 Sep 2015 15:58:00 +0000 (15:58 +0000)]
add test file ahead of any functional changes for PR22428

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

9 years ago[X86][SSE] Intrinsics builtins test refresh. NFCI
Simon Pilgrim [Sun, 20 Sep 2015 15:41:35 +0000 (15:41 +0000)]
[X86][SSE] Intrinsics builtins test refresh. NFCI

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

9 years agoAVX512: Implemented encoding and intrinsics for vcmpss/sd.
Igor Breger [Sun, 20 Sep 2015 15:15:10 +0000 (15:15 +0000)]
AVX512: Implemented encoding and intrinsics for vcmpss/sd.
Added tests for intrinsics and encoding.

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

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

9 years ago[X86][AVX512] extend support in Scalar conversion
Asaf Badouh [Sun, 20 Sep 2015 14:31:19 +0000 (14:31 +0000)]
[X86][AVX512] extend support in Scalar conversion
add scalar FP to Int conversion with truncation intrinsics
add scalar conversion FP32 from/to FP64 intrinsics
add rounding mode and SAE mode encoding for these intrinsics

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

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

9 years agoAVX512: vsqrtss/sd encoding and intrinsics implementation.
Igor Breger [Sun, 20 Sep 2015 09:13:41 +0000 (09:13 +0000)]
AVX512: vsqrtss/sd encoding and intrinsics implementation.
Added tests for intrinsics and encoding.

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

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

9 years ago[X86][AVX512DQ] Add fpclass instruction
Asaf Badouh [Sun, 20 Sep 2015 08:46:07 +0000 (08:46 +0000)]
[X86][AVX512DQ] Add fpclass instruction

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

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

9 years ago[X86] Fix sitofp and uitofp instruction matching failures with long double and avx512
Michael Kuperstein [Sun, 20 Sep 2015 08:12:17 +0000 (08:12 +0000)]
[X86] Fix sitofp and uitofp instruction matching failures with long double and avx512

The operation action for i32 and i64 cannot be set to legal, as long double
needs custom lowering.

Patch by: mitch.l.bodart@intel.com
Differential Revision: http://reviews.llvm.org/D12372

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

9 years agoAVX512: Implemented intrinsics for vshuff32x4, vshuff64x2, vshufi64x2, vshufi32x4
Igor Breger [Sun, 20 Sep 2015 07:18:53 +0000 (07:18 +0000)]
AVX512: Implemented intrinsics for vshuff32x4, vshuff64x2, vshufi64x2, vshufi32x4
Added tests for intrinsics.

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

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

9 years ago[IndVars] Don't repeat function names in comment; NFC.
Sanjoy Das [Sun, 20 Sep 2015 06:58:03 +0000 (06:58 +0000)]
[IndVars] Don't repeat function names in comment; NFC.

Only changes comments.

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

9 years agoAVX512: Implement instructions encoding, lowering and intrinsics
Igor Breger [Sun, 20 Sep 2015 06:52:42 +0000 (06:52 +0000)]
AVX512: Implement instructions encoding, lowering and intrinsics
   vinserti64x4, vinserti64x2, vinserti32x8, vinserti32x4, vinsertf64x4, vinsertf64x2, vinsertf32x8, vinsertf32x4
Added tests for encoding, lowering and intrinsics.

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

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

9 years agoARM: cleanup formatting
Saleem Abdulrasool [Sun, 20 Sep 2015 03:19:09 +0000 (03:19 +0000)]
ARM: cleanup formatting

clang-format a line which was poorly formatted.  NFC.

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

9 years ago[IndVars] Fix a bug in r248045.
Sanjoy Das [Sun, 20 Sep 2015 01:52:18 +0000 (01:52 +0000)]
[IndVars] Fix a bug in r248045.

Because -indvars widens induction variables through arithmetic,
`NeverNegative` cannot be a property of the `WidenIV` (a `WidenIV`
manages information for all transitive uses of an IV being widened,
including uses of `-1 * IV`).  Instead it must live on `NarrowIVDefUse`
which manages information for a specific def-use edge in the transitive
use list of an induction variable.

This change also adds a test case that demonstrates the problem with
r248045.

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

9 years agoFixup r248096, commit the *correct* test.
Davide Italiano [Sat, 19 Sep 2015 20:52:47 +0000 (20:52 +0000)]
Fixup r248096, commit the *correct* test.

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

9 years ago[obj2yaml] Fix "time of check to time of use" bug. Add a test.
Davide Italiano [Sat, 19 Sep 2015 20:49:34 +0000 (20:49 +0000)]
[obj2yaml] Fix "time of check to time of use" bug. Add a test.

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

9 years ago[X86][AVX2] Use general sext IR for vpmovsx stack folding tests
Simon Pilgrim [Sat, 19 Sep 2015 17:04:18 +0000 (17:04 +0000)]
[X86][AVX2] Use general sext IR for vpmovsx stack folding tests

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

9 years ago[X86][SSE] Vectorize CTTZ + CTTZ_ZERO_UNDEF
Simon Pilgrim [Sat, 19 Sep 2015 13:22:57 +0000 (13:22 +0000)]
[X86][SSE] Vectorize CTTZ + CTTZ_ZERO_UNDEF

Now that we have fast vector CTPOP implementations we can use this to speed up vector CTTZ using the pattern (cttz(x) = ctpop((x & -x) - 1))

Additionally, for AVX512CD that provides lzcnt instructions we can use the pattern (cttz_undef(x) = (width - 1) - ctlz(x & -x))

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

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