Commit Graph

14378 Commits

Author SHA1 Message Date
Silviu Baranga
bbaff75d11 Revert r260086 and r260085. They have broken the memory
sanitizer bots.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260087 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 11:56:15 +00:00
Silviu Baranga
147a2681b1 [LoopVersioning] Don't assert when there are no memchecks
We shouldn't assert when there are no memchecks, since we
can have SCEV checks. There is already an assert covering
the case where there are no SCEV checks or memchecks.

This also changes the LAA pointer wrapping versioning test
to use the loop versioning pass (this was how I managed to
trigger the assert in the loop versioning pass).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260086 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 11:15:29 +00:00
Silviu Baranga
41fcf12691 [SCEV][LAA] Add no wrap SCEV predicates and use use them to improve strided pointer detection
Summary:
This change adds no wrap SCEV predicates with:
  - support for runtime checking
  - support for expression rewriting:
      (sext ({x,+,y}) -> {sext(x),+,sext(y)}
      (zext ({x,+,y}) -> {zext(x),+,sext(y)}

Note that we are sign extending the increment of the SCEV, even for
the zext case. This is needed to cover the fairly common case where y would
be a (small) negative integer. In order to do this, this change adds two new
flags: nusw and nssw that are applicable to AddRecExprs and permit the
transformations above.

We also change isStridedPtr in LAA to be able to make use of
these predicates. With this feature we should now always be able to
work around overflow issues in the dependence analysis.

Reviewers: mzolotukhin, sanjoy, anemet

Subscribers: mzolotukhin, sanjoy, llvm-commits, rengolin, jmolloy, hfinkel

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260085 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 10:45:50 +00:00
Maxim Ostapenko
428ffed300 [asan] Introduce new hidden -asan-use-private-alias option.
As discussed in https://github.com/google/sanitizers/issues/398, with current
implementation of poisoning globals we can have some CHECK failures or false
positives in case of mixing instrumented and non-instrumented code due to ASan
poisons innocent globals from non-sanitized binary/library. We can use private
aliases to avoid such errors. In addition, to preserve ODR violation detection,
we introduce new __odr_asan_gen_XXX symbol for each instrumented global that
indicates if this global was already registered. To detect ODR violation in
runtime, we should only check the value of indicator and report an error if it
isn't equal to zero.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260075 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-08 08:30:57 +00:00
Asaf Badouh
a79a41855d [X86][AVX512] add intrinsics of Scalar FP to integer conversion with rounding mode
Differential Revision: http://reviews.llvm.org/D16629

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260033 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 14:59:13 +00:00
Daniel Berlin
f71914f0a8 Don't use module context here. It's unnecessary and makes it harder to write unittests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260015 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 02:03:39 +00:00
Daniel Berlin
539e9b9ecd Compute live-in for MemorySSA
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260014 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 01:52:19 +00:00
Daniel Berlin
6d8a11a537 Only insert into definingblocks once per block
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260013 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-07 01:52:15 +00:00
Ashutosh Nema
9feccf470d New Loop Versioning LICM Pass
Summary:
When alias analysis is uncertain about the aliasing between any two accesses,
it will return MayAlias. This uncertainty from alias analysis restricts LICM
from proceeding further. In cases where alias analysis is uncertain we might
use loop versioning as an alternative.

Loop Versioning will create a version of the loop with aggressive aliasing
assumptions in addition to the original with conservative (default) aliasing
assumptions. The version of the loop making aggressive aliasing assumptions
will have all the memory accesses marked as no-alias. These two versions of
loop will be preceded by a memory runtime check. This runtime check consists
of bound checks for all unique memory accessed in loop, and it ensures the
lack of memory aliasing. The result of the runtime check determines which of
the loop versions is executed: If the runtime check detects any memory
aliasing, then the original loop is executed. Otherwise, the version with
aggressive aliasing assumptions is used.

The pass is off by default and can be enabled with command line option 
-enable-loop-versioning-licm.

Reviewers: hfinkel, anemet, chatur01, reames

Subscribers: MatzeB, grosser, joker.eph, sanjoy, javed.absar, sbaranga,
             llvm-commits

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259986 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-06 07:47:48 +00:00
Michael Zolotukhin
60daf2aa3f [LoopUnrolling] Try harder to avoid rebuilding LCSSA when possible.
In r255133 (reapplied r253126) we started to avoid redundant
recomputation of LCSSA after loop-unrolling. This patch moves one step
further in this direction - now we can avoid it for much wider range of
loops, as we start to look at IR and try to figure out if the
transformation actually breaks LCSSA phis or makes it necessary to
insert new ones.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259869 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 02:17:36 +00:00
Joseph Tremoulet
419c3d8a2f [RS4GC] Pass DenseMap by reference, NFC
Summary:
Passing the rematerialized values map to insertRematerializationStores by
value looks to be a simple oversight; update it to pass by reference.


Reviewers: reames, sanjoy

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259867 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 01:42:52 +00:00
Adam Nemet
a8e75884ec [LoopLoadElim] Don't allow versioning when optForSize
This was requested in the review of D16300.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259861 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 01:14:05 +00:00
Wei Mi
eafb39b656 [SCEV] Try to reuse existing value during SCEV expansion
Current SCEV expansion will expand SCEV as a sequence of operations
and doesn't utilize the value already existed. This will introduce
redundent computation which may not be cleaned up throughly by
following optimizations.

This patch introduces an ExprValueMap which is a map from SCEV to the
set of equal values with the same SCEV. When a SCEV is expanded, the
set of values is checked and reused whenever possible before generating
a sequence of operations.

The original commit triggered regressions in Polly tests. The regressions
exposed two problems which have been fixed in current version.

1. Polly will generate a new function based on the old one. To generate an
instruction for the new function, it builds SCEV for the old instruction,
applies some tranformation on the SCEV generated, then expands the transformed
SCEV and insert the expanded value into new function. Because SCEV expansion
may reuse value cached in ExprValueMap, the value in old function may be
inserted into new function, which is wrong.
   In SCEVExpander::expand, there is a logic to check the cached value to
be used should dominate the insertion point. However, for the above
case, the check always passes. That is because the insertion point is
in a new function, which is unreachable from the old function. However
for unreachable node, DominatorTreeBase::dominates thinks it will be
dominated by any other node.
   The fix is to simply add a check that the cached value to be used in
expansion should be in the same function as the insertion point instruction.

2. When the SCEV is of scConstant type, expanding it directly is cheaper than
reusing a normal value cached. Although in the cached value set in ExprValueMap,
there is a Constant type value, but it is not easy to find it out -- the cached
Value set is not sorted according to the potential cost. Existing reuse logic
in SCEVExpander::expand simply chooses the first legal element from the cached
value set.
   The fix is that when the SCEV is of scConstant type, don't try the reuse
logic. simply expand it.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259736 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-04 01:27:38 +00:00
Gerolf Hoflehner
8a70ce27fd [SimplifyCFG] Fix for "endless" loop after dead code removal (Alternative to
D16251)

Summary:
This is a simpler fix to the problem than the dominator approach in
http://reviews.llvm.org/D16251. It adds only values into the gather() while loop
that have been seen before.

The actual endless loop is in the constant compare gather() routine in
Utils/SimplifyCFG.cpp. The same value ret.0.off0.i is pushed back into the
queue:
%.ret.0.off0.i = or i1 %.ret.0.off0.i, %cmp10.i

Here is what happens at the IR level:

for.cond.i:                                       ; preds = %if.end6.i,
%if.end.i54
%ix.0.i = phi i32 [ 0, %if.end.i54 ], [ %inc.i55, %if.end6.i ]
%ret.0.off0.i = phi i1 [false, %if.end.i54], [%.ret.0.off0.i, %if.end6.i] <<<
%cmp2.i = icmp ult i32 %ix.0.i, %11
br i1 %cmp2.i, label %for.body.i, label %LBJ_TmpSimpleNeedExt.exit

if.end6.i:                                        ; preds = %for.body.i
%cmp10.i = icmp ugt i32 %conv.i, %add9.i
%.ret.0.off0.i = or i1 %ret.0.off0.i, %cmp10.i <<<

When if.end.i54 gets eliminated which removes the definition of ret.0.off0.i.
The result is the expression %.ret.0.off0.i = or i1 %.ret.0.off0.i, %cmp10.i
(Note the first ‘or’ operand is now %.ret.0.off0.i, and *NOT* %ret.0.off0.i).
And
now there is use of .ret.0.off0.i before a definition which triggers the
“endless” loop in gather():

while(!DFT.empty()) {

    V = DFT.pop_back_val();   // V is .ret.0.off0.i

    if (Instruction *I = dyn_cast<Instruction>(V)) {
      // If it is a || (or && depending on isEQ), process the operands.
      if (I->getOpcode() == (isEQ ? Instruction::Or : Instruction::And)) {
        DFT.push_back(I->getOperand(1));  // This is now .ret.0.off0.i also
        DFT.push_back(I->getOperand(0));

        continue; // “endless loop” for .ret.0.off0.i
      }

Reviewers: reames, ahatanak

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259730 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-03 23:54:25 +00:00
Vedant Kumar
f12e85d570 [InstrProfiling] Fix a comment (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259727 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-03 23:22:43 +00:00
Junmo Park
f38d8c901e Minor code cleanups. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259725 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-03 23:16:39 +00:00
David Majnemer
8e686c2bd4 [LoopStrengthReduce] Don't rewrite PHIs with incoming values from CatchSwitches
Bail out if we have a PHI on an EHPad that gets a value from a
CatchSwitchInst.  Because the CatchSwitchInst cannot be split, there is
no good place to stick any instructions.

This fixes PR26373.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259702 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-03 21:30:34 +00:00
Wei Mi
dcbf7c311e Revert r259662, which caused regressions on polly tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259675 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-03 18:05:57 +00:00
Quentin Colombet
185966c650 [InstCombine] Revert r238452: Fold IntToPtr and PtrToInt into preceding loads.
According to git bisect, this is the root cause of a miscompile for Regex in
libLLVMSupport. I am still working on reducing a test case.
The actual bug may be elsewhere and this commit just exposed it.

Anyway, at the moment, to reproduce, follow these steps:
1. Build clang and libLTO in release mode.
2. Create a new build directory <stage2> and cd into it.
3. Use clang and libLTO from #1 to build llvm-extract in Release mode + asserts
   using -O2 -flto
4. Run llvm-extract  -ralias '.*bar' -S test/Other/extract-alias.ll

Result:
program doesn't contain global named '.*bar'!

Expected result:
@a0a0bar = alias void ()* @bar
@a0bar = alias void ()* @bar

declare void @bar()

Note: In step #3, if you don't use lto or asserts, the miscompile disappears.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259674 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-03 18:04:13 +00:00
Wei Mi
e32bfe25a3 [SCEV] Try to reuse existing value during SCEV expansion
Current SCEV expansion will expand SCEV as a sequence of operations
and doesn't utilize the value already existed. This will introduce
redundent computation which may not be cleaned up throughly by
following optimizations.

This patch introduces an ExprValueMap which is a map from SCEV to the
set of equal values with the same SCEV. When a SCEV is expanded, the
set of values is checked and reused whenever possible before generating
a sequence of operations.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259662 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-03 17:05:12 +00:00
Peter Collingbourne
a6d2c28101 LowerBitSets: Don't bother to do any work if the llvm.bitset.test intrinsic is unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259625 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-03 03:48:46 +00:00
Peter Collingbourne
065d01f100 Add #include "llvm/Support/raw_ostream.h" to fix Windows build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259623 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-03 03:16:37 +00:00
Peter Collingbourne
6f984cbfab Transforms: Move GlobalOpt's Evaluator to Utils where it can be reused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259621 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-03 02:51:00 +00:00
Adam Nemet
5ff09a66da [LoopVersioning] Expose loop versioning as a pass too
Summary:
LoopVersioning is a transform utility that transform passes can use to
run-time disambiguate may-aliasing accesses. I'd like to also expose as
pass to allow it to be unit-tested.

I am planning to add support for non-aliasing annotation in
LoopVersioning and I'd like to be able to write tests directly using
this pass.

(After that feature is done, the pass could also be used to look for
optimization opportunities that are hidden behind incomplete alias
information at compile time.)

The pass drives LoopVersioning in its default way which is to fully
disambiguate may-aliasing accesses no matter how many checks are
required.

Reviewers: hfinkel, ashutosh.nema, sbaranga

Subscribers: zzheng, mssimpso, llvm-commits, sanjoy

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259610 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-03 00:06:10 +00:00
George Burgess IV
6264f293fd Attempt #2 to unbreak r259595.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259602 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-02 23:26:01 +00:00
George Burgess IV
e1e04cba57 Attempt to fix builds broken by r259595.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259599 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-02 23:15:26 +00:00
George Burgess IV
02e0bb6dc6 This patch adds MemorySSA to LLVM.
Please see include/llvm/Transforms/Utils/MemorySSA.h for a description
of MemorySSA, and what it does.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259595 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-02 22:46:49 +00:00
Anna Zaks
04df7c1989 [asan] Add iOS support to AddressSanitzier
Differential Revision: http://reviews.llvm.org/D15625

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259586 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-02 22:05:07 +00:00
Eugene Zelenko
380d47d651 Fix Clang-tidy readability-redundant-control-flow warnings; other minor fixes.
Differential revision: http://reviews.llvm.org/D16793


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259539 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-02 18:20:45 +00:00
Sanjay Patel
7d0cdb4a10 function names start with a lowercase letter; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259425 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-01 22:23:39 +00:00
Sanjay Patel
633f0ac7dd [InstCombine] simplify masked scatter/gather intrinsics with zero masks
A masked scatter with a zero mask means there's no store.
A masked gather with a zero mask means the passthru arg is returned.

This is a continuation of:
http://reviews.llvm.org/rL259369
http://reviews.llvm.org/rL259392



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259421 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-01 22:10:26 +00:00
Sanjay Patel
5db289a3a3 [InstCombine] simplify masked store intrinsics with all ones or zeros masks
A masked store with a zero mask means there's no store.
A masked store with an allOnes mask means it's a normal vector store.

This is a continuation of:
http://reviews.llvm.org/rL259369



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259392 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-01 19:39:52 +00:00
David Majnemer
2291a38a78 [InstCombine] Don't transform (X+INT_MAX)>=(Y+INT_MAX) -> (X<=Y)
This miscompile came about because we tried to use a transform which was
only appropriate for xor operators when addition was present.

This fixes PR26407.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259375 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-01 17:37:56 +00:00
Sanjay Patel
0a9644c134 [InstCombine] simplify masked load intrinsics with all ones or zeros masks
A masked load with a zero mask means there's no load.
A masked load with an allOnes mask means it's a normal vector load.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259369 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-01 17:00:10 +00:00
Matthew Simpson
54a309e4ea [LV] Rename RdxPHIsToFix to PHIsToFix (NFC)
In the future, we will vectorize recurrences other than reductions. This patch
renames a few variables and updates their associated comments to enable them to
be reused for non-reduction PHI nodes.

This change was requested in the review for D16197.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259364 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-01 16:07:01 +00:00
Matthew Simpson
5c7e8a999b Reapply commit r258404 with fix.
The previous patch caused PR26364. The fix is to ensure that we don't enter a
cycle when iterating over use-def chains.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259357 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-01 13:38:29 +00:00
Sanjay Patel
8ae9283986 add helper function for minnum/maxnum ; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259326 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-31 16:35:23 +00:00
Sanjay Patel
1b85558809 use range-based for loop; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259325 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-31 16:34:48 +00:00
Sanjay Patel
8f8429c590 fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259324 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-31 16:34:11 +00:00
Sanjay Patel
0714d26fe2 simplify; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259323 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-31 16:33:33 +00:00
Craig Topper
95769998f9 Convert int to Twine instead of using utostr since it was already being added to a Twine. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259308 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-31 00:15:35 +00:00
Matt Arsenault
0f1831aa7d InstCombine: fabs(x) * fabs(x) -> x * x
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259295 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-30 05:02:00 +00:00
Matthias Braun
5e08bd340a Avoid overly large SmallPtrSet/SmallSet
These sets perform linear searching in small mode so it is never a good
idea to use SmallSize/N bigger than 32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259283 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-30 01:24:31 +00:00
Sanjay Patel
2801207748 function names start with a lower case letter ; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259264 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 23:27:03 +00:00
Sanjay Patel
62d61909e4 fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259262 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 23:14:58 +00:00
Fiona Glaser
d7541ec848 Fix typo in LoopSimplifyCFG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259261 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 23:12:52 +00:00
Fiona Glaser
e98524387e Add LoopSimplifyCFG pass
Loop transformations can sometimes fail because the loop, while in
valid rotated LCSSA form, is not in a canonical CFG form. This is
an extremely simple pass that just merges obviously redundant
blocks, which can be used to fix some known failure cases. In the
future, it may be enhanced with more cases (and have code shared with
SimplifyCFG).

This allows us to run LoopSimplifyCFG -> LoopRotate -> LoopUnroll,
so that SimplifyCFG cleans up the loop before Rotate tries to run.

Not currently used in the pass manager, since this pass doesn't do
anything unless you can hook it up in an LPM with other loop passes.
It'll be added once Chandler cleans up things to allow this.

Tested in a custom pipeline out of tree to confirm it works in
practice (in addition to the included trivial test).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259256 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 22:35:36 +00:00
Sanjay Patel
b17df8b4d7 [InstCombine] avoid an insertelement transformation that induces the opposite extractelement fold (PR26354)
We would infinite loop because we created a shufflevector that was wider than
needed and then failed to combine that with the insertelement. When subsequently
visiting the extractelement from that shuffle, we see that it's unnecessary,
delete it, and trigger another visit to the insertelement.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259236 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 20:21:02 +00:00
David Majnemer
0b7532c243 Fix the build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259215 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 17:46:57 +00:00
Matthew Simpson
fd50cfc8b4 [SLP] Fix printing of debug statement (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259212 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 17:21:38 +00:00