Commit Graph

8489 Commits

Author SHA1 Message Date
Jim Grosbach
e5165490b7 Use Unified Assembly Syntax for the ARM backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86494 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 00:11:35 +00:00
Chris Lattner
bf382b5f74 Teach an instcombine to not pull trunc instructions through PHI nodes
when both the source and dest are illegal types, since it would cause
the phi to grow (for example, we shouldn't transform test14b's phi to
a phi on i320).  This fixes an infinite loop on i686 bootstrap with
phi slicing turned on, so turn it back on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86483 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 21:20:06 +00:00
Chris Lattner
9956c056c1 reapply r8644[3-5] with only the scary part
(SliceUpIllegalIntegerPHI) disabled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86480 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 19:23:30 +00:00
Daniel Dunbar
d11a7c3b03 Speculatively revert r8644[3-5], they seem to be leading to infinite loops in
llvm-gcc bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86478 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 17:52:47 +00:00
Anton Korobeynikov
f0b47b7f6d Add and-not (bic) patterns. Based heavily on patch by Brian Lucas!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86471 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 15:33:12 +00:00
Anton Korobeynikov
52f28e9b63 Fix invalid operand updates & implement post-inc memory operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86466 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 14:27:38 +00:00
Anton Korobeynikov
c2fd919ea2 It is invalid to infer the value type from the result #0 of the node
since the instruction might use the other result of different type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86462 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 12:14:54 +00:00
Daniel Dunbar
4080d10b4b Two small fixes for site.exp for cmake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86453 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 09:29:52 +00:00
Daniel Dunbar
5ed7be1a40 Derive the right paths to use during testing instead of passing it in via make.
Also, fix a few other details of the cmake test target and rename it to
'check'. CMake tests now work for the most part, but there are a handful of
failures left due to missing site.exp bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86452 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 09:08:00 +00:00
Daniel Dunbar
fb4fb6ddb0 Switch to using 'lit.site.cfg.in' for the site config template for Unit tests,
and generate it for CMake builds as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86451 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 09:07:51 +00:00
Daniel Dunbar
16bc8783c9 Cleanup some unused RUN lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86450 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 09:07:42 +00:00
Chris Lattner
ce306a450f another more interesting test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86445 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 08:36:40 +00:00
Chris Lattner
04ab669d0b feature test for the new transformation in r86443
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86444 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 08:30:58 +00:00
Chris Lattner
91114966b1 teach a couple of instcombine transformations involving PHIs to
not turn a PHI in a legal type into a PHI of an illegal type, and
add a new optimization that breaks up insane integer PHI nodes into
small pieces (PR3451).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86443 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 08:21:13 +00:00
Nick Lewycky
70a1ce2557 Remove test. Execution tests are slow and generally not worth it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86434 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 02:23:15 +00:00
Nick Lewycky
6cf7349580 Fix run line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86429 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 01:04:45 +00:00
Nick Lewycky
dbf6f518e9 Fix the interpreter to not crash due to zeroext/signext
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86428 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 00:45:29 +00:00
Daniel Dunbar
e9b88e4440 Stop running get_target_triple more than we need to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86418 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 23:52:20 +00:00
Nate Begeman
0b10b91465 x86 vector shuffle cleanup/fixes:
1. rename the movhp patfrag to movlhps, since thats what it actually matches
2. eliminate the bogus movhps load and store patterns, they were incorrect.  The load transforms are already handled (correctly) by shufps/unpack.
3. revert a recent test change to its correct form.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86415 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 23:17:15 +00:00
Nick Lewycky
f80fcd00b3 Improve tail call elimination to handle the switch statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86403 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 21:10:15 +00:00
Chris Lattner
f1c104fb32 temporarily remove these tests, as they are breaking in the buildbot,
Eric, please investigate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86399 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 19:13:17 +00:00
Chris Lattner
918871ee01 make instcombine only rewrite a chain of computation
(eliminating some extends) if the new type of the
computation is legal or if both the source and dest
are illegal.  This prevents instcombine from changing big
chains of computation into i64 on 32-bit targets for 
example.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86398 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 19:11:46 +00:00
Chris Lattner
b8391aa969 remove empty files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86392 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 18:03:32 +00:00
Chris Lattner
1d95725d60 Revert r86359, it is breaking the self host on the
llvm-gcc-i386-darwin9 build bot.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86391 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 17:59:32 +00:00
Anton Korobeynikov
6534f83ae8 Add some dummy support for post-incremented loads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86385 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 17:15:06 +00:00
Anton Korobeynikov
8983da729a Add 8 bit libcalls and make use of them for msp430
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86384 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 17:14:39 +00:00
Anton Korobeynikov
123ed8f099 Initial support for addrmode handling. Tests by Brian Lucas!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86382 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 17:13:35 +00:00
Anton Korobeynikov
e8ea011cc7 It turns out that the testcase in question uncovered subreg-handling bug.
Add assert in asmprinter to catch such cases and xfail the tests.
PR is to be filled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86375 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 15:20:32 +00:00
Eric Christopher
761411c21b Fix a couple of shuffle patterns to use movhlps instead
of movhps as the constraint.  Changes optimizations so
update testcases as appropriate as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86360 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 08:45:53 +00:00
Nick Lewycky
4de9b7f51f Teach dead store elimination that certain intrinsics write to memory just like
a store.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86359 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 08:34:40 +00:00
Chris Lattner
5729d38c81 reapply 86289, 86278, 86270, 86267, 86266 & 86264 plus a fix
(making pred factoring only happen if threading is guaranteed
to be successful).

