Commit Graph

156714 Commits

Author SHA1 Message Date
Teresa Johnson
dcf64df89b [ThinLTO] Ensure sanitizer passes are run
Summary:
In ThinLTO compilation, we exit populateModulePassManager early and
were not adding PM extension passes meant to run at the end of the
pipeline. This includes sanitizer passes. Add these passes before
the early exit.

A test will be added to projects/compiler-rt.

Reviewers: pcc

Subscribers: mehdi_amini, inglorion, llvm-commits

Differential Revision: https://reviews.llvm.org/D39565

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317714 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 19:45:52 +00:00
Craig Topper
9799e6facc [X86] Don't call validateInstruction from MatchAndEmitInstruction when MatchingInlineAsm is set. The MCInst won't be populated.
Without this we can't parse gather instructions in ms inline asm blocks. The validateInstruction function was introduced in r316700 to check gather constraints.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317713 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 19:38:48 +00:00
Craig Topper
ca3cf87eee [ValueTracking] Use APInt::isNullValue/isOneValue which are more efficient for large APInts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317712 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 19:38:45 +00:00
Dan Gohman
94964bb756 [WebAssembly] Add a test for inline-asm "m" constraints.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317711 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 19:37:24 +00:00
Dan Gohman
40486d7dcf [WebAssembly] Call signExtend to get sign extended register
Patch by Jatin Bhateja!

Differential Revision: https://reviews.llvm.org/D39529


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317710 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 19:24:21 +00:00
Adrian Prantl
29ba7f646b Un-XFAIL a test after the bugfix in r317702.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317708 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 19:18:20 +00:00
Dan Gohman
8e0d3d4cd7 [WebAssembly] Revise the strategy for inline asm.
Previously, an "r" constraint would mean the compiler provides a value
on WebAssembly's operand stack. This was tricky to use properly,
particularly since it isn't possible to declare a new local from within
an inline asm string.

With this patch, "r" provides the value in a WebAssembly local, and the
local index is provided to the inline asm string. This requires inline
asm to use get_local and set_local to read the register. This does
potentially result in larger code size, however inline asm should
hopefully be quite rare in WebAssembly.

This also means that the "m" constraint can no longer be supported, as
WebAssembly has nothing like a "memory operand" that includes an
implicit get_local.

This fixes PR34599 for the wasm32-unknown-unknown-wasm target (though
not for the ELF target).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317707 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 19:18:08 +00:00
Adrian McCarthy
cf89e1c2fe NFC: Rename MCSafeSEHFragment to MCSymbolIdFragment
Summary:
This fragment emits a symbol ID and will be useful for more than just Safe SEH
tables (e.g., I plan to re-use it for Control Flow Guard tables).  This is
simply a rename refactor.

Reviewers: rnk

Subscribers: llvm-commits, hiraditya

Differential Revision: https://reviews.llvm.org/D39770

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317703 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 18:57:02 +00:00
Adrian Prantl
27b6b3117f Handle inlined variables in SelectionDAGBuilder::EmitFuncArgumentDbgValue().
In 2010 a commit with no testcase and no further explanation
explicitly disabled the handling of inlined variables in
EmitFuncArgumentDbgValue(). I don't think there is a good reason for
this any more and re-enabling this adds debug locations for variables
associated with an LLVM function argument in functions that are
inlined into the first basic block. The only downside of doing this is
that we may insert a DBG_VALUE before the inlined scope, but (1) this
could be filtered out later, and (2) LiveDebugValues will not
propagate it into subsequent basic blocks if they don't dominate the
variable's lexical scope, so this seems like a small price to pay.

rdar://problem/26228128

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317702 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 18:27:13 +00:00
Simon Pilgrim
15443bdc4b [X86] Add some initial scheduling tests for generic x86 instructions
These will be using inline asm to ensure we have coverage that we're unlikely to get from lowering of basic ir.

Currently waiting for D39728 to land to add support for scheduler comments for inline asm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317698 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 16:35:42 +00:00
Jonas Hahnfeld
d44ed288f9 [CMake] Remove target to build native tablegen
This was once needed so that multiple tablegen binaries don't compile
the library concurrently. However, this isn't needed anymore since
adding USES_TERMINAL to the custom_command.
This is supported by the fact that the target was only building
LLVMSupport since some cleanups a year ago. If this dependency had
really been needed, we would have seen complaints.

Differential Revision: https://reviews.llvm.org/D39299

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317695 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 14:31:54 +00:00
Jonas Hahnfeld
41dfa19981 [CMake] Add custom target to create build directory
CMake does a poor job in tracking dependencies on files and directories
directly. Create custom target similar to the configuration step.
On my system, this avoids the reconfiguration on each build.

