Commit Graph

9170 Commits

Author SHA1 Message Date
Kevin Enderby
12ce0de462 Added support for X86 instruction prefixes so llvm-mc can assemble them. The
Lock prefix, Repeat string operation prefixes and the Segment override prefixes.
Also added versions of the move string and store string instructions without the
repeat prefixes to X86InstrInfo.td. And finally marked the rep versions of
move/store string records in X86InstrInfo.td as isCodeGenOnly = 1 so tblgen is
happy building the disassembler files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95252 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-03 21:04:42 +00:00
Daniel Dunbar
9e2556c7bf Add llvm_supports_darwin_and_target to DejaGNU as well, I'd almost forgotten it
ever existed. :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95230 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-03 18:43:46 +00:00
Evan Cheng
febc81680c Revert 94937 and move the noreturn check to codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95198 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-03 03:55:59 +00:00
Evan Cheng
86809ccdad Allow all types of callee's to be tail called. But avoid automatic tailcall if the callee is a result of bitcast to avoid losing necessary zext / sext etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95195 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-03 03:28:02 +00:00
Dale Johannesen
9a6636b2cd Reapply 95050 with a tweak to check the register class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95183 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-03 01:40:33 +00:00
Chris Lattner
e0bb20cc03 make these less sensitive to asm verbose changes by disabling it for them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95175 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-03 00:48:53 +00:00
Eric Christopher
0c6a8f9eda Recommit this, looks like it wasn't the cause.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95165 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-03 00:21:58 +00:00
Daniel Dunbar
e7070e9006 AsmParser/X86: Add temporary hack to allow parsing "sal". Eventually we need
some mechanism for specifying alternative syntaxes, but I'm not sure what form
that should take yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95158 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 23:46:47 +00:00
Eric Christopher
9f34dd305b Hopefully temporarily revert this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95154 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 23:01:31 +00:00
Chris Lattner
4105155231 remove the # TAILCALL markers, which was causing the to fail.
It's unclear if the matcher is nondeterminstic of what here,
but I'm getting matches without TAILCALL and some other hosts
are getting matches with it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95149 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 22:36:29 +00:00
Eric Christopher
a6a089cd24 Re-add strcmp and known size object size checking optimization.
Passed bootstrap and nightly test run here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95145 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 22:10:43 +00:00
Daniel Dunbar
197f1f0246 MCAssembler/Darwin: Add a test (on Darwin) that we assemble a bunch of
instructions exactly like 'as', and produce equivalent .o files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95143 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 22:00:15 +00:00
Daniel Dunbar
e1ec617c6a MC/Mach-O: Set SOME_INSTRUCTIONS bit for sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95135 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 21:44:01 +00:00
Chris Lattner
1de46a4ab5 this apparently depends on the host somehow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95122 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 20:57:28 +00:00
Bill Wendling
3900837ca6 XFAIL for PPC Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95121 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 20:56:02 +00:00
Chris Lattner
d56f80358b disable this test for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95120 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 20:41:39 +00:00
Kevin Enderby
82a5946939 Added another version of the X86 assembler matcher test case.
This test case is different subset of the full auto generated test case, and a
larger subset that is in x86_32-bit.s (that set will encode correctly).  These
instructions can pass though llvm-mc as it were a logical cat(1) and then
reassemble to the same instruction.  It is useful as we bring up the parser and
matcher so we don't break things that currently work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95107 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 19:05:57 +00:00
Dale Johannesen
62a04136d5 Test revert 95050; there's a good chance it's causing
buildbot failure.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95103 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 18:52:56 +00:00
Chris Lattner
39ceb471b7 don't turn (A & (C0?-1:0)) | (B & ~(C0?-1:0)) -> C0 ? A : B
for vectors.  Codegen is generating awful code or segfaulting
in various cases (e.g. PR6204).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95058 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 02:43:51 +00:00
Chris Lattner
3d606bbc92 fix a crash in loop unswitch on a loop invariant vector condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95055 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 02:26:54 +00:00
Chris Lattner
f96f1e013c remove an unreduced testcase, rename another.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95054 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 02:23:37 +00:00
Evan Cheng
b2c9290a01 Perform sibcall in some cases when arguments are passes memory. Look for cases
where callee's arguments are already in the caller's own caller's stack and
they line up perfectly. e.g.

