Commit Graph

9813 Commits

Author SHA1 Message Date
Chris Lattner
7944c21cae Fix PR7052, patch by Jakub Staszak!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103347 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08 20:01:44 +00:00
Bill Wendling
369252db2e Readd testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103335 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08 04:47:54 +00:00
Dan Gohman
59dc60337f When pruning candidate formulae out of an LSRUse, update the
LSRUse's Regs set after all pruning is done, rather than trying
to do it on the fly, which can produce an incomplete result.

This fixes a case where heuristic pruning was stripping all
formulae from a use, which led the solver to enter an infinite
loop.

Also, add a few asserts to diagnose this kind of situation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103328 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 23:36:59 +00:00
Bill Wendling
09e7a1722a Remove. Don't XFAIL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103321 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 23:09:17 +00:00
Bill Wendling
20eb256006 Temorarily revert r101984.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103314 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 22:45:36 +00:00
Dan Gohman
4ce86f459c SDDbgValues are apparently not being legalized. Fix a symptom of the problem,
and not the real problem itself, by dropping debug info for i128 values.
rdar://7958162.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103310 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 22:19:08 +00:00
Kevin Enderby
a6eeb6e226 Fix i386 relocations to Weak Definitions. The relocation entries should be
external and the item to be relocated should not have the address of the
symbol added in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103302 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 21:44:23 +00:00
Dale Johannesen
0a406ae0d9 Fix PR 7087, and probably other things, by extending
getConstantFP to accept the two supported long double
target types.  This was not the original intent, but
there are other places that assume this works and it's
easy enough to do.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103299 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 21:35:53 +00:00
Devang Patel
735538b3eb Update test to use valid debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103287 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 20:34:00 +00:00
Jim Grosbach
4b77f6a85a Clean up the conditional for handling of sign_extend_inreg based on
whether the extract instructions are available.