Differential Revision: https://reviews.llvm.org/D39298

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317694 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 14:31:51 +00:00
Alex Bradbury
a3ad9bd475 [utils] Add RISC-V support to update_llc_test_checks.py
This should be a trivial change, and I've started using it for generating all 
tests at https://github.com/lowrisc/riscv-llvm (i.e. it's been tested in 
action quite a lot). Note that the regex does not attempt to match 
.cfi_startproc, as I want to ensure compatibility with functions that have the 
nounwind attribute.

Differential Revision: https://reviews.llvm.org/D39789


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317693 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 14:24:42 +00:00
Alex Bradbury
da781c7295 [RISCV] Initial support for function calls
Note that this is just enough for simple function call examples to generate 
working code. Support for varargs etc follows in future patches.

Differential Revision: https://reviews.llvm.org/D29936


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317691 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 13:41:21 +00:00
Alex Bradbury
eacca308e4 [RISCV] Codegen for conditional branches
A good portion of this patch is the extra functions that needed to be 
implemented to support the test case. e.g. storeRegToStackSlot, 
loadRegFromStackSlot, eliminateFrameIndex.

Setting ISD::BR_CC to Expand may appear non-obvious on an architecture with 
branch+cmp instructions. However, I found it much easier to deal with matching 
the expanded form.

I had to change simm13_lsb0 and simm21_lsb0 to inherit from the 
Operand<OtherVT> class rather than Operand<i32> in order to keep tablegen 
happy. This isn't a big deal, but it does seem a shame to lose the uniformity 
across immediate types when there's not an obvious benefit (I'm hoping a 
tablegen expert will educate me on what I'm missing here!).

Differential Revision: https://reviews.llvm.org/D29935


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317690 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 13:31:40 +00:00
Alex Bradbury
6c9938cf11 [RISCV] Codegen support for memory operations on global addresses
Differential Revision: https://reviews.llvm.org/D39103


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317688 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 13:24:21 +00:00
Alex Bradbury
21ae2e7a56 [RISCV] Codegen support for memory operations
This required the implementation of RISCVTargetInstrInfo::copyPhysReg. Support
for lowering global addresses follow in the next patch.

Differential Revision: https://reviews.llvm.org/D29934


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317685 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 12:20:01 +00:00
Alex Bradbury
c5abad3f59 [RISCV] Codegen support for materializing constants
Differential Revision: https://reviews.llvm.org/D39101


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317684 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 12:02:22 +00:00
Ivan A. Kosarev
96342ebf2a [Analysis] Fix merging TBAA tags with different final access types
There are cases when we have to merge TBAA access tags with the
same base access type, but different final access types. For
example, accesses to different members of the same structure may
be vectorized into a single load or store instruction. Since we
currently assume that the tags to merge always share the same
final access type, we incorrectly return a tag that describes an
access to one of the original final access types as the generic
tag. This patch fixes that by producing generic tags for the
common type and not the final access types of the original tags.

Resolves:
PR35225: Wrong tbaa metadata after load store vectorizer due to
recent change
https://bugs.llvm.org/show_bug.cgi?id=35225

Differential Revision: https://reviews.llvm.org/D39732


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317682 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 11:42:21 +00:00
Simon Dardis
d036c9c439 [mips] Guard indirect and tailcall pseudo instructions correctly.
Previously these pseudo instructions were not guarded by ISA, so their
select was dependant on the ordering of the entries in the DAG matcher.

Reviewers: atanasyan

Differential Revision: https://reviews.llvm.org/D39723


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317681 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 11:13:44 +00:00
Nuno Lopes
4514930eb0 BasicAA: fix bug where we would return partialalias instead of noalias
My fix is conservative and will make us return may-alias instead.

The test case is:
check(gep(x, 0), n, gep(x, n), -1)  with  n == sizeof(x)

Here, the first value accesses the whole object, but the second access
doesn't access anything. The semantics of -1 is read until the end of the
object, which in this case means read nothing.

No test case, since isn't trivial to exploit this one, but I've proved it correct.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317680 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 10:59:00 +00:00
Alex Bradbury
4d211caa37 [NFCI] Ensure TargetOpcode::* are compatible with guessInstructionProperties=0
rL162640 introduced CodeGenTarget::guessInstructionProperties. If a target 
sets guessInstructionProperties=0 in its FooInstrInfo, tablegen will error if 
it has to guess properties from patterns. Unfortunately, 
guessInstructionProperties=0 can't be used with current upstream LLVM as 
instructions in the TargetOpcode namespace are always included and sometimes 
have inferred properties for mayLoad, mayStore, and hasSideEffects. This patch 
provides the simplest possible fix to this problem, setting default values for 
these fields in the TargetOpcode scope. There is no intended functional 
change, as the explicitly set properties should match what was previously 
inferred. A number of the instructions had hasSideEffects=1 inferred 
unintentionally. This patch makes it explicit, while future patches (such as 
D37097) correct the property.