extern int foo(int a, int b, int c);

int bar(int a, int b, int c) {
  return foo(a, b, c);
}


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95053 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 02:22:50 +00:00
Dale Johannesen
5ce0ee9c09 Make local RA smarter about reusing input register of a copy
as output.  Needed for (functional) correctness in inline asm,
and should be generally beneficial.  7361612.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95050 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 02:08:02 +00:00
Dan Gohman
6acb86dcfa Factor out alignof expression folding into a separate function and
generalize it to handle more cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95045 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 01:41:39 +00:00
Dale Johannesen
5e280a306a Testcase for 94996 (PR 6157)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95021 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 22:46:05 +00:00
Evan Cheng
7276c8c2b5 Fix PR6196. GV callee may not be a function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95017 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 22:40:09 +00:00
Evan Cheng
e7ea6fd7cb Add test case for 95013.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95014 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 22:32:42 +00:00
Chris Lattner
6304b0dd63 fix PR6195, a bug constant folding scalar -> vector compares.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94997 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 20:04:40 +00:00
Chris Lattner
b63127d435 fix PR6197 - infinite recursion in ipsccp due to block addresses
evaluateICmpRelation wasn't handling blockaddress.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94993 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 19:35:08 +00:00
Dan Gohman
a00ef1122c Update this test for a trivial register allocation difference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94989 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 19:00:32 +00:00
Dan Gohman
4f8eea82d8 Generalize target-independent folding rules for sizeof to handle more
cases, and implement target-independent folding rules for alignof and
offsetof. Also, reassociate reassociative operators when it leads to
more folding.

Generalize ScalarEvolution's isOffsetOf to recognize offsetof on
arrays. Rename getAllocSizeExpr to getSizeOfExpr, and getFieldOffsetExpr
to getOffsetOfExpr, for consistency with analagous ConstantExpr routines.

Make the target-dependent folder promote GEP array indices to
pointer-sized integers, to make implicit casting explicit and exposed
to subsequent folding.

And add a bunch of testcases for this new functionality, and a bunch
of related existing functionality.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94987 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 18:27:38 +00:00
Chris Lattner
d569561835 fix rdar://7590304, a miscompilation of objc apps on arm. The caller
of objc message send was getting marked arm_apcscc, but the prototype
isn't.  This is fine at runtime because objcmsgsend is implemented in
assembly.  Only turn a mismatched caller and callee into 'unreachable'
if the callee is a definition.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94986 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 18:11:34 +00:00
Chris Lattner
830f3f205d fix rdar://7590304, an infinite loop in instcombine. In the invoke
case, instcombine can't zap the invoke for fear of changing the CFG.
However, we have to do something to prevent the next iteration of
instcombine from inserting another store -> undef before the invoke
thereby getting into infinite iteration between dead store elim and
store insertion.

Just zap the callee to null, which will prevent the next iteration
from doing anything.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94985 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 18:04:58 +00:00
Evan Cheng
0a4fd46d9e Undo r94946 now all the tests are passing again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94970 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 02:13:39 +00:00
Evan Cheng
843bd699f6 Avoid recursive sibcall's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94946 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-31 06:44:49 +00:00
Eli Friedman
b406c47ea9 Remove test which is no longer relevant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94944 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-31 04:40:45 +00:00
Eli Friedman
be7cfa6033 Simplify/generalize the xor+add->sign-extend instcombine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94943 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-31 04:29:12 +00:00
Eli Friedman
694488f477 Add a small transform: transform -(X<<Y) to (-X<<Y) when the shift has a single
use and X is free to negate.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94941 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-31 02:30:23 +00:00
Evan Cheng
56a5886b20 Do not mark no-return calls tail calls. It'll screw up special calls like longjmp and it doesn't make much sense for performance reason. If my logic is faulty, please let me know.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94937 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-31 00:59:31 +00:00
Anton Korobeynikov
90cfc130d6 Fix a gross typo: ARMv6+ may or may not support unaligned memory operations.
Even if they are suported by the core, they can be disabled
(this is just a configuration bit inside some register).