rdar://7956878



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103277 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 18:34:55 +00:00
Duncan Sands
7d2568ca3c Correct some bogus target triples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103265 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 17:03:48 +00:00
Dan Gohman
28a193ed8b Add an LLVM IR version of code sinking. This uses the same simple algorithm
as MachineSink, but it isn't constrained by MachineInstr-level details.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103257 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 15:40:13 +00:00
Nick Lewycky
403d312c0f Revert r103133 and add testcase from PR7066.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103233 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 01:45:38 +00:00
Dale Johannesen
ad9e619813 Adjust tests affected by llvm-gcc 103229.
All results here match gcc-4.2.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103230 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 01:11:31 +00:00
Dan Gohman
281d65d004 Disable the new unknown-location code for now. It causes a major
increase in the debug line info section, and it's causing
regressions in a gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103226 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 01:08:53 +00:00
Daniel Dunbar
c26ae5ab7e MC/X86: X86AbsMemAsmOperand is subclass of X86NoSegMemAsmOperand.
- This fixes "leal 0, %eax", for example.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103205 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 22:39:14 +00:00
Chris Lattner
e1611f26e3 fix rdar://7947167 - llvm-mc doesn't match movsq
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103199 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 21:48:14 +00:00
Sean Callanan
1a8b789a4b Eliminated the classification of control registers into %ecr_
and %rcr_, leaving just %cr_ which is what people expect.
Updated the disassembler to support this unified register set.
Added a testcase to verify that the registers continue to be
decoded correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103196 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 20:59:00 +00:00
Dan Gohman
34dcc6fadc Add a DebugLoc argument to TargetInstrInfo::copyRegToReg, so that it
doesn't have to guess.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103194 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 20:33:48 +00:00
Dan Gohman
ac963b3279 Add a testcase for r103135, explicitly representing unknown
locations in debug line info.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103189 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 17:49:17 +00:00
Daniel Dunbar
5fe03c023c Revert r103137, fix for $ in labels. It looks like we can't actually handle this
at the token level. Consider the following horrible test case:

  a = 1
  .globl $a
  movl ($a), %eax
  movl $a, %eax
  movl $$a, %eax

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103178 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 14:46:38 +00:00
Chris Lattner
b4202dbb36 Fix PR7054 - Assertion `Symbol->isUndefined() && "Cannot define a symbol twice!"' failed.
Users can write broken code that emits the same label twice with asm renaming,
detect this and emit a fatal backend error instead of aborting.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103140 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 00:05:37 +00:00
Chris Lattner
851f87c6c9 fix rdar://7946934 - in some limited cases, the assembler should
allow $ at the start of a symbol name.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103137 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-05 23:51:28 +00:00
Jim Grosbach
29402132f3 Cleanup of ARMv7M support. Move hardware divide and Thumb2 extract/pack
instructions to subtarget features and update tests to reflect.
PR5717.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103136 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-05 23:44:43 +00:00
Jakob Stoklund Olesen
51bfd452d5 Fix PR6520. An earlyclobber physreg must not be allocated to anything else.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103133 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-05 23:07:41 +00:00
Stuart Hastings
08bbda3811 Test case for pr2394 and r102979.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103129 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-05 22:49:33 +00:00
Jim Grosbach
bc1c98d538 fix copy/paste oops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103122 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-05 21:07:46 +00:00
Jim Grosbach
3a548e717f Add tests for ARMV7M divide instruction use
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103120 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-05 20:47:15 +00:00
Jim Grosbach
9ad2aafef1 remove unneeded underscores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103114 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-05 19:55:58 +00:00
Jim Grosbach
ab42ec3e51 Convert to filecheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103113 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-05 19:41:11 +00:00
Daniel Dunbar
2d7fd61e94 MC/Mach-O: Mark absolute variable's appropriately, and add Mach-O support for
writing them.
 - <rdar://problem/7885351> integrated assembler broken for i386 objc code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103112 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-05 19:01:05 +00:00
Daniel Dunbar
ae7fb0b03e MC/Mach-O/x86_64: Relocations in debug sections should use local relocations
when possible.
 - <rdar://problem/7934873>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103092 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-05 17:22:39 +00:00
Duncan Sands
55cd6cb141 Use llvm.foo as the intrinsic, rather than llvm.dbg.value. Since the
values passed to llvm.dbg.value were not valid for the intrinsic, it
might have caused trouble one day if the verifier ever started checking
for valid debug info.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103038 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-04 20:09:25 +00:00
Chris Lattner
d4ac35b350 "on the rare occasion the SPU BE produces illegal assembly - it tries to emit an add instruction of the form 'a reg, reg, imm'."
Patch by Kalle Raiskila!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103021 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-04 17:58:46 +00:00
Daniel Dunbar
e9f0fb4179 MC/X86: Chris pointed that 'as' isn't consistent in accepting the long form of
instructions which have no direct register usage.

Darwin 'as' accepts:
  add $0, (%rax)
but rejects
  mov $0, (%rax)
for example.

Given that, only accept suffix matches which match exactly one form. We still
need to emit nice diagnostics for failures...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103015 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-04 17:31:02 +00:00
Daniel Dunbar
c918d6043b MC/X86: Add "support" for matching ATT style mnemonic prefixes.
- The idea is that when a match fails, we just try to match each of +'b', +'w',
   +'l'. If exactly one matches, we assume this is a mnemonic prefix and accept
   it. If all match, we assume it is width generic, and take the 'l' form.

 - This would be a horrible hack, if it weren't so simple. Therefore it is an
   elegant solution! Chris gets the credit for this particular elegant
   solution. :)

 - Next step to making this more robust is to have the X86 matcher generate the
   mnemonic prefix information. Ideally we would also compute up-front exactly
   which mnemonic to attempt to match, but this may require more custom code in
   the matcher than is really worth it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103012 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-04 16:12:42 +00:00
Duncan Sands
203f7cb68b Fix a variant of PR6112 found by thinking about it: when doing
RAUW of a global variable with a local variable in function F,
if function local metadata M in function G was using the global
then M would become function-local to both F and G, which is not
allowed.  See the testcase for an example.  Fixed by detecting
this situation and zapping the metadata operand when it occurs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103007 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-04 12:43:36 +00:00
Devang Patel
9c488376ef Set DW_AT_APPLE_omit_frame_ptr in endFunction() where MachineFunction is available all the time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103001 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-04 06:15:30 +00:00
Devang Patel
01c5ff6437 Do not ignore debug loc attached with llvm.dbg.declare while collecting debug info used by a module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102995 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-04 01:05:02 +00:00
Dale Johannesen
08673d2950 Implement builtin_return_address(x) and builtin_frame_address(x)
on PPC for x!=0.  7624113.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102972 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-03 22:59:34 +00:00
Jakob Stoklund Olesen
b98c549d13 Check that subregisters don't have independent values in RemoveCopyByCommutingDef().
This fixes PR6941.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102970 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-03 22:40:32 +00:00
Dan Gohman
d4d01154ef Fix tests to use fadd, fsub, and fmul, instead of add, sub, and mul,
when the type is floating-point.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102969 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-03 22:36:46 +00:00
Bill Wendling
cec9c50924 Revert r102948.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102964 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-03 21:51:21 +00:00
Kevin Enderby
9d0838fba8 Changed llvm-mc to use the same suffixes with floating point compare
instructions as the Mac OS X darwin assembler.  Some of which like 'fcoml'
assembled to different opcodes.  While some of the suffixes were just different.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102958 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-03 21:31:40 +00:00
Kevin Enderby
eb612347f4 Fixed the encoding of two of the X86 movq instuctions. The Move quadword from
mm to mm/m64 and the Move quadword from xmm2/mem64 to xmm1 had the incorrect
encodings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102952 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-03 21:03:31 +00:00
Kevin Enderby
3c979b06c0 Fixed the encoding of the x86 push instructions. Using a 32-bit immediate value
caused the a pushl instruction to be incorrectly encoding using only two bytes
of immediate, causing the following 2 instruction bytes to be part of the 32-bit
immediate value.  Also fixed the one byte form of push to be used when the
immediate would fit in a signed extended byte.  Lastly changed the names to not
include the 32 of PUSH32 since they actually push the size of the stack pointer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102951 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-03 20:45:05 +00:00
Bill Wendling
5f84c0293f Testcase for r102947.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102948 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-03 20:39:35 +00:00
Devang Patel
86b6f80a4c Check for side effects before splitting loop.
Patch by Jakub Staszak!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102928 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-03 18:06:58 +00:00
Dan Gohman
30fc5bbfd1 Fix a bug which prevented tail merging of return instructions in
beneficial cases. See the changes in test/CodeGen/X86/tail-opts.ll and
test/CodeGen/ARM/ifcvt2.ll for details.

The fix is to change HashEndOfMBB to hash at most one instruction,
instead of trying to apply heuristics about when it will be profitable to
consider more than one instruction. The regular tail-merging heuristics
are already prepared to handle the same cases, and they're more precise.

Also, make test/CodeGen/ARM/ifcvt5.ll and
test/CodeGen/Thumb2/thumb2-branch.ll slightly more complex so that they
continue to test what they're intended to test.

And, this eliminates the problem in
test/CodeGen/Thumb2/2009-10-15-ITBlockBranch.ll, the testcase from
PR5204. Update it accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102907 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-03 14:35:47 +00:00
Duncan Sands
57b6e9eb6c Remove the -enable-sjlj-eh option, which doesn't do anything.
Remove the -enable-eh option which is only used by the JIT,
and replace it with -jit-enable-eh.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102865 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-02 15:36:26 +00:00