Differential Revision: https://reviews.llvm.org/D37065



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317674 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 09:26:06 +00:00
Matt Arsenault
19b50e8dff DAG: Add computeKnownBitsForFrameIndex
Some of the AMDGPU stack addressing modes require knowing the sign
bit is zero. We used to accomplish this by custom lowering
frame indexes, and then putting an AssertZext around a
TargetFrameIndex. This required specifically looking for
the AssextZext + frame index pattern which was moderately
disgusting. The same could probably be accomplished
with a target specific node, but would still
require special handling of frame indexes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317671 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 08:52:31 +00:00
Serguei Katkov
600fc9c837 Revert "[CGP] Enable extending scope of optimizeMemoryInst"
Revert the patch r317665 causing buildbot failures.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317667 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 05:38:54 +00:00
Serguei Katkov
2c8a33ad12 [CGP] Enable extending scope of optimizeMemoryInst
This patch enables the folding of address computation in
memory instruction in case adress is represented by Phi node.

The inputs of Phi node might be different in base register.

Differential Revision: https://reviews.llvm.org/D36073


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317665 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 05:02:51 +00:00
Craig Topper
d550a31777 [X86] Add patterns to fold EVEX store with EVEX encoded vcvtps2ph instructions. Remove bad pattern that had vf432 vcvtps2ph storing 128-bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317662 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 04:00:31 +00:00
Craig Topper
c30df5f3d3 [X86] Allow legacy vcvtps2ph intrinsics to select EVEX encoded instructions. Rely on EVEX->VEX to convert back.
Missed store folding opportunities will be fixed in a subsequent commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317661 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 04:00:30 +00:00
Rafael Espindola
14c636043c Convert FileOutputBuffer::commit to Error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317656 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 01:50:29 +00:00
Dave Lee
aeaece745d Revert "Reapply: Allow yaml2obj to order implicit sections for ELF"
This reverts commit r317646.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317654 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 01:31:20 +00:00
Rafael Espindola
29fa40c962 Update unittest too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317651 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 01:10:05 +00:00
Rafael Espindola
0fa582d74a Convert FileOutputBuffer to Expected. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317649 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 01:05:44 +00:00
David Blaikie
48319238e4 Target/TargetInstrInfo.h -> CodeGen/TargetInstrInfo.h to match layering
This header includes CodeGen headers, and is not, itself, included by
any Target headers, so move it into CodeGen to match the layering of its
implementation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317647 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 01:01:31 +00:00
Dave Lee
9fd7184f64 Reapply: Allow yaml2obj to order implicit sections for ELF
Summary:
This change allows yaml input to control the order of implicitly added sections
(`.symtab`, `.strtab`, `.shstrtab`). The order is controlled by adding a
placeholder section of the given name to the Sections field.

This change is to support changes in D39582, where it is desirable to control
the location of the `.dynsym` section.

This reapplied version fixes:
  1. use of a function call within an assert
  2. failing lld test which has an unnamed section

Additionally, one more test to cover the unnamed section failure.

Reviewers: compnerd, jakehehrlich

Reviewed By: jakehehrlich

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D39749

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317646 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 00:58:50 +00:00
Matt Arsenault
a932c3f118 AMDGPU: Set correct sched model on v_mad_u64_u32
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317645 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 00:48:25 +00:00
Mitch Phillips
cee04762ca Revert rL317618
The implemented pass fails and is breaking a large number of unit tests.
Example:
http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu/builds/5777/steps/build-stage3-compiler/logs/stdio

This reverts commit rL317618

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317641 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 00:20:53 +00:00
Sriraman Tallam
ea30756f68 Attribute nonlazybind should not affect calls to functions with hidden visibility.
Differential Revision: https://reviews.llvm.org/D39625

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317639 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-08 00:01:05 +00:00
Paul Robinson
d37de6a865 Reapply r317609 with a simpler sed script, thanks to Justin Bogner!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317634 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07 23:17:43 +00:00
Dave Lee
7c6de050f8 Revert "Allow yaml2obj to order implicit sections for ELF"
Also, revert "Fix build bots after r317622"

