oota-llvm.git
13 years agoIt is possible, under specific circumstances involving ptrtoint ConstantExpr's, for...
Owen Anderson [Thu, 16 Sep 2010 18:28:33 +0000 (18:28 +0000)]
It is possible, under specific circumstances involving ptrtoint ConstantExpr's, for LVI to end up trying to merge
a Constant into a ConstantRange.  Handle this conservatively for now, rather than asserting.  The testcase is
more complex that I would like, but the manifestation of the problem is sensitive to iteration orders and the state of the
LVI cache, and I have not been able to reproduce it with manually constructed or simplified cases.

Fixes PR8162.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114103 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agomake this non brain dead...
Jim Grosbach [Thu, 16 Sep 2010 17:48:08 +0000 (17:48 +0000)]
make this non brain dead...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114100 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove unnecessary by-reference return.
Jim Grosbach [Thu, 16 Sep 2010 17:45:21 +0000 (17:45 +0000)]
Remove unnecessary by-reference return.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114099 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMC-ization of the PICLDR pseudo. Next up, adding the other variants
Jim Grosbach [Thu, 16 Sep 2010 17:43:25 +0000 (17:43 +0000)]
MC-ization of the PICLDR pseudo. Next up, adding the other variants
(PICLDRB, et. al.) and PICSTR*

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114098 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix PR8161, in which an unreachable loop causes recursive instruction simplification...
Owen Anderson [Thu, 16 Sep 2010 17:42:36 +0000 (17:42 +0000)]
Fix PR8161, in which an unreachable loop causes recursive instruction simplification to try
to replace an instruction with itself.  Add a predicate to the simplifier to prevent this case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114097 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMake sure to promote single precision floats to double before extracting them
Jim Grosbach [Thu, 16 Sep 2010 17:37:30 +0000 (17:37 +0000)]
Make sure to promote single precision floats to double before extracting them
from the APFloat.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114096 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMake sure that names like .note.GNU-stack are accepted as valid section names.
Rafael Espindola [Thu, 16 Sep 2010 17:05:55 +0000 (17:05 +0000)]
Make sure that names like .note.GNU-stack are accepted as valid section names.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114091 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd support for the .zero directive.
Rafael Espindola [Thu, 16 Sep 2010 15:03:59 +0000 (15:03 +0000)]
Add support for the .zero directive.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114077 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoChange SPU register re-interpretations from OR to COPY_TO_REGCLASS instruction.
Kalle Raiskila [Thu, 16 Sep 2010 12:29:33 +0000 (12:29 +0000)]
Change SPU register re-interpretations from OR to COPY_TO_REGCLASS instruction.

This cleans up after the mess r108567 left in the CellSPU backend.
ORCvt-instruction were used to reinterpret registers, and the ORs were then
removed by isMoveInstr(). This patch now removes 350 instrucions of format:
or $3, $3, $3
(from the 52 testcases in CodeGen/CellSPU). One case of a nonexistant or is
checked for.

