21192 Commits

Author SHA1 Message Date
Matthias Braun
ae5480dda7 MIRPrinter: Avoid assert() when printing empty INLINEASM strings.
CodeGen uses MO_ExternalSymbol to represent the inline assembly strings.
Empty strings for symbol names appear to be invalid. For now just
special case the output code to avoid hitting an `assert()` in
`printLLVMNameWithoutPrefix()`.

This fixes https://llvm.org/PR33317

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304815 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-06 19:00:58 +00:00
Petar Jovanovic
55caeda9d7 [mips] Add madd4 subtarget feature
Addition of a feature and a predicate used to control generation of madd.fmt
and similar instructions.

Patch by Stefan Maksimovic.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304801 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-06 15:33:01 +00:00
Simon Pilgrim
19ff9cf62b [X86][AVX1] Split 256-bit vector non-temporal FastISel loads to keep it non-temporal (PR32744)
Extension to D33728

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304798 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-06 14:18:39 +00:00
Tom Stellard
5d24d88bc7 AMDGPU/GlobalISel: Mark 32-bit G_ICMP as legal
Reviewers: arsenm

Reviewed By: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, igorb, dstuttard, tpr, t-tye, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304797 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-06 14:16:50 +00:00
Vivek Pandya
de22782d75 [Improve CodeGen Testing] This patch renables MIRPrinter print fields which have value equal to its default.
If -simplify-mir option is passed then MIRPrinter will not print such fields.
This change also required some lit test cases in CodeGen directory to be changed.

Reviewed By: MatzeB

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304779 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-06 08:16:19 +00:00
Chandler Carruth
c1a89c1b5c [x86] Stop this test from dirtying the source tree when run.
The output isn't used anyways.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304766 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-06 03:24:22 +00:00
Chandler Carruth
446c2e7b47 [x86] Add the test for folding stack spills into pextrw.
This is a negative test as pextrw doesn't write to all 32-bits of the
spilled GPR. This fold ended up happening when D32684 was landed and
covers the regression that motivated reverting it in r304762.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304763 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-06 02:16:01 +00:00
Chandler Carruth
565cfe059c [x86] Revert the X86FoldTablesEmitter due to more miscompiles.
In testing, we've found yet another miscompile caused by the new tables.
And this one is even less clear how to fix (we could teach it to fold
a 16-bit load instead of the 32-bit load it wants, or block folding
entirely).

Also, the approach to excluding instructions seems increasingly to not
scale well.