Allow unaligned memops on darwin and conservatively disallow them otherwise.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94889 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-30 14:08:12 +00:00
Bob Wilson
49db68fba0 Check alignment of loads when deciding whether it is safe to execute them
unconditionally.  Besides checking the offset, also check that the underlying
object is aligned as much as the load itself.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94875 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-30 04:42:39 +00:00
Evan Cheng
a6bff982c1 Allow more tailcall optimization: calls with inputs that are all passed in registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94873 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-30 01:22:00 +00:00
Daniel Dunbar
b834f5d13d MC/X86 AsmParser: Handle absolute memory operands correctly. We were doing
something totally broken and parsing them as immediates, but the .td file also
had the wrong match class so things sortof worked. Except, that is, that we
would parse
  movl $0, %eax
as
  movl 0, %eax
Feel free to guess how well that worked.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94869 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-30 01:02:48 +00:00
Bob Wilson
8ad1f0e284 Remove ARM-specific calling convention from this test. Target data is
needed for this test, but otherwise, there's nothing ARM-specific about
it and no need to specify the calling convention.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94862 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-30 00:40:23 +00:00
Daniel Dunbar
50459580e7 MC/X86: Add a nice X86 assembler matcher test case from Kevin Enderby.
- This test case is auto generated, and has been verified to round-trip
   correctly through llvm-mc by checking the assembled .o file before and after
   piping through llvm-mc. It will be extended over time as the matcher grows
   support for more instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94857 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-29 23:32:40 +00:00
Eric Christopher
36664bfc7a Revert my last couple of patches. They appear to have broken bison.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94841 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-29 21:16:24 +00:00
Bob Wilson
3eb4f7e2dd Improve isSafeToLoadUnconditionally to recognize that GEPs with constant
indices are safe if the result is known to be within the bounds of the
underlying object.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94829 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-29 19:19:08 +00:00
Evan Cheng
7096ae48c9 Catch more trivial tail call opportunities: no inputs and output types match.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94804 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-29 06:45:59 +00:00
Eric Christopher
407e47c21e Make strcpy_chk lower to strcpy if we have a safe size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94783 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-29 01:37:11 +00:00
Eric Christopher
949124ce0f Add constant support to object size handling and remove default
lowering. We'll either figure it out, or not and be lowered by
SelectionDAGBuild.

Add test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94775 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-29 01:09:57 +00:00
Dan Gohman
8ca83b4111 Remove the folding rule
getelementptr (i8* inttoptr (i64 1 to i8*), i32 -1) 
  to
  inttoptr (i64 0 to i8*)
from the VMCore constant folder. It didn't handle sign-extension properly
in the case where the source integer is smaller than a pointer size. And,
it relied on an assumption about sizeof(i8).

The Analysis constant folder still folds these kinds of things; it has
access to TargetData, so it can do them right.

Add a testcase which tests that the VMCore constant folder doesn't
miscompile this, and that the Analysis folder does fold it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94750 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 18:08:26 +00:00
Duncan Sands
2c47368a7d Fix PR6165. The bug was that LHSKnownZero was being and'd with DemandedMask
when it should have been and'd with LowBits.  Fix that and while there beef
up the logic in the case of a negative LHS.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94745 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 17:22:42 +00:00
Chris Lattner
a34103f6fa convert the last 3 targets to use EmitFunctionBody() now that
it has before/end body hooks.

 lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp |   49 ++-----------
 lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp   |   87 ++++++------------------
 lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp |   56 +++------------
 test/CodeGen/XCore/ashr.ll                      |    2 
 4 files changed, 48 insertions(+), 146 deletions(-)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94741 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 06:22:43 +00:00