This now survives an X86-64 bootstrap of llvm-gcc.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86355 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 08:05:03 +00:00
Chris Lattner
e880efe446 Fix PR5421 by APInt'izing switch lowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86354 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 07:50:34 +00:00
Nick Lewycky
cb19438f63 Oops, FunctionContainsEscapingAllocas is really used to mean two different
things. Back out part of r86349 for a moment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86353 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 07:42:38 +00:00
Nick Lewycky
0cade26132 Dust off tail recursion elimination. Fix a fixme by applying CaptureTracking
and add a .ll to demo the new capability.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86349 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 07:10:01 +00:00
Chris Lattner
e503871315 merge cmp1 into cmp0 and filecheckize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86345 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 06:19:20 +00:00
Evan Cheng
d457e6e9a5 Refactor code. Fix a potential missing check. Teach isIdentical() about tLDRpci_pic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86330 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 04:04:34 +00:00
Evan Cheng
78e5c1140a - Add TargetInstrInfo::isIdentical(). It's similar to MachineInstr::isIdentical
except it doesn't care if the definitions' virtual registers differ. This is
  used by machine LICM and other MI passes to perform CSE.
- Teach Thumb2InstrInfo::isIdentical() to check two t2LDRpci_pic are identical.
  Since pc relative constantpool entries are always different, this requires it
  it check if the values can actually the same.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86328 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 03:52:02 +00:00
Devang Patel
12d53dba36 Revert following patches to fix llvmgcc bootstrap.
86289, 86278, 86270, 86267, 86266 & 86264
Chris, please take a look.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86321 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 01:32:59 +00:00
Victor Hernandez
9d0b704e3e Re-commit r86077 now that r86290 fixes the 179.art and 175.vpr ARM regressions.
Here is the original commit message:

This commit updates malloc optimizations to operate on malloc calls that have constant int size arguments.

Update CreateMalloc so that its callers specify the size to allocate:
MallocInst-autoupgrade users use non-TargetData-computed allocation sizes.
Optimization uses use TargetData to compute the allocation size.

Now that malloc calls can have constant sizes, update isArrayMallocHelper() to use TargetData to determine the size of the malloced type and the size of malloced arrays.
Extend getMallocType() to support malloc calls that have non-bitcast uses.

