Rafael Espindola [Mon, 3 Jun 2013 19:37:34 +0000 (19:37 +0000)]
Update RuntimeDyldELF::findOPDEntrySection the new relocation iterators.
This was missing from r182908. I didn't noticed it at the time because the MCJIT tests were
disabled when building with cmake on ppc64 (which I fixed in r183143).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183147
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 3 Jun 2013 19:17:21 +0000 (19:17 +0000)]
Enable mcjit tests on ppc64 when building with cmake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183143
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 3 Jun 2013 17:40:18 +0000 (17:40 +0000)]
R600/SI: Add support for work item and work group intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183138
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 3 Jun 2013 17:40:11 +0000 (17:40 +0000)]
R600/SI: Add a calling convention for compute shaders
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183137
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 3 Jun 2013 17:40:03 +0000 (17:40 +0000)]
R600/SI: Custom lower i64 sign_extend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183136
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 3 Jun 2013 17:39:58 +0000 (17:39 +0000)]
R600/SI: Adjust some instructions' out register class after ISel
This is necessary to avoid generating VGPR to SGPR copies in some
cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183135
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 3 Jun 2013 17:39:54 +0000 (17:39 +0000)]
R600/SI: Handle REG_SEQUENCE in fitsRegClass()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183134
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 3 Jun 2013 17:39:50 +0000 (17:39 +0000)]
R600/SI: Handle nodes with glue results correctly SITargetLowering::foldOperands()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183133
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 3 Jun 2013 17:39:46 +0000 (17:39 +0000)]
R600/SI: Fixup CopyToReg register class in PostprocessISelDAG()
The CopyToReg nodes will sometimes try to copy a value from a VGPR to an
SGPR. This kind of copy is not possible, so we need to detect
VGPR->SGPR copies and do something else. The current strategy is to
replace these copies with VGPR->VGPR copies and hope that all the users
of CopyToReg can accept VGPRs as arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183132
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 3 Jun 2013 17:39:43 +0000 (17:39 +0000)]
R600/SI: Add support for global loads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183131
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 3 Jun 2013 17:39:37 +0000 (17:39 +0000)]
R600/SI: Rework MUBUF store instructions
The lowering of stores is now mostly handled in the tablegen files. No
more BUFFER_STORE nodes I generated during legalization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183130
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Mon, 3 Jun 2013 15:56:12 +0000 (15:56 +0000)]
R600: 3 op instructions have no write bit but the result are store in PV
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183111
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Mon, 3 Jun 2013 15:44:42 +0000 (15:44 +0000)]
R600: CALL_FS consumes a stack size entry
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183108
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Mon, 3 Jun 2013 15:44:35 +0000 (15:44 +0000)]
R600: use capital letter for PV channel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183107
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Mon, 3 Jun 2013 15:44:16 +0000 (15:44 +0000)]
R600: Constraints input regs of interp_xy,_zw
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183106
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Mon, 3 Jun 2013 14:46:56 +0000 (14:46 +0000)]
[asan] ASan Linux MIPS32 support (llvm part), patch by Jyun-Yan Y
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183104
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Mon, 3 Jun 2013 14:42:40 +0000 (14:42 +0000)]
X86: sub_xmm registers are 128 bits wide.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183103
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 3 Jun 2013 14:12:39 +0000 (14:12 +0000)]
Correct handling invalid filename in llvm-symbolizer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183102
91177308-0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Mon, 3 Jun 2013 13:03:05 +0000 (13:03 +0000)]
Introduce needsCleanup() for APFloat and APInt.
This is needed in clang so one can check if the object needs the
destructor called after its memory was freed. This is useful when
creating many APInt/APFloat objects with placement new, where the
overhead of tracking the pointers for cleanup is significant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183100
91177308-0d34-0410-b5e6-
96231b3b80d8
Venkatraman Govindaraju [Mon, 3 Jun 2013 05:58:33 +0000 (05:58 +0000)]
Sparc: Add support for indirect branch and blockaddress in Sparc backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183094
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Mon, 3 Jun 2013 00:27:03 +0000 (00:27 +0000)]
[Object/COFF] Fix Windows .lib name handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183091
91177308-0d34-0410-b5e6-
96231b3b80d8
Venkatraman Govindaraju [Mon, 3 Jun 2013 00:21:54 +0000 (00:21 +0000)]
Sparc: When storing 0, use %g0 directly in the store instruction instead of
using two instructions (sethi and store).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183090
91177308-0d34-0410-b5e6-
96231b3b80d8
Venkatraman Govindaraju [Sun, 2 Jun 2013 21:48:17 +0000 (21:48 +0000)]
Sparc: Combine add/or/sethi instruction with restore if possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183088
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Sun, 2 Jun 2013 21:08:45 +0000 (21:08 +0000)]
[Object/COFF] Add dos_header, pe32{,plus}_header and data_directory.
Reviewers: Bigcheese
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D905
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183087
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sun, 2 Jun 2013 19:51:54 +0000 (19:51 +0000)]
Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183086
91177308-0d34-0410-b5e6-
96231b3b80d8
Venkatraman Govindaraju [Sun, 2 Jun 2013 02:24:27 +0000 (02:24 +0000)]
Sparc: Perform leaf procedure optimization by default
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183083
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 1 Jun 2013 22:29:41 +0000 (22:29 +0000)]
Try to avoid "integer literal too big" warnings from older GCCs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183081
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 1 Jun 2013 20:51:31 +0000 (20:51 +0000)]
When determining the new index for an insertelement, we may not assume that an
index greater than the size of the vector is invalid. The shuffle may be
shrinking the size of the vector. Fixes a crash!
Also drop the maximum recursion depth of the safety check for this
optimization to five.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183080
91177308-0d34-0410-b5e6-
96231b3b80d8
Venkatraman Govindaraju [Sat, 1 Jun 2013 20:42:48 +0000 (20:42 +0000)]
Sparc: Mark functions calling llvm.vastart and llvm.returnaddress intrinsics as non-leaf functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183079
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sat, 1 Jun 2013 19:43:23 +0000 (19:43 +0000)]
SimplifyCFG: Fix typo in comment for ComputeSpeculationCost
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183078
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 1 Jun 2013 17:51:14 +0000 (17:51 +0000)]
Move getRealLinkageName to a common place and remove all the duplicates of it.
Also simplify code a bit while there. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183076
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 1 Jun 2013 17:51:03 +0000 (17:51 +0000)]
Move object construction into [] so the temporary can be moved.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183075
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 1 Jun 2013 16:37:55 +0000 (16:37 +0000)]
DenseMap: Move the key into place when we use the move version of operator[].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183074
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 1 Jun 2013 11:26:39 +0000 (11:26 +0000)]
APInt: Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183073
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 1 Jun 2013 11:26:33 +0000 (11:26 +0000)]
APFloat: Use isDenormal instead of hand-rolled code to check for denormals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183072
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Sat, 1 Jun 2013 10:24:11 +0000 (10:24 +0000)]
Disable new legacy JIT test on ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183071
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Sat, 1 Jun 2013 10:23:46 +0000 (10:23 +0000)]
Revert r183069: "TMP: LEA64_32r fixing"
Very sorry, it was committed from the wrong branch by mistake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183070
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Sat, 1 Jun 2013 10:21:54 +0000 (10:21 +0000)]
TMP: LEA64_32r fixing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183069
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Sat, 1 Jun 2013 09:55:14 +0000 (09:55 +0000)]
X86: change MOV64ri64i32 into MOV32ri64
The MOV64ri64i32 instruction required hacky MCInst lowering because it
was allocated as setting a GR64, but the eventual instruction ("movl")
only set a GR32. This converts it into a so-called "MOV32ri64" which
still accepts a (appropriate) 64-bit immediate but defines a GR32.
This is then converted to the full GR64 by a SUBREG_TO_REG operation,
thus keeping everyone happy.
This fixes a typo in the opcode field of the original patch, which
should make the legact JIT work again (& adds test for that problem).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183068
91177308-0d34-0410-b5e6-
96231b3b80d8
Venkatraman Govindaraju [Sat, 1 Jun 2013 04:51:18 +0000 (04:51 +0000)]
[Sparc] Generate correct code for leaf functions with stack objects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183067
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sat, 1 Jun 2013 00:48:24 +0000 (00:48 +0000)]
Removed a comment above an include which is unnecessary and added a missing closing @} for a doxygen comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183065
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sat, 1 Jun 2013 00:44:29 +0000 (00:44 +0000)]
Added method comments for getZero,getInf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183064
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sat, 1 Jun 2013 00:44:05 +0000 (00:44 +0000)]
Updated APFloat's comments to fit the LLVM style guide.
Also added a few more method comments and performed some copy editing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183063
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 31 May 2013 23:45:26 +0000 (23:45 +0000)]
Make SubRegIndex size mandatory, following r183020.
This also makes TableGen able to compute sizes/offsets of synthesized
indices representing tuples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183061
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 31 May 2013 23:34:46 +0000 (23:34 +0000)]
Prevent loop-unroll from making assumptions about undefined behavior.
Fixes rdar:
14036816, PR16130.
There is an opportunity to compute precise trip counts for 'or'
expressions and multi-exit loops.
rdar:
14038809: Optimize trip count computation for multi-exit loops.
To do this we need to record the fact that ExitLimit assumes NSW. When
it does not we can safely assume that the loop trip count is the
minimum ExitLimt across all subexpressions and loop exits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183060
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 31 May 2013 23:30:45 +0000 (23:30 +0000)]
Temporarily Revert "X86: change MOV64ri64i32 into MOV32ri64" as it
seems to have caused PR16192 and other JIT related failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183059
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 31 May 2013 22:50:40 +0000 (22:50 +0000)]
Const-ify some printing and dumping code for DIEValues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183057
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 31 May 2013 22:34:56 +0000 (22:34 +0000)]
Add support for adding the contents of a StringRef to the MD5 hash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183054
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 31 May 2013 22:34:52 +0000 (22:34 +0000)]
Convert more unsigned char -> uint8_t.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183053
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 31 May 2013 22:34:48 +0000 (22:34 +0000)]
Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183052
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 31 May 2013 22:34:34 +0000 (22:34 +0000)]
Move "unsigned char" -> "uint8_t".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183051
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Fri, 31 May 2013 21:48:56 +0000 (21:48 +0000)]
LoopVectorize: Change API call to get the backedge taken count
Use ScalarEvolution's getBackedgeTakenCount API instead of getExitCount since
that is really what we want to know. Using the more specific getExitCount was
safe because we made sure that there is only one exiting block.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183047
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Fri, 31 May 2013 21:29:03 +0000 (21:29 +0000)]
Loop Strength Reduce: Scaling factor cost.
Account for the cost of scaling factor in Loop Strength Reduce when rating the
formulae. This uses a target hook.
The default implementation of the hook is: if the addressing mode is legal, the
scaling factor is free.
<rdar://problem/
13806271>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183045
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 31 May 2013 21:03:51 +0000 (21:03 +0000)]
Use just a ArrayRef<uint8_t> to store both hex string and binary data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183043
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 31 May 2013 20:38:27 +0000 (20:38 +0000)]
Rename COFFYaml.h to COFFYAML.h for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183042
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 31 May 2013 20:35:58 +0000 (20:35 +0000)]
Remove union to fix build in c++03.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183041
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 31 May 2013 20:26:44 +0000 (20:26 +0000)]
Don't allocate temporary string for section data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183040
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Fri, 31 May 2013 19:53:50 +0000 (19:53 +0000)]
LoopVectorize: PHIs with only outside users should prevent vectorization
We check that instructions in the loop don't have outside users (except if
they are reduction values). Unfortunately, we skipped this check for
if-convertable PHIs.
Fixes PR16184.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183035
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 31 May 2013 19:21:58 +0000 (19:21 +0000)]
NVPTX: Don't even create a regalloc if we're not going to use it.
Fixes a leak found by valgrind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183031
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Fri, 31 May 2013 18:43:34 +0000 (18:43 +0000)]
[APFloat] Added a unittest for APFloat::getZero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183028
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Fri, 31 May 2013 17:20:29 +0000 (17:20 +0000)]
Modify how the formulae are rated in Loop Strength Reduce.
Namely, check if the target allows to fold more that one register in the
addressing mode and if yes, adjust the cost accordingly.
Prior to this commit, reg1 + scale * reg2 accesses were artificially preferred
to reg1 + reg2 accesses. Indeed, the cost model wrongly assumed that reg1 + reg2
needs a temporary register for the computation, whereas it was correctly
estimated for reg1 + scale * reg2.
<rdar://problem/
13973908>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183021
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 31 May 2013 17:08:36 +0000 (17:08 +0000)]
Add a way to define the bit range covered by a SubRegIndex.
NOTE: If this broke your out-of-tree backend, in *RegisterInfo.td, change
the instances of SubRegIndex that have a comps template arg to use the
ComposedSubRegIndex class instead.
In TableGen land, this adds Size and Offset attributes to SubRegIndex,
and the ComposedSubRegIndex class, for which the Size and Offset are
computed by TableGen. This also adds an accessor in MCRegisterInfo, and
Size/Offsets for the X86 and ARM subreg indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183020
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 31 May 2013 16:42:41 +0000 (16:42 +0000)]
Unit test for SCEV fix r182989, PR16130.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183017
91177308-0d34-0410-b5e6-
96231b3b80d8
Kai Nacke [Fri, 31 May 2013 16:30:36 +0000 (16:30 +0000)]
Remove useless code from transitioning to new EH scheme
Removes all uses of the variable UsesNewEH. Simply return false in case that no
resume instructions were found.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183016
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 31 May 2013 15:58:45 +0000 (15:58 +0000)]
ARM: permit upper-case BE/LE on setend instruction
Patch by Amaury de la Vieuville.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183012
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 31 May 2013 15:55:51 +0000 (15:55 +0000)]
ARM: add fstmx and fldmx instructions for assembly
These instructions are deprecated oddities, but we still need to be able to
disassemble (and reassemble) them if and when they're encountered.
Patch by Amaury de la Vieuville.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183011
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 31 May 2013 14:27:15 +0000 (14:27 +0000)]
Simplify multiplications by vectors whose elements are powers of 2.
Patch by Andrea Di Biagio.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183005
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 31 May 2013 13:47:25 +0000 (13:47 +0000)]
ARM: fix VEXT encoding corner case
The disassembly of VEXT instructions was too lax in the bits checked. This
fixes the case where the instruction affects Q-registers but a misaligned lane
was specified (should be UNDEFINED).
Patch by Amaury de la Vieuville
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183003
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Fri, 31 May 2013 13:25:22 +0000 (13:25 +0000)]
[SystemZ] Don't use LOAD and STORE REVERSED for volatile accesses
Unlike most -- hopefully "all other", but I'm still checking -- memory
instructions we support, LOAD REVERSED and STORE REVERSED may access
the memory location several times. This means that they are not suitable
for volatile loads and stores.
This patch is a prerequisite for better atomic load and store support.
The same principle applies there: almost all memory instructions we
support are inherently atomic ("block concurrent"), but LOAD REVERSED
and STORE REVERSED are exceptions.
Other instructions continue to allow volatile operands. I will add
positive "allows volatile" tests at the same time as the "allows atomic
load or store" tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183002
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Fri, 31 May 2013 12:14:49 +0000 (12:14 +0000)]
[NVPTX] Re-enable support for virtual registers in the final output
Now that 3.3 is branched, we are re-enabling virtual registers to help
iron out bugs before the next release. Some of the post-RA passes do
not play well with virtual registers, so we disable them for now. The
needed functionality of the PrologEpilogInserter pass is copied to a
new backend-specific NVPTXPrologEpilog pass.
The test for this commit is not breaking the existing tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182998
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Fri, 31 May 2013 12:04:29 +0000 (12:04 +0000)]
[msan] Handle mixed track-origins and keep-going settings (llvm part).
Before this change, each module defined a weak_odr global __msan_track_origins
with a value of 1 if origin tracking is enabled, 0 if disabled. If there are
modules with different values, any of them may win. If 0 wins, and there is at
least one module with 1, the program will most likely crash.
With this change, __msan_track_origins is only emitted if origin tracking is
on. Then runtime library detects if there is at least one module with origin
tracking, and enables runtime support for it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182997
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 31 May 2013 09:57:13 +0000 (09:57 +0000)]
X86: change MOV64ri64i32 into MOV32ri64
The MOV64ri64i32 instruction required hacky MCInst lowering because it was
allocated as setting a GR64, but the eventual instruction ("movl") only set a
GR32. This converts it into a so-called "MOV32ri64" which still accepts a
(appropriate) 64-bit immediate but defines a GR32. This is then converted to
the full GR64 by a SUBREG_TO_REG operation, thus keeping everyone happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182991
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Fri, 31 May 2013 09:14:54 +0000 (09:14 +0000)]
Add links to the System z architecture manual and ABI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182990
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 31 May 2013 06:43:25 +0000 (06:43 +0000)]
Fix ScalarEvolution::ComputeExitLimitFromCond for 'or' conditions.
Fixes PR16130 - clang produces incorrect code with loop/expression at -O2.
This is a 2+ year old bug that's now holding up the release. It's a
case where we knowingly made aggressive assumptions about undefined
behavior. These assumptions are wrong when SCEV is computing a
subexpression that does not directly control the branch. With this
fix, we avoid making assumptions in those cases but still optimize the
common case. SCEV's trip count computation for exits controlled by
'or' expressions is now analagous to the trip count computation for
loops with multiple exits. I had already fixed the multiple exit case
to be conservative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182989
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 31 May 2013 03:25:44 +0000 (03:25 +0000)]
[mips] Big-endian code generation for atomic instructions.
Patch by Jyun-Yan You.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182984
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 31 May 2013 01:40:30 +0000 (01:40 +0000)]
Fix wrong comment. Null is not acceptable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182979
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 31 May 2013 00:59:42 +0000 (00:59 +0000)]
Reapply with r182909 with a fix to the calculation of the new indices for
insertelement instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182976
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Thu, 30 May 2013 23:46:47 +0000 (23:46 +0000)]
Remove debug print added in r182949.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182973
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 30 May 2013 20:37:52 +0000 (20:37 +0000)]
Revert r182937 and r182877.
r182877 broke MCJIT tests on ARM and r182937 was working around another failure
by r182877.
This should make the ARM bots green.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182960
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 30 May 2013 20:19:35 +0000 (20:19 +0000)]
Remove unused member.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182958
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 30 May 2013 18:59:11 +0000 (18:59 +0000)]
Fix a couple of typos and 80-col.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182954
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 30 May 2013 18:52:57 +0000 (18:52 +0000)]
Use the const_cast only where necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182950
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Thu, 30 May 2013 18:18:36 +0000 (18:18 +0000)]
MCObjectSymbolizer: Switch from IntervalMap to sorted vector, following r182625.
This removes the need for the missing SectionRef operator< workaround, and fixes
an IntervalMap assert about alignment on MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182949
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Thu, 30 May 2013 18:07:13 +0000 (18:07 +0000)]
Implement IEEE-754R 2008 nextUp/nextDown functions in the guise of the function APFloat::next(bool nextDown).
rdar://
13852078
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182945
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Redmond [Thu, 30 May 2013 17:24:32 +0000 (17:24 +0000)]
Fix warning and resulting formatting issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182939
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Redmond [Thu, 30 May 2013 17:22:46 +0000 (17:22 +0000)]
Revise llvm.vectorizer.width documentation
- clarify that vectorizer.width only applies if the vectorizer decides to
vectorize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182938
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 30 May 2013 16:29:28 +0000 (16:29 +0000)]
Don't use fast isel on this test.
This fixes the test on ARM. Looks like it was broken by r182877. Not
sure if this is a bug on fast isel on ARM, but this should help fix
the ARM bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182937
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 30 May 2013 15:39:35 +0000 (15:39 +0000)]
Force a triple so we don't get bitten by windows' different regalloc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182935
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 30 May 2013 15:22:28 +0000 (15:22 +0000)]
Force fragile test to the atom scheduler model.
The pattern the test originally checked for doesn't occur on other -mcpu
settings. On atom it's still there though slightly differently scheduled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182933
91177308-0d34-0410-b5e6-
96231b3b80d8
Ashok Thirumurthi [Thu, 30 May 2013 14:23:07 +0000 (14:23 +0000)]
Added a sub-project status update section to the release notes with details
on the LLDB 3.3 release.
Reviewed by: Greg Clayton and Bill Wendling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182931
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 30 May 2013 13:56:32 +0000 (13:56 +0000)]
X86: allow registers 8-15 in test
This test was failing on some hosts when an unexpected register was used for a
variable. This just extends the regexp to allow the new x86-64 registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182929
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 30 May 2013 13:19:42 +0000 (13:19 +0000)]
X86: use sub-register sequences for MOV*r0 operations
Instead of having a bunch of separate MOV8r0, MOV16r0, ... pseudo-instructions,
it's better to use a single MOV32r0 (which will expand to "xorl %reg, %reg")
and obtain other sizes with EXTRACT_SUBREG and SUBREG_TO_REG. The encoding is
smaller and partial register updates can sometimes be avoided.
Until recently, this sequence was a barrier to rematerialization though. That
should now be fixed so it's an appropriate time to make the change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182928
91177308-0d34-0410-b5e6-
96231b3b80d8
Sergey Matveev [Thu, 30 May 2013 12:37:52 +0000 (12:37 +0000)]
Fix incorrect parameter name in LIT docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182926
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 30 May 2013 12:30:50 +0000 (12:30 +0000)]
Fix rematerialization into physical registers.
r182872 introduced a bug in how the register-coalescer's rematerialization
handled defining a physical register. It relied on the output of the
coalescer's setRegisters method to determine whether the replacement
instruction needed an implicit-def. However, this value isn't necessarily the
same as the CopyMI's actual destination register which is what the rest of the
basic-block expects us to be defining.
The commit changes the rematerializer to use the actual register attached to
CopyMI in its decision.
This will be tested soon by an X86 patch which moves everything to using
MOV32r0 instead of other sizes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182925
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Thu, 30 May 2013 12:22:39 +0000 (12:22 +0000)]
[NVPTX] Fix case where a sext load of an i1 type may produce an
ld.u1 instead of an ld.u8.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182924
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 30 May 2013 10:43:18 +0000 (10:43 +0000)]
X86: change zext moves to use sub-register infrastructure.
32-bit writes on amd64 zero out the high bits of the corresponding 64-bit
register. LLVM makes use of this for zero-extension, but until now relied on
custom MCLowering and other code to fixup instructions. Now we have proper
handling of sub-registers, this can be done by creating SUBREG_TO_REG
instructions at selection-time.
Should be no change in functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182921
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Thu, 30 May 2013 09:45:42 +0000 (09:45 +0000)]
[SystemZ] Enable unaligned accesses
The code to distinguish between unaligned and aligned addresses was
already there, so this is mostly just a switch-on-and-test process.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182920
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 30 May 2013 09:40:17 +0000 (09:40 +0000)]
Revert r182909.
PR/16177
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182919
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Thu, 30 May 2013 07:01:43 +0000 (07:01 +0000)]
Fix warning on varialbe unused in opt builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182914
91177308-0d34-0410-b5e6-
96231b3b80d8
Galina Kistanova [Thu, 30 May 2013 04:56:28 +0000 (04:56 +0000)]
Fixed bug when tests in executable partially used absolute paths.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182910
91177308-0d34-0410-b5e6-
96231b3b80d8