Evan Cheng
5fef8bc1cb Fix a bug introduced by r94490 where it created a X86ISD::CMP whose output type is different from its inputs.
This fixes PR6146.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94731 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 01:57:22 +00:00
Chris Lattner
d49fe1b6bc Give AsmPrinter the most common expected implementation of
runOnMachineFunction, and switch PPC to use EmitFunctionBody.
The two ppc asmprinters now don't heave to define 
runOnMachineFunction.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94722 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 01:28:58 +00:00
Chris Lattner
10e7c60c04 emit a 0 byte instead of a noop if a function is empty on darwin.
"0" is nice and target independent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94718 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 01:06:32 +00:00
Bob Wilson
e98585eb36 Avoid creating redundant PHIs in SSAUpdater::GetValueInMiddleOfBlock.
This was already being done in SSAUpdater::GetValueAtEndOfBlock so I've
just changed SSAUpdater to check for existing PHIs in both places.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94690 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 22:01:02 +00:00
Chandler Carruth
6f03433516 Quick fix to a test that is currently failing on every Linux build bot. No idea
if this is the "correct" fix, but it seems a strict improvement.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94675 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 10:36:15 +00:00
Duncan Sands
bc15f242d5 Revert commit 94666 (ddunbar) [Suppress clang warning about unused arguments].
It causes g++ to complain: unrecognized option '-Qunused-arguments'


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94670 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 10:08:08 +00:00
Daniel Dunbar
ed240c474d Suppress clang warning about unused arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94666 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 07:10:10 +00:00
Evan Cheng
b17124553d Perform trivial tail call optimization for callees with "C" ABI. These are done
even when -tailcallopt is not specified and it does not require changing ABI.
First case is the most trivial one. Perform tail call optimization when both
the caller and callee do not return values and when the callee does not take
any input arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94664 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 06:25:16 +00:00
Victor Hernandez
b7ae53f035 When converting dbg.declare to dbg.value, attach promoted store's debug metadata to dbg.value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94634 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 00:44:36 +00:00
Chris Lattner
c618c8aff4 emit jump table an alias ".set" directives through MCStreamer as
assignments.

.set x, a-b

is the same as:

x = a-b



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94596 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 21:53:08 +00:00
Rafael Espindola
2e2563bf8e Emit .comm alignment in bytes but .align in powers of 2 for ARM ELF.
Original patch by Sandeep Patel and updated by me.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94582 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 20:21:43 +00:00
Chris Lattner
6a315c358c eliminate MCAsmInfo::NeedsSet: we now just use .set on any platform
that has it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94581 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 20:20:43 +00:00
Dan Gohman
8a977e2edd -disable-output is no longer needed with -analyze.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94574 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 19:25:59 +00:00
Dan Gohman
52fddd3e36 Fix the the ceiling-division used in computing the MaxBECount so that it doesn't
have trouble with an intermediate add overflowing. Also, be more conservative
about the case where the induction variable in an SLT loop exit can step past
the RHS of the SLT and overflow in a single step.

Make getSignedRange more aggressive, to recover for some common cases which
the above fixes pessimized.

This addresses rdar://7561161.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94512 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 04:40:18 +00:00
Victor Hernandez
b9768b0731 In mem2reg, for all alloca/stores that get promoted where the alloca has an associated llvm.dbg.declare instrinsic, insert an llvm.dbg.var intrinsic before each store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94493 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 02:42:15 +00:00
Evan Cheng
8c7ecaf524 Implement cond ? -1 : 0 with sbb.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94490 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 02:00:44 +00:00
Dale Johannesen
5ed17ae92a Generate DEBUG_VALUE comments on x86. The (limited)
dbg.declare's we currently generate go through both
register allocators without perturbing the results.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94480 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 00:09:58 +00:00
Dan Gohman
26793ed974 Fix the bitcode reader to deserialize nuw/nsw/etc. bits properly in the case
of a forward-reference, which doesn't use an "abbrev" encoding.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94454 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 21:55:39 +00:00
Chris Lattner
d32e803073 wirte up .file and .file to the mc asmparser.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94438 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 19:02:58 +00:00
Victor Hernandez
aee6a656e8 Revert r94260 until findDbgDeclare() is made more efficient
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94432 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 17:52:13 +00:00
Rafael Espindola
0173b74c55 Update test for darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94421 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 15:32:10 +00:00
Chris Lattner
5c78034bc8 we removed support for darwin8 tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94414 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 07:43:40 +00:00
Rafael Espindola
f166ed7324 Fix PR6134.
We are not emitting alignments on Darwin for "bar". Not sure what is the
correct way to do it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94400 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 02:27:39 +00:00
Daniel Dunbar
34b6ea6cef Attempt to unbreak test on Linux. Chris, please check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94399 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 00:54:13 +00:00
Chris Lattner
4e4af5978c just remove this test, it is not reduced, is not clear what its testing for and
it is dying due to fragility in the asmprinter .s comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94372 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 19:23:09 +00:00
Chris Lattner
6d1041eee3 this test has been failing or a long time, just disable it for now to get
back to green.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94371 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 19:13:39 +00:00
Chris Lattner
75f265fbbb fix a parsing problem on instructions like:
movw	$8, (_cost_table_-L97$pb)+66(%eax)