This reverts commit r317622, r317626.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317630 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07 22:51:27 +00:00
Paul Robinson
aa34334e90 Revert r317609, test fails on one bot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317628 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07 22:39:12 +00:00
Dave Lee
1d494b9e82 Fix build bots after r317622
Example build failure: http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/14660

TIL that the warning flags for local builds are loose compared to what build
servers use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317626 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07 22:33:07 +00:00
Justin Lebar
d8660fa5dc [NVPTX] Implement __nvvm_atom_add_gen_d builtin.
Summary:
This just seems to have been an oversight.  We already supported the f64
atomic add with an explicit scope (e.g. "cta"), but not the scopeless
version.

Reviewers: tra

Subscribers: jholewinski, sanjoy, cfe-commits, llvm-commits, hiraditya

Differential Revision: https://reviews.llvm.org/D39638

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317623 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07 22:10:54 +00:00
Dave Lee
595a4486c1 Allow yaml2obj to order implicit sections for ELF
Summary:
This change allows yaml input to control the order of implicitly added sections
(`.symtab`, `.strtab`, `.shstrtab`). The order is controlled by adding a
placeholder section of the given name to the Sections field.

This change is to support changes in D39582, where it is desirable to control
the location of the `.dynsym` section.

Reviewers: compnerd, jakehehrlich

Reviewed By: jakehehrlich

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D39749

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317622 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07 22:05:24 +00:00
Dinar Temirbulatov
c7c5ad7774 [SLPVectorizer] Failure to beneficially vectorize 'copyable' elements in integer binary ops.
Patch tries to improve vectorization of the following code:

    void add1(int * __restrict dst, const int * __restrict src) {
      *dst++ = *src++;
      *dst++ = *src++ + 1;
      *dst++ = *src++ + 2;
      *dst++ = *src++ + 3;
    }
    Allows to vectorize even if the very first operation is not a binary add, but just a load.

    Fixed PR34619 and other issues related to previous commit.

    Reviewers: spatel, mzolotukhin, mkuper, hfinkel, RKSimon, filcab, ABataev

    Reviewed By: ABataev, RKSimon

    Subscribers: llvm-commits, RKSimon

    Differential Revision: https://reviews.llvm.org/D28907


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317618 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07 21:25:34 +00:00
Mitch Phillips
56fec39d44 Extend SpecialCaseList to allow users to blame matches on entries in the file.
Summary:
Extends SCL functionality to allow users to find the line number in the file the SCL is built from through SpecialCaseList::inSectionBlame(...).

Also removes the need to compile the SCL before use. As the matcher now contains a list of regexes to test against instead of a single regex, the regexes can be individually built on each insertion rather than one large compilation at the end of construction.

This change also fixes a bug where blank lines would cause the parser to become out-of-sync with the line number. An error on line `k` was being reported as being on line `k - num_blank_lines_before_k`.

Note: This change has a cyclical dependency on D39486. Both these changes must be submitted at the same time to avoid a build breakage.

Reviewers: vlad.tsyrklevich

Reviewed By: vlad.tsyrklevich

Subscribers: kcc, pcc, llvm-commits

Differential Revision: https://reviews.llvm.org/D39485

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317617 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07 21:16:46 +00:00
Craig Topper
c062c8dc61 [CodeGenPrepare] Fix typo in comment. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317614 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07 20:56:17 +00:00
Graham Yiu
5363e7a31e Use new vector insert half-word and byte instructions when we see insertelement on '8 x i16' and '16 x i8' types. Also extended existing lit testcase to cover these cases.
Differential Revision: https://reviews.llvm.org/D34630

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317613 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07 20:55:43 +00:00
Paul Robinson
2725af0410 Convert a dwarfdump test from checked-in binary to assembler source.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317612 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07 20:35:44 +00:00
Paul Robinson
a2fd1c7e77 [DWARFv5] Add new test for previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317609 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07 20:12:58 +00:00
Paul Robinson
e9d757c19e [DWARFv5] Support DW_FORM_strp in the .debug_line header.
Supporting this form in .debug_line.dwo will be done as a follow-up.

Differential Revision: https://reviews.llvm.org/D33155

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317607 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07 19:57:12 +00:00
Craig Topper
7e1904e9c8 Recommit r317510 "[InstCombine] Pull shifts through a select plus binop with constant"
The hexagon test should be fixed now.

Original commit message:

This pulls shifts through a select+binop with a constant where the select conditionally executes the binop. We already do this for just the binop, but not with the select.

This can allow us to get the select closer to other selects to enable removing one.

Differential Revision: https://reviews.llvm.org/D39222

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317600 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07 18:47:24 +00:00