Jakob Stoklund Olesen [Tue, 29 Mar 2011 03:12:02 +0000 (03:12 +0000)]
Properly enable rematerialization when spilling after live range splitting.
The instruction to be rematerialized may not be the one defining the register
that is being spilled. The traceSiblingValue() function sees through sibling
copies to find the remat candidate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128449
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 29 Mar 2011 02:30:34 +0000 (02:30 +0000)]
C-API: Include DataTypes.h instead of stdint.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128446
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 29 Mar 2011 02:18:54 +0000 (02:18 +0000)]
Reduce test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128445
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 29 Mar 2011 01:56:09 +0000 (01:56 +0000)]
Optimizing (zext A + zext B) * C, to (VMULL A, C) + (VMULL B, C) during
isel lowering to fold the zero-extend's and take advantage of no-stall
back to back vmul + vmla:
vmull q0, d4, d6
vmlal q0, d5, d6
is faster than
vaddl q0, d4, d5
vmovl q1, d6
vmul q0, q0, q1
This allows us to vmull + vmlal for:
f = vmull_u8( vget_high_u8(s), c);
f = vmlal_u8(f, vget_low_u8(s), c);
rdar://
9197392
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128444
91177308-0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Tue, 29 Mar 2011 00:30:01 +0000 (00:30 +0000)]
Fix the MSVC build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128441
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 29 Mar 2011 00:01:39 +0000 (00:01 +0000)]
Expoert c interface for disassembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128440
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 28 Mar 2011 23:02:18 +0000 (23:02 +0000)]
In some cases, the "fail BB dominator" may be null after the BB was split (and
becomes reachable when before it wasn't). Check to make sure that it's not null
before trying to use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128434
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 28 Mar 2011 22:49:19 +0000 (22:49 +0000)]
Integrated-As: Add support for setting the AllowTemporaryLabels flag via
integrated-as.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128431
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 28 Mar 2011 22:49:15 +0000 (22:49 +0000)]
MC: Add support for disabling "temporary label" behavior. Useful for debugging
on Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128430
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 28 Mar 2011 20:43:53 +0000 (20:43 +0000)]
Unbreak CMake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128426
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 28 Mar 2011 20:28:30 +0000 (20:28 +0000)]
Remove scripts used by TEST=dbg from here. They now live inside llvm test suite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128425
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Mon, 28 Mar 2011 18:41:58 +0000 (18:41 +0000)]
Fix ARM disassembly for PLD/PLDW/PLI which suffers from code rot and add some test cases.
Add comments to ThumbDisassemblerCore.h for recent change made for t2PLD disassembly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128417
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Mon, 28 Mar 2011 18:25:07 +0000 (18:25 +0000)]
Again adding a C API to the disassembler for use by such tools as Darwin's
otool(1), this time with the needed fix for case sensitive file systems :) .
This is a work in progress as the interface for producing symbolic operands is
not done. But a hacked prototype using information from the object file's
relocation entiries and replacing immediate operands with MCExpr's has been
shown to work with no changes to the instrucion printer. These APIs will be
moved into a dynamic library at some point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128415
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Mon, 28 Mar 2011 17:48:26 +0000 (17:48 +0000)]
Remove tabs I accidentally added.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128413
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Mon, 28 Mar 2011 13:03:10 +0000 (13:03 +0000)]
Make more use of PHINode::getNumIncomingValues().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128406
91177308-0d34-0410-b5e6-
96231b3b80d8
Che-Liang Chiou [Mon, 28 Mar 2011 10:23:13 +0000 (10:23 +0000)]
ptx: clean up branch code a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128405
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 28 Mar 2011 06:27:12 +0000 (06:27 +0000)]
docs/GettingStarted.html: [PR8850] Add a note for x86_64-w64-mingw32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128404
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 28 Mar 2011 06:27:06 +0000 (06:27 +0000)]
docs/GettingStarted.html: Add blurb "--enable-shared" on cygming.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128403
91177308-0d34-0410-b5e6-
96231b3b80d8
Frits van Bommel [Sun, 27 Mar 2011 23:32:31 +0000 (23:32 +0000)]
Add some debug output when -instcombine uses RAUW. This can make debug output for those cases much clearer since without this it only showed that the original instruction was removed, not what it was replaced with.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128399
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 27 Mar 2011 22:49:23 +0000 (22:49 +0000)]
Amend debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128398
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 27 Mar 2011 22:49:21 +0000 (22:49 +0000)]
Drop interference reassignment in favor of eviction.
The reassignment phase was able to move interference with a higher spill weight,
but it didn't happen very often and it was fairly expensive.
The existing interference eviction picks up the slack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128397
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 27 Mar 2011 19:51:23 +0000 (19:51 +0000)]
Teach the transformation that moves binary operators around selects to preserve
the subclass optional data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128388
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 27 Mar 2011 15:04:38 +0000 (15:04 +0000)]
Use APInt's umul_ov instead of rolling our own overflow detection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128380
91177308-0d34-0410-b5e6-
96231b3b80d8
Frits van Bommel [Sun, 27 Mar 2011 14:26:13 +0000 (14:26 +0000)]
Constant folding support for calls to umul.with.overflow(), basically identical to the smul.with.overflow() code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128379
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 27 Mar 2011 13:52:32 +0000 (13:52 +0000)]
Partially revert commit 127155: I think it is much more convenient
to have structured log files rather than one big file produced by
piping output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128378
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 27 Mar 2011 07:30:57 +0000 (07:30 +0000)]
Add a small missed optimization: turn X == C ? X : Y into X == C ? C : Y. This
removes one use of X which helps it pass the many hasOneUse() checks.
In my analysis, this turns up very often where X = A >>exact B and that can't be
simplified unless X has one use (except by increasing the lifetime of A which is
generally a performance loss).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128373
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 27 Mar 2011 01:44:40 +0000 (01:44 +0000)]
Fix whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128370
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 26 Mar 2011 22:16:41 +0000 (22:16 +0000)]
Use individual register classes when spilling snippets.
The main register class may have been inflated by live range splitting, so that
register class is not necessarily valid for the snippet instructions.
Use the original register class for the stack slot interval.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128351
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 26 Mar 2011 16:35:10 +0000 (16:35 +0000)]
Turn SelectionDAGBuilder::GetRegistersForValue into a local function.
It couldn't be used outside of the file because SDISelAsmOperandInfo
is local to SelectionDAGBuilder.cpp. Making it a static function avoids
a weird linkage dance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128342
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 26 Mar 2011 12:38:19 +0000 (12:38 +0000)]
Make helper static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128338
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 26 Mar 2011 09:32:07 +0000 (09:32 +0000)]
Simplification noticed by Frits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128333
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 26 Mar 2011 08:02:59 +0000 (08:02 +0000)]
Rework the logic that determines if a store completely overlaps an ealier store.
There are two ways that a later store can comletely overlap a previous store:
1. They both start at the same offset, but the earlier store's size is <= the
later's size, or
2. The earlier store's offset is > the later's offset, but it's offset + size
doesn't extend past the later's offset + size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128332
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Sat, 26 Mar 2011 04:58:50 +0000 (04:58 +0000)]
Fix a typo and add a test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128331
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 26 Mar 2011 03:40:01 +0000 (03:40 +0000)]
Extend Clang's TableGen emitter for attributes to support bool arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128330
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 26 Mar 2011 02:19:36 +0000 (02:19 +0000)]
Collect and coalesce DBG_VALUE instructions before emitting the function.
Correctly terminate the range of register DBG_VALUEs when the register is
clobbered or when the basic block ends.
The code is now ready to deal with variables that are sometimes in a register
and sometimes on the stack. We just need to teach emitDebugLoc to say 'stack
slot'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128327
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Sat, 26 Mar 2011 01:32:48 +0000 (01:32 +0000)]
Fixed the t2PLD and friends disassembly and add two test cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128322
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 26 Mar 2011 01:21:03 +0000 (01:21 +0000)]
Fix the bfi handling for or (and a mask) (and b mask). We need the two
masks to match inversely for the code as is to work. For the example given
we actually want:
bfi r0, r2, #1, #1
not #0, however, given the way the pattern is written it's not possible
at the moment.
Fixes rdar://
9177502
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128320
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 26 Mar 2011 01:20:37 +0000 (01:20 +0000)]
PR9561: A store with a negative offset (via GEP) could erroniously say that it
completely overlaps a previous store, thus mistakenly deleting that store. Check
for this condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128319
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Sat, 26 Mar 2011 00:23:05 +0000 (00:23 +0000)]
Remove the files for r128308 as it is causing a buildbot failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128309
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Sat, 26 Mar 2011 00:06:33 +0000 (00:06 +0000)]
Adding a C API to the disassembler for use by such tools as Darwin's otool(1).
This is a work in progress as the interface for producing symbolic operands is
not done. But a hacked prototype using information from the object file's
relocation entiries and replacing immediate operands with MCExpr's has been
shown to work with no changes to the instrucion printer. These APIs will be
moved into a dynamic library at some point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128308
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Fri, 25 Mar 2011 23:02:58 +0000 (23:02 +0000)]
Add test for A8.6.246 UMULL to both arm-tests.txt amd thumb-tests.txt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128306
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Fri, 25 Mar 2011 22:43:28 +0000 (22:43 +0000)]
Add two test cases t2SMLABT and t2SMMULR for DisassembleThumb2Mul().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128305
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Fri, 25 Mar 2011 22:19:07 +0000 (22:19 +0000)]
Fix DisassembleThumb2DPReg()'s handling of RegClass. Cannot hardcode GPRRegClassID.
Also add some test cases.
rdar://problem/
9189829
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128304
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Fri, 25 Mar 2011 19:35:37 +0000 (19:35 +0000)]
DisassembleThumb2LdSt() did not handle t2LDRs correctly with respect to RegClass. Add two test cases.
rdar://problem/
9182892
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128299
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Fri, 25 Mar 2011 18:40:21 +0000 (18:40 +0000)]
A8.6.226 TBB, TBH:
Add two test cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128295
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Fri, 25 Mar 2011 18:29:49 +0000 (18:29 +0000)]
Modify DisassembleThumb2LdStEx() to be more robust/correct in light of recent change to
t2LDREX/t2STREX instructions. Add two test cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128293
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 25 Mar 2011 17:47:17 +0000 (17:47 +0000)]
MC: Improve some diagnostics on uses of '.' pseudo-symbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128289
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 25 Mar 2011 17:47:14 +0000 (17:47 +0000)]
Tidyness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128288
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 25 Mar 2011 17:32:40 +0000 (17:32 +0000)]
Add a note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128286
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Fri, 25 Mar 2011 17:31:16 +0000 (17:31 +0000)]
Instruction formats of SWP/SWPB were changed from LdStExFrm to MiscFrm. Modify the disassembler to handle that.
rdar://problem/
9184053
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128285
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 25 Mar 2011 17:20:59 +0000 (17:20 +0000)]
Emit less labels for debug info and stop emitting .loc directives for DBG_VALUEs.
The .dot directives don't need labels, that is a leftover from when we created
line number info manually.
Instructions following a DBG_VALUE can share its label since the DBG_VALUE
doesn't produce any code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128284
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Fri, 25 Mar 2011 17:03:12 +0000 (17:03 +0000)]
Also need to handle invalid imod values for CPS2p.
rdar://problem/
9186136
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128283
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 25 Mar 2011 07:17:44 +0000 (07:17 +0000)]
Useful script for finding regressions in the nightly testsuite.
I think it was written by Pawel Worach.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128268
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 25 Mar 2011 06:43:59 +0000 (06:43 +0000)]
Remove redundant compression option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128267
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 25 Mar 2011 06:40:55 +0000 (06:40 +0000)]
Fix for -pre-RA-sched=source.
Yet another case of unchecked NULL node (for physreg copy).
May fix PR9509.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128266
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 25 Mar 2011 06:05:50 +0000 (06:05 +0000)]
No functionality change, just adjust some whitespace for coding style compliance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128257
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 25 Mar 2011 06:04:26 +0000 (06:04 +0000)]
No functionality change. Fix up some whitespace and switch out "" for '' when
printing a single character.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128256
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 25 Mar 2011 01:48:18 +0000 (01:48 +0000)]
Ignore special ARM allocation hints for unexpected register classes.
Add an assertion to linear scan to prevent it from allocating registers outside
the register class.
<rdar://problem/
9183021>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128254
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Fri, 25 Mar 2011 01:09:48 +0000 (01:09 +0000)]
Modify the wrong logic in the assert of DisassembleThumb2LdStDual() (the register classes were changed),
modify the comment to be up-to-date, and add a test case for A8.6.66 LDRD (immediate) Encoding T1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128252
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Fri, 25 Mar 2011 00:17:42 +0000 (00:17 +0000)]
delegate the disassembly of t2ADR to the more generic t2ADDri12/t2SUBri12 instructions, and add a test case for that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128249
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Thu, 24 Mar 2011 23:42:31 +0000 (23:42 +0000)]
The opcode names ("tLDM", "tLDM_UPD") used for conflict resolution have been stale since
the change to ("tLDMIA", "tLDMIA_UPD"). Update the conflict resolution code and add
test cases for that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128247
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Thu, 24 Mar 2011 23:21:14 +0000 (23:21 +0000)]
The ARM disassembler was confused with the 16-bit tSTMIA instruction.
According to A8.6.189 STM/STMIA/STMEA (Encoding T1), there's only tSTMIA_UPD available.
Ignore tSTMIA for the decoder emitter and add a test case for that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128246
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 24 Mar 2011 22:39:09 +0000 (22:39 +0000)]
Move test in x86 specific area.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128245
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Thu, 24 Mar 2011 22:05:48 +0000 (22:05 +0000)]
Suppress an unused variable warning in -asserts builds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128244
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Thu, 24 Mar 2011 22:04:39 +0000 (22:04 +0000)]
Handle the added VBICiv*i* NEON instructions, too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128243
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 24 Mar 2011 21:59:03 +0000 (21:59 +0000)]
Testcase for llvm-gcc commit r128230.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128242
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Thu, 24 Mar 2011 21:42:55 +0000 (21:42 +0000)]
Plug a leak by ThumbDisassembler::getInstruction(), thanks to Benjamin Kramer!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128241
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Thu, 24 Mar 2011 21:36:56 +0000 (21:36 +0000)]
T2 Load/Store Multiple:
These instructions were changed to not embed the addressing mode within the MC instructions
We also need to update the corresponding assert stmt. Also add a test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128240
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 24 Mar 2011 21:14:28 +0000 (21:14 +0000)]
Plug a leak in the arm disassembler and put the tests back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128238
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Thu, 24 Mar 2011 21:04:58 +0000 (21:04 +0000)]
Add asm parsing support w/ testcases for strex/ldrex family of instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128236
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Thu, 24 Mar 2011 20:56:23 +0000 (20:56 +0000)]
Remove these two test files as they cause llvm-i686-linux-vg_leak build to fail 'test-llvm'.
These two are test cases which should result in 'invalid instruction encoding' from running llvm-mc -disassemble.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128235
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Thu, 24 Mar 2011 20:42:48 +0000 (20:42 +0000)]
ADR was added with the wrong encoding for inst{24-21}, and the ARM decoder was fooled.
Set the encoding bits to {0,?,?,0}, not 0. Plus delegate the disassembly of ADR to
the more generic ADDri/SUBri instructions, and add a test case for that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128234
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 24 Mar 2011 20:30:50 +0000 (20:30 +0000)]
Keep track of directory namd and fIx regression caused by Rafael's patch r119613.
A better approach would be to move source id handling inside MC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128233
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 24 Mar 2011 18:46:34 +0000 (18:46 +0000)]
Clean up assembly statement separator support.
The MC asm lexer wasn't honoring a non-default (anything but ';') statement
separator. Fix that, and generalize a bit to support multi-character
statement separators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128227
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Thu, 24 Mar 2011 18:40:38 +0000 (18:40 +0000)]
The r118201 added support for VORR (immediate). Update ARMDisassemblerCore.cpp to disassemble the
VORRiv*i* instructions properly within the DisassembleN1RegModImmFrm() function. Add a test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128226
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Thu, 24 Mar 2011 17:04:22 +0000 (17:04 +0000)]
Add comments to the handling of opcode CPS3p to reject invalid instruction encoding,
a test case of invalid CPS3p encoding and one for invalid VLDMSDB due to regs out of range.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128220
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 24 Mar 2011 16:43:37 +0000 (16:43 +0000)]
revert r128199 until it can be made to work with Frontend/dependency-gen.c.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128218
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Thu, 24 Mar 2011 16:34:59 +0000 (16:34 +0000)]
Debug intrinsics must be skipped at the beginning and ends of blocks, lest they
affect the generated code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128217
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Thu, 24 Mar 2011 16:18:19 +0000 (16:18 +0000)]
Fix typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128216
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 24 Mar 2011 16:13:31 +0000 (16:13 +0000)]
fix description, PR9542
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128214
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Thu, 24 Mar 2011 15:54:11 +0000 (15:54 +0000)]
It is enough for the CallInst to have no uses to be made a tail call with a ret
void; it doesn't need to have a void type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128212
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 24 Mar 2011 15:35:25 +0000 (15:35 +0000)]
s/UpdateDT/ModifiedDT/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128211
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 24 Mar 2011 07:07:00 +0000 (07:07 +0000)]
Target/X86: [PR8777][PR8778] Tweak alloca/chkstk for Windows targets.
FIXME: Some cleanups would be needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128206
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 24 Mar 2011 07:06:45 +0000 (07:06 +0000)]
llvm-stub.cpp: mingw-w64 tweak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128205
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 24 Mar 2011 06:28:45 +0000 (06:28 +0000)]
Add comment to clarify what MachineConstantPoolEntry::isMachineConstantPoolEntry() means.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128204
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 24 Mar 2011 06:20:03 +0000 (06:20 +0000)]
Nasty bug in ARMBaseInstrInfo::produceSameValue(). The MachineConstantPoolEntry
entries being compared may not be ARMConstantPoolValue. Without checking
whether they are ARMConstantPoolValue first, and if the stars and moons
are aligned properly, the equality test may return true (when the first few
words of two Constants' values happen to be identical) and very bad things can
happen.
rdar://
9125354
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128203
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Thu, 24 Mar 2011 05:23:40 +0000 (05:23 +0000)]
Remove all uses of PATH_MAX and MAXPATHLEN from PathV2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128199
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Thu, 24 Mar 2011 04:52:10 +0000 (04:52 +0000)]
Do early taildup of ret in CodeGenPrepare for potential tail calls that have a
void return type. This fixes PR9487.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128197
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Thu, 24 Mar 2011 04:52:07 +0000 (04:52 +0000)]
Use an early return instead of a long if block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128196
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Thu, 24 Mar 2011 04:52:04 +0000 (04:52 +0000)]
When UpdateDT is set, DT is invalid, which could cause problems when trying to
use it later. I couldn't make a test that hits this with the current code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128195
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Thu, 24 Mar 2011 04:51:51 +0000 (04:51 +0000)]
Check for TLI so that -codegenprepare can be used from opt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128194
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Thu, 24 Mar 2011 02:24:36 +0000 (02:24 +0000)]
CPS3p: Let's reject impossible imod values by returning false from the DisassembleMiscFrm() function.
Fixed rdar://problem/
9179416 ARM disassembler crash: "Unknown imod operand" (fuzz testing)
Opcode=98 Name=CPS3p Format=ARM_FORMAT_MISCFRM(26)
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
-------------------------------------------------------------------------------------------------
| 1: 1: 1: 1| 0: 0: 0: 1| 0: 0: 0: 0| 0: 0: 1: 0| 0: 0: 0: 1| 1: 1: 0: 0| 1: 0: 0: 1| 0: 0: 1: 1|
-------------------------------------------------------------------------------------------------
Before:
cpsUnknown imod operand
UNREACHABLE executed at /Volumes/data/lldb/llvm/lib/Target/ARM/InstPrinter/../ARMBaseInfo.h:123!
After:
/Volumes/data/Radar/
9179416/mc-input-arm.txt:1:1: warning: invalid instruction encoding
0x93 0x1c 0x2 0xf1
^
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128192
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Thu, 24 Mar 2011 01:40:42 +0000 (01:40 +0000)]
Load/Store Multiple:
These instructions were changed to not embed the addressing mode within the MC instructions
We also need to update the corresponding assert stmt. Also add two test cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128191
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Thu, 24 Mar 2011 01:07:26 +0000 (01:07 +0000)]
STRT and STRBT was incorrectly tagged as IndexModeNone during the refactorings (r119821).
We now tag them as IndexModePost.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128189
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Thu, 24 Mar 2011 00:28:38 +0000 (00:28 +0000)]
The r128103 fix to cope with the removal of addressing modes from the MC instructions
were incomplete. The assert stmt needs to be updated and the operand index incrment is wrong.
Fix the bad logic and add some sanity checking to detect bad instruction encoding;
and add a test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128186
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 23 Mar 2011 23:35:17 +0000 (23:35 +0000)]
Runtime dylib simple ARM 24-bit branch relocation support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128184
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 23 Mar 2011 23:34:19 +0000 (23:34 +0000)]
Enable GlobalMerge on darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128183
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 23 Mar 2011 23:32:48 +0000 (23:32 +0000)]
Fix comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128182
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 23 Mar 2011 23:11:02 +0000 (23:11 +0000)]
Revert r128175.
I'm backing this out for the second time. It was supposed to be fixed by r128164, but the mingw self-host must be defeating the fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128181
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 23 Mar 2011 22:52:04 +0000 (22:52 +0000)]
Cmp peephole optimization isn't always safe for signed arithmetics.
int tries = INT_MAX;
while (tries > 0) {
tries--;
}
The check should be:
subs r4, #1
cmp r4, #0
bgt LBB0_1
The subs can set the overflow V bit when r4 is INT_MAX+1 (which loop
canonicalization apparently does in this case). cmp #0 would have cleared
it while not changing the N and Z bits. Since BGT is dependent on the V
bit, i.e. (N == V) && !Z, it is not safe to eliminate the cmp #0.
rdar://
9172742
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128179
91177308-0d34-0410-b5e6-
96231b3b80d8