After the parens, we could still have a binop.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94345 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 01:07:33 +00:00
Mon P Wang
6fb474bd3c It seems better to scalarize vectors of size 1 instead of widening them.
Add support to widen SETCC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94342 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 00:24:43 +00:00
Chris Lattner
abb992d6a3 change the canonical form of "cond ? -1 : 0" to be
"sext cond" instead of a select.  This simplifies some instcombine
code, matches the policy for zext (cond ? 1 : 0 -> zext), and allows
us to generate better code for a testcase on ppc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94339 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 00:09:49 +00:00
Mon P Wang
eb38ebf15c Improved widening loads by adding support for wider loads if
the alignment allows.  Fixed a bug where we didn't use a
vector load/store for PR5626.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94338 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 00:05:03 +00:00
Nick Lewycky
44540740ae Speculatively revert r94322 to see if it fixes darwin selfhost buildbot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94331 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 20:32:12 +00:00
Chris Lattner
d668839cb9 third bug from PR6119: the xor dupe extension allows
for arbitrary terminators in predecessors, don't assume
it is a conditional or uncond branch.  The testcase shows
an example where they can happen with switches.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94323 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 19:21:31 +00:00
Nick Lewycky
dbeecede80 Teach DAE that even though it can't modify the function signature of an
externally visible function, it can still find all callers of it and replace
the parameters to a dead argument with undef.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94322 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 19:19:34 +00:00
Chris Lattner
2dd7657a5b add an early out to ProcessBranchOnXOR to speed it up,
handle the case when we can infer an input to the xor
from all inputs that agree, instead of going into an
infinite loop.  Another part of PR6199


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94321 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 19:16:25 +00:00
Chris Lattner
8231fd1e6c fix a crash in jump threading, PR6119
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94319 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 18:56:07 +00:00
Chris Lattner
818ff34bc0 implement a simple instcombine xform that has been in the
readme forever.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94318 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 18:49:30 +00:00
Chris Lattner
52492ac0d0 Change constantexpr global variable initializers to convert the constants
to MCExpr then emit them through MCStreamer with EmitValue.  I think all
global variable initializers are now going through mcstreamer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94293 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 06:17:14 +00:00
Eric Christopher
e9625cf698 Don't lower splat vector load to relative to the esp if the
stack may be misaligned.

Update test accordingly.

Patch by Evan Cheng!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94291 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 06:02:43 +00:00
Chris Lattner
63df4a4fec stop testing for invalid output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94288 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 05:45:28 +00:00
Chris Lattner
05f845314a emit .ascii and .asciz through MCStreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94282 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 04:54:10 +00:00
Mon P Wang
e4a0a151a5 InstCombine should not fold sext/zext of a vector and a bitcast to a scalar to a sext/zext
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94280 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 04:35:57 +00:00
Chris Lattner
4fe5d72765 remove this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94276 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 03:11:10 +00:00
Evan Cheng
796263464d Fix test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94272 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 01:21:27 +00:00
Evan Cheng
4d03ca0702 Fix tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94271 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 01:19:28 +00:00
Victor Hernandez
b6aebc2f46 In mem2reg, for all alloca/stores that get promoted where the alloca has an associated llvm.dbg.declare instrinsic, insert an llvm.dbg.var intrinsic before each store
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94260 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 00:17:34 +00:00
Chris Lattner
12e555c36c teach MCAsmStreamer::EmitBytes to use .ascii and .asciz
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94259 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 00:15:00 +00:00
Daniel Dunbar
8a3ee718cd Mark EH_RETURN64 as CodeGenOnly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94205 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 20:16:37 +00:00