I have left a more detailed analysis on the review log for the original
patch (https://reviews.llvm.org/D32684) along with suggested path
forward. I will land an additional test case that I wrote which covers
the code that was miscompiling (folding into the output of `pextrw`) in
a subsequent commit to keep this a pure revert.

For each commit reverted here, I've restricted the revert to the
non-test code touching the x86 fold table emission until the last commit
where I did revert the test updates. This means the *new* test cases
added for `insertps` and `xchg` remain untouched (and continue to pass).

Reverted commits:
r304540: [X86] Don't fold into memory operands into insertps in the ...
r304347: [TableGen] Adapt more places to getValueAsString now ...
r304163: [X86] Don't fold away the memory operand of an xchg.
r304123: Don't capture a temporary std::string in a StringRef.
r304122: Resubmit "[X86] Adding new LLVM TableGen backend that ..."

Original commit was in r304088, and after a string of fixes was reverted
previously in r304121 to fix build bots, and then re-landed in r304122.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304762 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-06 02:15:31 +00:00
Matthias Braun
2144c5262f CodeGen: Refactor MIR parsing
When parsing .mir files immediately construct the MachineFunctions and
put them into MachineModuleInfo.

This allows us to get rid of the delayed construction (and delayed error
reporting) through the MachineFunctionInitialzier interface.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304758 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-06 00:44:35 +00:00
Matthias Braun
516023ae81 CodeGen/LLVMTargetMachine: Refactor ISel pass construction; NFCI
- Move ISel (and pre-isel) pass construction into TargetPassConfig
- Extract AsmPrinter construction into a helper function

Putting the ISel code into TargetPassConfig seems a lot more natural and
both changes together make make it easier to build custom pipelines
involving .mir in an upcoming commit. This moves MachineModuleInfo to an
earlier place in the pass pipeline which shouldn't have any effect.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304754 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-06 00:26:13 +00:00
Sanjay Patel
2c200794df [x86] fix over-specific triple; NFC
There's nothing darwin-specific in these tests, and using that 
setting causes extra phantom diffs when the auto-generated check 
lines are regenerated today.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304753 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-06 00:18:11 +00:00
Quentin Colombet
de1ece9ed1 [InlineSpiller] Don't spill fully undef values
Althought it is not wrong to spill undef values, it is useless and harms
both code size and runtime. Before spilling a value, check that its
content actually matters.

http://www.llvm.org/PR33311

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304752 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-05 23:51:27 +00:00
Matt Arsenault
323e6e9ede RenameIndependentSubregs: Fix handling of undef tied operands
If a tied source operand was undef, it would be replaced but not
update the other tied operand, which would end up using different
virtual registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304747 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-05 22:58:57 +00:00
Volkan Keles
5191e5027c [GlobalISel] IRTranslator: Add MachineMemOperand to target memory intrinsics
Reviewers: qcolombet, ab, t.p.northover, aditya_nandakumar, dsanders

Reviewed By: qcolombet

Subscribers: rovka, kristof.beyls, javed.absar, igorb, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304743 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-05 22:17:17 +00:00
Davide Italiano
cc4a80a566 [SelectionDAG] Update the dominator after splitting critical edges.
Running `llc -verify-dom-info` on the attached testcase results in a
crash in the verifier, due to a stale dominator tree.

i.e.

  DominatorTree is not up to date!
  Computed:
  =============================--------------------------------
  Inorder Dominator Tree:
    [1] %safe_mod_func_uint8_t_u_u.exit.i.i.i {0,7}
      [2] %lor.lhs.false.i61.i.i.i {1,2}
      [2] %safe_mod_func_int8_t_s_s.exit.i.i.i {3,6}
        [3] %safe_div_func_int64_t_s_s.exit66.i.i.i {4,5}

  Actual:
  =============================--------------------------------
  Inorder Dominator Tree:
    [1] %safe_mod_func_uint8_t_u_u.exit.i.i.i {0,9}
      [2] %lor.lhs.false.i61.i.i.i {1,2}
      [2] %safe_mod_func_int8_t_s_s.exit.i.i.i {3,8}
        [3] %safe_div_func_int64_t_s_s.exit66.i.i.i {4,5}
        [3] %safe_mod_func_int8_t_s_s.exit.i.i.i.lor.lhs.false.i61.i.i.i_crit_edge {6,7}

This is because in `SelectionDAGIsel` we split critical edges without
updating the corresponding dominator for the function (and we claim
in `MachineFunctionPass::getAnalysisUsage()` that the domtree is preserved).

We could either stop preserving the domtree in `getAnalysisUsage`
or tell `splitCriticalEdge()` to update it.
As the second option is easy to implement, that's the one I chose.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304742 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-05 22:16:41 +00:00
Simon Pilgrim
acb36e23c5 [X86][SSE41] Non-temporal loads shouldn't be folded if it can be avoided (PR32743)
Missed SSE41 non-temporal load case in previous commit

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304722 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-05 16:45:32 +00:00
Simon Pilgrim
0932adfd4e [X86][AVX1] Split 256-bit vector non-temporal loads to keep it non-temporal (PR32744)
Differential Revision: https://reviews.llvm.org/D33728

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304718 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-05 16:02:01 +00:00
Simon Pilgrim
1d0c245bc6 [X86][SSE] Non-temporal loads shouldn't be folded if it can be avoided (PR32743)
Differential Revision: https://reviews.llvm.org/D33728

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304717 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-05 15:43:03 +00:00
Diana Picus
593352196d [ARM] GlobalISel: Constrain callee register on indirect calls
When lowering calls, we generate instructions with machine opcodes
rather than generic ones. Therefore, we need to constrain the register
classes of the operands.

Also enable the machine verifier on the arm-irtranslator.ll test, since
that would've caught this issue.

Fixes (part of) PR32146.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304712 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-05 12:54:53 +00:00
Javed Absar
13aa077a23 Add support for #pragma clang section
This patch provides a means to specify section-names for global variables,
functions and static variables, using #pragma directives.
This feature is only defined to work sensibly for ELF targets.
One can specify section names as:
#pragma clang section bss="myBSS" data="myData" rodata="myRodata" text="myText"
One can "unspecify" a section name with empty string e.g.
#pragma clang section bss="" data="" text="" rodata=""

Reviewers: Roger Ferrer, Jonathan Roelofs, Reid Kleckner
Differential Revision: https://reviews.llvm.org/D33413



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304704 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-05 10:09:13 +00:00
Stanislav Mekhanoshin
ca0adcb320 [AMDGPU] Fix SIFoldOperands crash with clamp
Fixes bug #33302. Pass did not account that Src1 of max instruction
can be an immediate.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304696 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-05 01:03:04 +00:00
Simon Pilgrim
0261597a5e [X86][SSE] Change BUILD_VECTOR interleaving ordering to improve coalescing/combine opportunities
We currently generate BUILD_VECTOR as a tree of UNPCKL shuffles of the same type:

e.g. for v4f32:

Step 1: unpcklps 0, 2 ==> X: <?, ?, 2, 0>
      : unpcklps 1, 3 ==> Y: <?, ?, 3, 1>
Step 2: unpcklps X, Y ==>    <3, 2, 1, 0>

The issue is because we are not placing sequential vector elements together early enough, we fail to recognise many combinable patterns - consecutive scalar loads, extractions etc.

Instead, this patch unpacks progressively larger sequential vector elements together:

e.g. for v4f32:

Step 1: unpcklps 0, 2 ==> X: <?, ?, 1, 0>
      : unpcklps 1, 3 ==> Y: <?, ?, 3, 2>
Step 2: unpcklpd X, Y ==>    <3, 2, 1, 0>

This does mean that we are creating UNPCKL shuffle of different value types, but the relevant combines that benefit from this are quite capable of handling the additional BITCASTs that are now included in the shuffle tree.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304688 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-04 20:12:04 +00:00
Igor Breger
4d9818f38f [GlobalISel][X86] merge irtranslator-call test files. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304683 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-04 12:41:10 +00:00
Stanislav Mekhanoshin
110a2bc818 [AMDGPU] Untangle SDWA pass from SIShrinkInstructions
Remove dependency of SDWA pass on SIShrinkInstructions.
The goal is to move SDWA even higher in the stack to avoid second run
of MachineLICM, MachineCSE and SIFoldOperands.

Also added handling to preserve original src modifiers.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304665 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-03 17:39:47 +00:00
Amaury Sechet
ec193781b1 Regenerate expectations for trunc-to-bool.ll . NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304660 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-03 11:35:40 +00:00
Simon Pilgrim
9c32ef6fdb [X86][SSE] Add SCALAR_TO_VECTOR(PEXTRW/PEXTRB) support to faux shuffle combining
Generalized existing SCALAR_TO_VECTOR(EXTRACT_VECTOR_ELT) code to support AssertZext + PEXTRW/PEXTRB cases as well. 

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304659 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-03 11:12:57 +00:00
Tom Stellard
c9a1489af2 AMDGPU/GlobalISel: Mark 1-bit integer constants as legal
Summary:
These are mostly legal, but will probably need special lowering for some
cases.

Reviewers: arsenm

Reviewed By: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, igorb, dstuttard, tpr, llvm-commits, t-tye

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304628 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-03 01:13:33 +00:00
Stanislav Mekhanoshin
ced381c038 [AMDGPU] Preserve operand order in SIFoldOperands
SIFoldOperands can commute operands even if no folding was done.
This change is to preserve IR is no folding was done.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304625 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-03 00:41:52 +00:00
Quentin Colombet
41c139a7a0 [SystemZ] Simplify test case. NFC
Remove useless successors information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304615 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02 23:40:58 +00:00
Sanjay Patel
d3d2aec57b [x86] fix over-specific triple; NFC
There's nothing darwin-specific in these tests, and using
that setting causes extra phantom diffs when the auto-generated 
check lines are regenerated today.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304614 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02 23:40:46 +00:00
Philip Reames
190b00400d Canonicalize a test via utils/update_test_checks.py
Turns out I might not have further changes to make here, but with the way I'd written the tests, even I couldn't tell that.  :(



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304613 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02 23:27:36 +00:00
Sanjay Patel
b2d54d6280 [x86] add tests for unsigned vector compares with known signbits; NFC (PR33276)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304612 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02 23:24:28 +00:00
Matthias Braun
3310b59ffc RegisterScavenging: Add ScavengerTest pass
This pass allows to run the register scavenging independently of
PrologEpilogInserter to allow targeted testing.

Also adds some basic register scavenging tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304606 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02 23:01:42 +00:00
Quentin Colombet
1067c966a6 [RABasic] Properly update the LiveRegMatrix when LR splitting occur
Prior to this patch we used to not touch the LiveRegMatrix while doing
live-range splitting. In other words, when live-range splitting was
occurring, the LiveRegMatrix was not reflecting the changes.
This is generally fine because it means the query to the LiveRegMatrix
will be conservately correct. However, when decisions are taken based on
what is going to happen on the interferences (e.g., when we spill a
register and know that it is going to be available for another one), we
might hit an assertion that the color used for the assignment is still
in use.

This patch makes sure the changes on the live-ranges are properly
reflected in the LiveRegMatrix, so the assertions don't break.
An alternative could have been to remove the assertion, but it would
make the invariants of the code and the general reasoning more
complicated in my opnion.

http://llvm.org/PR33057

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304603 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02 22:46:31 +00:00
Quentin Colombet
9f43f266be [RABasic] Properly initialize the pass
Use the initializeXXX method to initialize the RABasic pass in the
pipeline. This enables us to take advantage of the .mir infrastructure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304602 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02 22:46:26 +00:00
Ahmed Bougacha
3f86a859d8 [X86] Correctly broadcast NaN-like integers as float on AVX.
Since r288804, we try to lower build_vectors on AVX using broadcasts of
float/double.  However, when we broadcast integer values that happen to
have a NaN float bitpattern, we lose the NaN payload, thereby changing
the integer value being broadcast.

This is caused by ConstantFP::get, to which we pass the splat i32 as
a float (by bitcasting it using bitsToFloat).  ConstantFP::get takes
a double parameter, so we end up lossily converting a single-precision
NaN to double-precision.

Instead, avoid any kinds of conversions by directly building an APFloat
from the splatted APInt.

Note that this also fixes another piece of code (broadcast of
subvectors), that currently isn't susceptible to the same problem.

Also note that we could really just use APInt and ConstantInt
throughout: the constant pool type doesn't matter much.  Still, for
consistency, use the appropriate type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304590 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02 20:02:59 +00:00
Amaury Sechet
43a958c91e Regenerate expectation for wide-fma-contraction.ll . NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304586 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02 19:15:04 +00:00
Konstantin Zhuravlyov
e0fcf72467 AMDGPU: Make auto waitcnt before barrier a feature
Differential Revision: https://reviews.llvm.org/D33793


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304571 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02 17:40:26 +00:00
Philip Reames
bfffaf778f Add placeholder for more extensive verification of psuedo ops
This initial patch doesn't actually do much useful. It's just to show where the new code goes. Once this is in, I'll extend the verification logic to check more useful properties.

For those curious, the more complicated version of this patch already found one very suspicious thing.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304564 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02 16:36:37 +00:00
Amaury Sechet
ec35ada3f4 Update select.ll expected results. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304557 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02 16:07:43 +00:00
Alexander Timofeev
dfdb788875 AMDGPUAnnotateUniformValue should always treat volatile loads as divergent
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304554 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02 15:25:52 +00:00
Mark Searles
48e0515b4f [AMDGPU] Turn on the new waitcnt insertion pass. Adjust tests.
-enable-si-insert-waitcnts=1 becomes the default
-enable-si-insert-waitcnts=0 to use old pass

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304551 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02 14:19:25 +00:00
Zoran Jovanovic
9c2941a24c [mips][microMIPS] Extending size reduction pass with LBU16, LHU16, SB16 and SH16
Author: milena.vujosevic.janicic
Reviewers: sdardis
The patch extends size reduction pass for MicroMIPS.
The following instructions are examined and transformed, if possible:
LBU instruction is transformed into 16-bit instruction LBU16
LHU instruction is transformed into 16-bit instruction LHU16
SB instruction is transformed into 16-bit instruction SB16
SH instruction is transformed into 16-bit instruction SH16
Differential Revision: https://reviews.llvm.org/D33091


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304550 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02 14:14:21 +00:00
Krzysztof Parzyszek
c4071bcc5b [Hexagon] Return 0 from getDotNewPredOp when .new opcode does not exist
This allows using this function to test if an instruction can be converted
to a .new form.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304549 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02 14:07:06 +00:00
Amaury Sechet
f4b4c0031c Regenerate sse3.ll test results. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304548 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02 14:02:49 +00:00
Amaury Sechet
38e075d56e Regenerate and-sink.ll test results. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304547 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02 14:02:46 +00:00
Amaury Sechet
397f7b2eea Regenerate shrink-compare.ll test results. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304546 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02 14:02:43 +00:00
Benjamin Kramer
f4cc8004bc [X86] Don't fold into memory operands into insertps in the generated folding tables.
insertps behaves differently, the register form selects from an input
register based on the immediate operand while the memory form just loads
the given address. We have custom code to change the immediate in cases
where that's legal, so completely remove insertps from the generated
tables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304540 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02 10:50:22 +00:00
John Brawn
0f1cadd920 [GlobalMerge] Don't merge globals that may be preempted
When a global may be preempted it needs to be accessed directly, instead of
indirectly through a MergedGlobals symbol, for the preemption to work.

This fixes PR33136.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304537 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02 10:24:14 +00:00
Diana Picus
899f9e9ab6 [ARM] GlobalISel: Support struct params/returns
Very very similar to the support for arrays. As with arrays, we don't
support returning large structs that wouldn't fit in R0-R3. Most
front-ends would likely use sret arguments for that anyway.

The only significant difference is that when splitting a struct, we need
to make sure we set the correct original alignment on each member,
otherwise it may get split incorrectly between stack and registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304536 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-02 10:16:48 +00:00