Some moves of the form 'ori $., $., 0' and 'ai $., $., 0' still remain.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114074 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd better support for environment portion of triple. Original patch by
Duncan Sands [Thu, 16 Sep 2010 08:25:48 +0000 (08:25 +0000)]
Add better support for environment portion of triple.  Original patch by
Cameron Esfahani, tweaked to use array_lengthof.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114073 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoSome versions of gcc still warn about "ignoring return value ... declared
Duncan Sands [Thu, 16 Sep 2010 08:20:49 +0000 (08:20 +0000)]
Some versions of gcc still warn about "ignoring return value ... declared
with attribute warn_unused_result" here - suppress the warning harder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114072 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove support for "dregpair" operand modifier, now that it is no longer being
Bob Wilson [Thu, 16 Sep 2010 04:55:00 +0000 (04:55 +0000)]
Remove support for "dregpair" operand modifier, now that it is no longer being
used for anything.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114067 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoWhen expanding ARM pseudo registers, copy the existing predicate operands
Bob Wilson [Thu, 16 Sep 2010 04:25:37 +0000 (04:25 +0000)]
When expanding ARM pseudo registers, copy the existing predicate operands
instead of using default predicates on the expanded instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114066 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agostore MC FP immediates as a double instead of as an APFloat, thus avoiding an
Jim Grosbach [Thu, 16 Sep 2010 03:45:21 +0000 (03:45 +0000)]
store MC FP immediates as a double instead of as an APFloat, thus avoiding an
unnecessary dtor for MCOperand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114064 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agollvm-mc: Teach -as-lex to print more token kinds.
Daniel Dunbar [Thu, 16 Sep 2010 00:42:35 +0000 (00:42 +0000)]
llvm-mc: Teach -as-lex to print more token kinds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114051 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agobuild: Add support for a TOOL_ORDER_FILE variable so commands can build with an
Daniel Dunbar [Thu, 16 Sep 2010 00:42:32 +0000 (00:42 +0000)]
build: Add support for a TOOL_ORDER_FILE variable so commands can build with an
order file on Darwin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114050 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd missing break.
Bob Wilson [Thu, 16 Sep 2010 00:31:32 +0000 (00:31 +0000)]
Add missing break.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114048 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoChange VLDMQ and VSTMQ to be pseudo instructions. They are expanded after
Bob Wilson [Thu, 16 Sep 2010 00:31:02 +0000 (00:31 +0000)]
Change VLDMQ and VSTMQ to be pseudo instructions.  They are expanded after
register allocation to VLDMD and VSTMD respectively.  This avoids using the
dregpair operand modifier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114047 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix a threaded LLVM bug due the need for operator= on reference counted AttrListImpl...
Owen Anderson [Thu, 16 Sep 2010 00:27:35 +0000 (00:27 +0000)]
Fix a threaded LLVM bug due the need for operator= on reference counted AttrListImpl's.  It might
be possible to implement this very carefully to allow a lock-free implementation while still
avoiding illegal interleavings, but I haven't been able to figure one out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114046 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUse the value mapping provided by LiveIntervalMap. This simplifies the code a
Jakob Stoklund Olesen [Thu, 16 Sep 2010 00:01:36 +0000 (00:01 +0000)]
Use the value mapping provided by LiveIntervalMap. This simplifies the code a
great deal because we don't have to worry about maintaining SSA form.

Unconditionally copy back to dupli when the register is live out of the split
range, even if the live-out value was defined outside the range. Skipping the
back-copy only makes sense when the live range is going to spill outside the
split range, and we don't know that it will. Besides, this was a hack to avoid
SSA update issues.