Update OptimizeGlobalAddressOfMalloc() to optimize malloc calls that have non-bitcast uses.  The bitcast use of a malloc call has to be treated specially here because the uses of the bitcast need to be replaced and the bitcast needs to be erased (just like the malloc call) for OptimizeGlobalAddressOfMalloc() to work correctly.

Update PerformHeapAllocSRoA() to optimize malloc calls that have non-bitcast uses.  The bitcast use of the malloc is not handled specially here because ReplaceUsesOfMallocWithGlobal replaces through the bitcast use.

Update OptimizeOnceStoredGlobal() to not care about the malloc calls' bitcast use.

Update all globalopt malloc tests to not rely on autoupgraded-MallocInsts, but instead use explicit malloc calls with correct allocation sizes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86311 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 00:16:28 +00:00
Evan Cheng
b9803a8fa6 - Add pseudo instructions tLDRpci_pic and t2LDRpci_pic which does a pc-relative
load of a GV from constantpool and then add pc. It allows the code sequence to
  be rematerializable so it would be hoisted by machine licm.
- Add a late pass to break these pseudo instructions into a number of real
  instructions. Also move the code in Thumb2 IT pass that breaks up t2MOVi32imm
  to this pass. This is done before post regalloc scheduling to allow the
  scheduler to proper schedule these instructions. It also allow them to be
  if-converted and shrunk by later passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86304 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-06 23:52:48 +00:00
Anton Korobeynikov
fc2cba8362 Honour subreg machine operands during asmprinting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86303 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-06 23:45:15 +00:00
Bob Wilson
54c78ef2fe Print VMOV (immediate) operands as hexadecimal values. Apple's assembler
will not accept negative values for these.  LLVM's default operand printing
sign extends values, so that valid unsigned values appear as negative
immediates.  Print all VMOV immediate operands as hex values to resolve this.
Radar 7372576.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86301 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-06 23:33:28 +00:00
Bob Wilson
d51722a7e3 Fix a broken test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86298 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-06 23:06:42 +00:00
Evan Cheng
e7e0d62efd Remove ARMPCLabelIndex from ARMISelLowering. Use ARMFunctionInfo::createConstPoolEntryUId() instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86294 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-06 22:24:13 +00:00
Gabor Greif
29d727b0c8 fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86281 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-06 20:10:46 +00:00
Chris Lattner
82114b98c9 Fix a problem discovered on self host.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86278 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-06 19:21:48 +00:00
Devang Patel
5ebfa2d181 Tolerate invalid derived type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86269 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-06 18:24:05 +00:00
Chris Lattner
785672534d Extend jump threading to support much more general threading
predicates.  This allows us to jump thread things like:

_ZN12StringSwitchI5ColorE4CaseILj7EEERS1_RAT__KcRKS0_.exit119:
  %tmp1.i24166 = phi i8 [ 1, %bb5.i117 ], [ %tmp1.i24165, %_Z....exit ], [ %tmp1.i24165, %bb4.i114 ] 
  %toBoolnot.i87 = icmp eq i8 %tmp1.i24166, 0     ; <i1> [#uses=1]
  %tmp4.i90 = icmp eq i32 %tmp2.i, 6              ; <i1> [#uses=1]
  %or.cond173 = and i1 %toBoolnot.i87, %tmp4.i90  ; <i1> [#uses=1]
  br i1 %or.cond173, label %bb4.i96, label %_ZN12...

Where it is "obvious" that when coming from %bb5.i117 that the 'and' is always 
false.  This triggers a surprisingly high number of times in the testsuite, 
and gets us closer to generating good code for doug's strswitch testcase.

This also make a bunch of other code in jump threading redundant, I'll rip
out in the next patch.  This survived an enable-checking llvm-gcc bootstrap.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86264 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-06 18:15:14 +00:00
Devang Patel
84c73e9b82 Do not bother to emit debug info for nameless global variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86259 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-06 17:58:12 +00:00
Victor Hernandez
df98761d08 Revert r86077 because it caused crashes in 179.art and 175.vpr on ARM
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86213 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-06 01:33:24 +00:00