Clear up some confusion about the end point of a half-open LiveRange. Methinks
LiveRanges need to be closed so both start and end are included in the range.
The low bits of a SlotIndex are symbolic, so a half-open range doesn't really
make sense. This would be a pervasive change, though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114043 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoSystem/Path: Add x86-64 COFF to IdentifyFileType.
Michael J. Spencer [Wed, 15 Sep 2010 23:04:14 +0000 (23:04 +0000)]
System/Path: Add x86-64 COFF to IdentifyFileType.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114037 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoSince PassRegistry is currently a shared global object, it needs locking. While...
Owen Anderson [Wed, 15 Sep 2010 23:03:33 +0000 (23:03 +0000)]
Since PassRegistry is currently a shared global object, it needs locking.  While it might intuitively seem
that all the setup of this class currently happens at static initialization time, this misses the fact
that some later events can cause mutation of the PassRegistrationListeners list, and thus cause race issues.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114036 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoSystem/Path: Add isObjectFile().
Michael J. Spencer [Wed, 15 Sep 2010 22:45:45 +0000 (22:45 +0000)]
System/Path: Add isObjectFile().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114032 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd support for the 'lane' modifier on vdup operands
Jim Grosbach [Wed, 15 Sep 2010 22:13:23 +0000 (22:13 +0000)]
Add support for the 'lane' modifier on vdup operands

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114030 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoadd a test of an edge case value for the FP immediate (needs all digits of
Jim Grosbach [Wed, 15 Sep 2010 21:52:13 +0000 (21:52 +0000)]
add a test of an edge case value for the FP immediate (needs all digits of
precision)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114028 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd a InitSections method to the streamer interface.
Rafael Espindola [Wed, 15 Sep 2010 21:48:40 +0000 (21:48 +0000)]
Add a InitSections method to the streamer interface.

The ELF implementation now creates text, data and bss to match the gnu as
behavior.

The text streamer still has the old MachO specific behavior since
the testsuite checks that it will error when a directive is given
before a setting the current section for example.

A nice benefit is that -n is not required anymore when producing
ELF files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114027 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemember VLDMQ.
Jakob Stoklund Olesen [Wed, 15 Sep 2010 21:40:11 +0000 (21:40 +0000)]
Remember VLDMQ.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114026 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd missing break.
Jakob Stoklund Olesen [Wed, 15 Sep 2010 21:40:09 +0000 (21:40 +0000)]
Add missing break.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114025 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTeach the MC disassembler to handle vmov.f32 and vmov.f64 immediate to register
Jim Grosbach [Wed, 15 Sep 2010 21:04:54 +0000 (21:04 +0000)]
Teach the MC disassembler to handle vmov.f32 and vmov.f64 immediate to register
moves. Previously, the immediate was printed as the encoded integer value,
which is incorrect.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114021 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agomove getRegisterNumbering() to out of ARMBaseRegisterInfo into the helper
Jim Grosbach [Wed, 15 Sep 2010 20:26:25 +0000 (20:26 +0000)]
move getRegisterNumbering() to out of ARMBaseRegisterInfo into the helper
functions in ARMBaseInfo.h so it can be used in the MC library as well.
For anything bigger than this, we may want a means to have a small support
library for shared helper functions like this. Cross that bridge when we
come to it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114016 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoPR7959: Handle negative scales in GEPs correctly in BasicAA for non-64-bit
Eli Friedman [Wed, 15 Sep 2010 20:08:03 +0000 (20:08 +0000)]
PR7959: Handle negative scales in GEPs correctly in BasicAA for non-64-bit
targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114015 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agosimplify getRegisterNumbering(). Remove the unused isSPVFP argument and
Jim Grosbach [Wed, 15 Sep 2010 19:52:17 +0000 (19:52 +0000)]
simplify getRegisterNumbering(). Remove the unused isSPVFP argument and
merge the common cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114013 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRefactor uses of getRegisterNumbering() to not need the isSPVFP argument. Check
Jim Grosbach [Wed, 15 Sep 2010 19:44:57 +0000 (19:44 +0000)]
Refactor uses of getRegisterNumbering() to not need the isSPVFP argument. Check
if the register is a member of the SPR register class directly instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114012 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoReduce dependencies in the ARM MC instruction printer.
Jim Grosbach [Wed, 15 Sep 2010 19:27:50 +0000 (19:27 +0000)]
Reduce dependencies in the ARM MC instruction printer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114009 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix spelling typo.
Jim Grosbach [Wed, 15 Sep 2010 19:26:50 +0000 (19:26 +0000)]
Fix spelling typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114008 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFactor out basic enums and hleper functions from ARM.h for cleaner sharing
Jim Grosbach [Wed, 15 Sep 2010 19:26:06 +0000 (19:26 +0000)]
Factor out basic enums and hleper functions from ARM.h for cleaner sharing
between the compiler back end and the MC libraries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114007 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd support for floating point immediates to MC instruction printing. ARM
Jim Grosbach [Wed, 15 Sep 2010 18:47:08 +0000 (18:47 +0000)]
Add support for floating point immediates to MC instruction printing. ARM
VFP instructions use it for loading some constants, so implement that
handling.

Not thrilled with adding a member to MCOperand, but not sure there's much of
a better option that's not pretty fragile (like putting a double in the
union instead and just assuming that's good enough). Suggestions welcome...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113996 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoCheck bb to ensure that alloca is in separate basic block.
Devang Patel [Wed, 15 Sep 2010 18:13:55 +0000 (18:13 +0000)]
Check bb to ensure that alloca is in separate basic block.
This fixes funcargs.exp regression reported by gdb testsuite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113992 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRecognize VST1q64Pseudo and VSTMQ as stack slot stores.
Jakob Stoklund Olesen [Wed, 15 Sep 2010 17:27:09 +0000 (17:27 +0000)]
Recognize VST1q64Pseudo and VSTMQ as stack slot stores.
Recognize VLD1q64Pseudo as a stack slot load.

Reject these if they are loading or storing a subregister. The API (and
VirtRegRewriter) doesn't know how to deal with that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113985 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoReapply Gabor's 113839, 113840, and 113876 with a fix for a problem
Bob Wilson [Wed, 15 Sep 2010 17:12:08 +0000 (17:12 +0000)]
Reapply Gabor's 113839, 113840, and 113876 with a fix for a problem
encountered while building llvm-gcc for arm.  This is probably the same issue
that the ppc buildbot hit. llvm::prior works on a MachineBasicBlock::iterator,
not a plain MachineInstr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113983 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agothe darwin9-powerpc buildbot keeps consistently crashing,
Gabor Greif [Wed, 15 Sep 2010 16:53:07 +0000 (16:53 +0000)]
the darwin9-powerpc buildbot keeps consistently crashing,
backing out following to get it back to green,
so I can investigate in peace:

svn merge -c -113840  llvm/test/CodeGen/ARM/arm-and-tst-peephole.ll
svn merge -c -113876 -c -113839 llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113980 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMove ARM is{LoadFrom,StoreTo}StackSlot closer to their siblings so they won't be
Jakob Stoklund Olesen [Wed, 15 Sep 2010 16:36:26 +0000 (16:36 +0000)]
Move ARM is{LoadFrom,StoreTo}StackSlot closer to their siblings so they won't be
forgotten in the future.

Coalesce identical cases in switch.

No functional changes intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113979 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoSpelling fix.
Bob Wilson [Wed, 15 Sep 2010 16:28:21 +0000 (16:28 +0000)]
Spelling fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113978 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agotrailing whitespace and 80 column cleanup
Jim Grosbach [Wed, 15 Sep 2010 16:24:01 +0000 (16:24 +0000)]
trailing whitespace and 80 column cleanup

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113977 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agotrailing whitespace
Jim Grosbach [Wed, 15 Sep 2010 16:08:15 +0000 (16:08 +0000)]
trailing whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113975 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agollvmc: make -x work with unknown suffixes.
Mikhail Glushenkov [Wed, 15 Sep 2010 15:20:41 +0000 (15:20 +0000)]
llvmc: make -x work with unknown suffixes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113972 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemoved TracingBrainF from examples Makefile.
Garrison Venn [Wed, 15 Sep 2010 14:55:32 +0000 (14:55 +0000)]
Removed TracingBrainF from examples Makefile.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113970 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoIf dbg.declare from non-entry block is using alloca from entry block then use offset...
Devang Patel [Wed, 15 Sep 2010 14:48:53 +0000 (14:48 +0000)]
If dbg.declare from non-entry block is using alloca from entry block then use offset available in StaticAllocaMap to emit DBG_VALUE. Right now, this has no material impact because varible info also collected using offset table maintained in machine module info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113967 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRelease-Asserts no longer exists.
Duncan Sands [Wed, 15 Sep 2010 12:30:35 +0000 (12:30 +0000)]
Release-Asserts no longer exists.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113965 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove the Ada bindings which are unmaintained and unused. The project which
Duncan Sands [Wed, 15 Sep 2010 08:17:10 +0000 (08:17 +0000)]
Remove the Ada bindings which are unmaintained and unused.  The project which
was the main putative user of the binding is actually maintaining its own
different binding, see http://git.ada.cx/cgi-bin/cgit.cgi/draco.git/

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113960 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove LLVM_GLOBAL_VISIBILITY, which is unused, and was not working properly.
Duncan Sands [Wed, 15 Sep 2010 08:09:55 +0000 (08:09 +0000)]
Remove LLVM_GLOBAL_VISIBILITY, which is unused, and was not working properly.
The problem was that the test for whether a compiler supports it or not was
inaccurate, but has to be accurate: LLVM_LOCAL_VISIBILITY is an optimization
and not needed for correctness, so wrongly thinking a compiler doesn't support
it is not a big deal, but LLVM_GLOBAL_VISIBILITY is for correctness, and not
an optimization: getting it wrong is fatal: it needs to be set based on a
configure test not testing the gcc version.  Since dragonegg has moved to a
different scheme, and it was the only user of LLVM_GLOBAL_VISIBILITY, just
remove this macro.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113959 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agolcall and ljmp always default to lcalll and ljmpl. This finally
Chris Lattner [Wed, 15 Sep 2010 05:30:20 +0000 (05:30 +0000)]
lcall and ljmp always default to lcalll and ljmpl.  This finally
wraps up r8418316

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113949 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoapparently jmpl $1,$2 is an alias for ljmpl, similiarly
Chris Lattner [Wed, 15 Sep 2010 05:25:21 +0000 (05:25 +0000)]
apparently jmpl $1,$2 is an alias for ljmpl, similiarly
for call.  Add this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113948 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDisambiguate lcall/ljmp to the 32-bit version. This happens
Chris Lattner [Wed, 15 Sep 2010 05:14:54 +0000 (05:14 +0000)]
Disambiguate lcall/ljmp to the 32-bit version.  This happens
even in 64-bit mode apparently.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113945 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agofix the encoding of sldt GR16 to have the 0x66 prefix, and
Chris Lattner [Wed, 15 Sep 2010 04:45:10 +0000 (04:45 +0000)]
fix the encoding of sldt GR16 to have the 0x66 prefix, and
add sldt GR32, which isn't documented in the intel manual
but which gas accepts.  Part of rdar://8418316

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113938 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoimplement aliases for shld/shrd, part of rdar://8418316
Chris Lattner [Wed, 15 Sep 2010 04:37:18 +0000 (04:37 +0000)]
implement aliases for shld/shrd, part of rdar://8418316

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113937 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agofix rdar://8431880 - rcl/rcr with no shift amount not recognized
Chris Lattner [Wed, 15 Sep 2010 04:33:27 +0000 (04:33 +0000)]
fix rdar://8431880 - rcl/rcr with no shift amount not recognized

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113936 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoadd various broken forms of fnstsw. I didn't add the %rax
Chris Lattner [Wed, 15 Sep 2010 04:15:16 +0000 (04:15 +0000)]
add various broken forms of fnstsw.  I didn't add the %rax
version because it adds a prefix and makes even less sense
than the other broken forms.  This wraps up rdar://8431422

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113932 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoadd some aliases for f[u]comi, part of rdar://8431422
Chris Lattner [Wed, 15 Sep 2010 04:08:38 +0000 (04:08 +0000)]
add some aliases for f[u]comi, part of rdar://8431422

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113930 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoadd a bunch of aliases for fp operations with no operand,
Chris Lattner [Wed, 15 Sep 2010 04:04:33 +0000 (04:04 +0000)]
add a bunch of aliases for fp operations with no operand,
rdar://8431422

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113929 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agotest: Fix coff-dump section array indicies to 1 based to match file format.
Michael J. Spencer [Wed, 15 Sep 2010 03:58:51 +0000 (03:58 +0000)]
test: Fix coff-dump section array indicies to 1 based to match file format.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113928 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTabs to spaces
Michael J. Spencer [Wed, 15 Sep 2010 03:58:39 +0000 (03:58 +0000)]
Tabs to spaces

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113927 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoCleanup coff-dump.py
Michael J. Spencer [Wed, 15 Sep 2010 03:58:24 +0000 (03:58 +0000)]
Cleanup coff-dump.py

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113926 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agolit: Expose FileBasedTest object and Test module via 'lit' object that gets
Daniel Dunbar [Wed, 15 Sep 2010 03:52:38 +0000 (03:52 +0000)]
lit: Expose FileBasedTest object and Test module via 'lit' object that gets
exposed to config files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113923 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agolit: Rename main lit module to main.py, lit/lit/lit.py was a bit too, err,
Daniel Dunbar [Wed, 15 Sep 2010 03:52:31 +0000 (03:52 +0000)]
lit: Rename main lit module to main.py, lit/lit/lit.py was a bit too, err,
alliterate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113922 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDiagnose invalid instructions like "incl" with "too few operands for instruction"
Chris Lattner [Wed, 15 Sep 2010 03:50:11 +0000 (03:50 +0000)]
Diagnose invalid instructions like "incl" with "too few operands for instruction"
instead of crashing.  This fixes:
rdar://8431815 - crash when invalid operand is one that isn't present

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113921 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUse float64 instead of int64 vector elements for NEON vget_low and vget_high
Bob Wilson [Wed, 15 Sep 2010 01:52:33 +0000 (01:52 +0000)]
Use float64 instead of int64 vector elements for NEON vget_low and vget_high
functions, since int64 is not a legal type and using it leads to inefficient
code.  PR8036.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113919 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUse VLD1/VST1 pseudo instructions for loadRegFromStackSlot and
Bob Wilson [Wed, 15 Sep 2010 01:48:05 +0000 (01:48 +0000)]
Use VLD1/VST1 pseudo instructions for loadRegFromStackSlot and
storeRegToStackSlot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113918 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agotrailing whitespace
Jim Grosbach [Wed, 15 Sep 2010 01:01:45 +0000 (01:01 +0000)]
trailing whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113915 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd x86MMX a few more places.
Dale Johannesen [Wed, 15 Sep 2010 00:52:23 +0000 (00:52 +0000)]
Add x86MMX a few more places.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113914 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agofix PR8144, a bug where constant merge would merge globals marked
Chris Lattner [Wed, 15 Sep 2010 00:30:11 +0000 (00:30 +0000)]
fix PR8144, a bug where constant merge would merge globals marked
attribute(used).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113911 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoReapply r113875 with additional cleanups.
Jim Grosbach [Tue, 14 Sep 2010 23:54:06 +0000 (23:54 +0000)]
Reapply r113875 with additional cleanups.

"The register specified for a dregpair is the corresponding Q register, so to
get the pair, we need to look up the sub-regs based on the qreg. Create a
lookup function since we don't have access to TargetRegisterInfo here to
be able to use getSubReg(ARM::dsub_[01])."

Additionaly, fix the NEON VLD1* and VST1* instruction patterns not to use
the dregpair modifier for the 2xdreg versions. Explicitly specifying the two
registers as operands is more correct and more consistent with the other
instruction patterns. This enables further cleanup of special case code in the
disassembler as a nice side-effect.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113903 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoadd a terrible hack to allow out with dx is parens, a gas bug.
Chris Lattner [Tue, 14 Sep 2010 23:34:29 +0000 (23:34 +0000)]
add a terrible hack to allow out with dx is parens, a gas bug.
This fixes PR8114

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113894 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoConvert TBAA to use the new TBAATag field of AliasAnalysis::Location.
Dan Gohman [Tue, 14 Sep 2010 23:28:12 +0000 (23:28 +0000)]
Convert TBAA to use the new TBAATag field of AliasAnalysis::Location.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113892 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoEmit libcalls for SDIV, this requires some call infrastructure
Eric Christopher [Tue, 14 Sep 2010 23:03:37 +0000 (23:03 +0000)]
Emit libcalls for SDIV, this requires some call infrastructure
that needs to be shared a bit more widely around.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113886 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agorevert 113875 momentarilly. Need to fix the MC disassembler to handle the
Jim Grosbach [Tue, 14 Sep 2010 22:38:39 +0000 (22:38 +0000)]
revert 113875 momentarilly. Need to fix the MC disassembler to handle the
change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113878 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agotrailing whitespace cleanup
Jim Grosbach [Tue, 14 Sep 2010 22:27:15 +0000 (22:27 +0000)]
trailing whitespace cleanup

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113877 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoan attempt to salvage the darwin9-powerpc buildbot, which could be miscompiling this...
Gabor Greif [Tue, 14 Sep 2010 22:25:16 +0000 (22:25 +0000)]
an attempt to salvage the darwin9-powerpc buildbot, which could be miscompiling this line

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113876 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThe register specified for a dregpair is the corresponding Q register, so to
Jim Grosbach [Tue, 14 Sep 2010 22:20:33 +0000 (22:20 +0000)]
The register specified for a dregpair is the corresponding Q register, so to
get the pair, we need to look up the sub-regs based on the qreg. Create a
lookup function since we don't have access to TargetRegisterInfo here to
be able to use getSubReg(ARM::dsub_[01]).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113875 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoset isCompare for another three Thumb1 instructions
Gabor Greif [Tue, 14 Sep 2010 22:00:50 +0000 (22:00 +0000)]
set isCompare for another three Thumb1 instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113867 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTidy whitespace in generated arm_neon.h.
Bob Wilson [Tue, 14 Sep 2010 21:52:34 +0000 (21:52 +0000)]
Tidy whitespace in generated arm_neon.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113865 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd predicate and 's' bit operands to PICADD instruction lowering.
Jim Grosbach [Tue, 14 Sep 2010 21:28:17 +0000 (21:28 +0000)]
Add predicate and 's' bit operands to PICADD instruction lowering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113860 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd missing include.
Benjamin Kramer [Tue, 14 Sep 2010 21:25:38 +0000 (21:25 +0000)]
Add missing include.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113859 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove the experimental AliasAnalysis::getDependency interface, which
Dan Gohman [Tue, 14 Sep 2010 21:25:10 +0000 (21:25 +0000)]
Remove the experimental AliasAnalysis::getDependency interface, which
isn't a good level of abstraction for memdep. Instead, generalize
AliasAnalysis::alias and related interfaces with a new Location
class for describing a memory location. For now, this is the same
Pointer and Size as before, plus an additional field for a TBAA tag.

Also, introduce a fixed MD_tbaa metadata tag kind.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113858 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAvoid warnings.
Bob Wilson [Tue, 14 Sep 2010 21:12:05 +0000 (21:12 +0000)]
Avoid warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113857 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agofix comment typo
Jim Grosbach [Tue, 14 Sep 2010 21:05:34 +0000 (21:05 +0000)]
fix comment typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113856 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove dead option from tests.
Owen Anderson [Tue, 14 Sep 2010 21:03:40 +0000 (21:03 +0000)]
Remove dead option from tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113855 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMake NEON ld/st pseudo instruction classes take the instruction itinerary as
Bob Wilson [Tue, 14 Sep 2010 20:59:49 +0000 (20:59 +0000)]
Make NEON ld/st pseudo instruction classes take the instruction itinerary as
an argument, so that we can distinguish instructions with the same register
classes but different numbers of registers (e.g., vld3 and vld4).  Fix some
of the non-pseudo NEON ld/st instruction itineraries to reflect the number
of registers loaded or stored, not just the opcode name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113854 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove the option to disable LazyValueInfo in JumpThreading, as it is now
Owen Anderson [Tue, 14 Sep 2010 20:57:41 +0000 (20:57 +0000)]
Remove the option to disable LazyValueInfo in JumpThreading, as it is now
on by default and has received significant testing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113852 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoPrune includes.
Benjamin Kramer [Tue, 14 Sep 2010 20:49:00 +0000 (20:49 +0000)]
Prune includes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113850 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoset comparable for a bunch of Thumb instructions
Gabor Greif [Tue, 14 Sep 2010 20:47:43 +0000 (20:47 +0000)]
set comparable for a bunch of Thumb instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113849 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agomust not peephole away side effects
Gabor Greif [Tue, 14 Sep 2010 20:46:08 +0000 (20:46 +0000)]
must not peephole away side effects

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113848 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDon't ignore the CPSR implicit def when lowering a MachineInstruction to an MCInst.
Jim Grosbach [Tue, 14 Sep 2010 20:41:27 +0000 (20:41 +0000)]
Don't ignore the CPSR implicit def when lowering a MachineInstruction to an MCInst.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113847 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoClarify comment
Jim Grosbach [Tue, 14 Sep 2010 20:35:46 +0000 (20:35 +0000)]
Clarify comment

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113846 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAfter Dan's recent commit this is no longer true.
Devang Patel [Tue, 14 Sep 2010 20:32:58 +0000 (20:32 +0000)]
After Dan's recent commit this is no longer true.
Now isFunctionLocal is reset, if required,  when operands are modified.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113845 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUse frame index, if available for byval argument while lowering dbg_declare. Otherwis...
Devang Patel [Tue, 14 Sep 2010 20:29:31 +0000 (20:29 +0000)]
Use frame index, if available for byval argument while lowering dbg_declare. Otherwise let getRegForValue() find register for this argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113843 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoforgot the testcase change for r113839
Gabor Greif [Tue, 14 Sep 2010 09:30:17 +0000 (09:30 +0000)]
forgot the testcase change for r113839

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113840 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoEliminate a 'tst' that immediately follows an 'and'
Gabor Greif [Tue, 14 Sep 2010 09:23:22 +0000 (09:23 +0000)]
Eliminate a 'tst' that immediately follows an 'and'
by morphing the 'and' to its recording form 'andS'.

This is basically a test commit into this area, to
see whether the bots like me. Several generalizations
can be applied and various avenues of code simplification
are open. I'll introduce those as I go.

I am aware of stylistic input from Bill Wendling, about
where put the analysis complexity, but I am positive
that we can move things around easily and will find a
satisfactory solution.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113839 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agotest for and-tst peephole optimization
Gabor Greif [Tue, 14 Sep 2010 08:50:43 +0000 (08:50 +0000)]
test for and-tst peephole optimization
documents the status-quo with its opportunities

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113838 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix QOpcode assignment to Opc.
Eric Christopher [Tue, 14 Sep 2010 08:31:25 +0000 (08:31 +0000)]
Fix QOpcode assignment to Opc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113837 91177308-0d34-0410-b5e6-96231b3b80d8