Chris Lattner
fdb9fda4af
make target independent.
...
llvm-svn: 95655
2010-02-09 06:36:30 +00:00
Chris Lattner
28b79c686d
merge a target-specific add test into x86 directory.
...
llvm-svn: 95654
2010-02-09 06:35:50 +00:00
Chris Lattner
34c420d11b
merge another test in, drop the trivially constant folded cases.
...
llvm-svn: 95653
2010-02-09 06:33:27 +00:00
Chris Lattner
ddb2e5a05c
consolidate and filecheckize two tests.
...
llvm-svn: 95652
2010-02-09 06:24:00 +00:00
Chris Lattner
e669789912
merge two tests, make target independent.
...
llvm-svn: 95651
2010-02-09 06:19:20 +00:00
Chris Lattner
26b712379f
fix PR6193, only considering sign extensions *from i1* for this
...
xform.
llvm-svn: 95642
2010-02-09 01:12:41 +00:00
Chris Lattner
682f64dc8d
Implement x86 asm parsing support for %st and %st(4)
...
llvm-svn: 95634
2010-02-09 00:49:22 +00:00
Eric Christopher
428b385575
Add a new pass to do llvm.objsize lowering using SCEV.
...
Initial skeleton and SCEVUnknown lowering implemented,
the rest should come relatively quickly. Move testcase
to new directory.
Move pass to right before SimplifyLibCalls - which is
moved down a bit so we can take advantage of a few opts.
llvm-svn: 95628
2010-02-09 00:35:38 +00:00
Chris Lattner
20be5fb012
convert to filecheck.
...
llvm-svn: 95608
2010-02-08 23:47:34 +00:00
Devang Patel
8f947ff5d6
test case for r95604.
...
llvm-svn: 95605
2010-02-08 23:27:46 +00:00
Chris Lattner
6162c89bfe
add an x86 implementation of MCTargetExpr for
...
representing @GOT and friends. Use it for
personality references as a first use.
llvm-svn: 95588
2010-02-08 22:09:08 +00:00
Dan Gohman
56b9ea088b
When CodeGen'ing unoptimized code, there may be unfolded constant expressions
...
in global initializers. Instead of aborting, attempt to fold them on the
spot. If folding succeeds, emit the folded expression instead.
This fixes PR6255.
llvm-svn: 95583
2010-02-08 22:02:38 +00:00
Dan Gohman
f113e5466c
In guaranteed tailcall mode, don't decline the tailcall optimization
...
for blocks ending in "unreachable".
llvm-svn: 95565
2010-02-08 20:34:14 +00:00
Evan Cheng
5541068ad3
Run codegen dce pass for all targets at all optimization levels. Previously it's
...
only run for x86 with fastisel. I've found it being very effective in
eliminating some obvious dead code as result of formal parameter lowering
especially when tail call optimization eliminated the need for some of the loads
from fixed frame objects. It also shrinks a number of the tests. A couple of
tests no longer make sense and are now eliminated.
llvm-svn: 95493
2010-02-06 09:07:11 +00:00
Evan Cheng
c3cfda4e7e
Remove a large test case that (soon will) no longer make sense.
...
llvm-svn: 95492
2010-02-06 09:00:30 +00:00
Rafael Espindola
b0bb1ddfe3
Fix alignment on ppc linux. This fixes the build of crtend.o
...
llvm-svn: 95477
2010-02-06 03:32:21 +00:00
Evan Cheng
de1a4726e6
Do not emit callseq instructions around sibcalls. This eliminated some unnecessary stack adjustments.
...
llvm-svn: 95475
2010-02-06 03:28:46 +00:00
Victor Hernandez
e65222a748
Function-local metadata whose operands had been optimized to no longer refer to function-local IR were not getting written by BitcodeWriter; solution is for these metadata to be enumerated just like global metadata.
...
llvm-svn: 95467
2010-02-06 01:21:09 +00:00
Bob Wilson
60fb5a2446
Add a test for my change to disable reassociation for i1 types.
...
llvm-svn: 95465
2010-02-06 01:16:25 +00:00
Bob Wilson
1a324958d6
Handle AddrMode6 (for NEON load/stores) in Thumb2's rewriteT2FrameIndex.
...
Radar 7614112.
llvm-svn: 95456
2010-02-06 00:24:38 +00:00
Jakob Stoklund Olesen
7b4c60adae
Don't unroll loops containing function calls.
...
llvm-svn: 95454
2010-02-05 23:21:31 +00:00
Chris Lattner
e1b8c529a4
fix incorrect encoding of SBB8mi that Kevin noticed.
...
llvm-svn: 95448
2010-02-05 22:56:11 +00:00
Chris Lattner
9d4e878b6a
fix a case where we'd mis-encode fisttp because of an incorrect (and
...
redundant with a correct one) pattern that was added for the disassembler.
llvm-svn: 95446
2010-02-05 22:49:06 +00:00
Chris Lattner
bec530a499
remove fixme
...
llvm-svn: 95444
2010-02-05 22:46:46 +00:00
Jakob Stoklund Olesen
670458b3be
Teach SimplifyCFG about magic pointer constants.
...
Weird code sometimes uses pointer constants other than null. This patch
teaches SimplifyCFG to build switch instructions in those cases.
Code like this:
void f(const char *x) {
if (!x)
puts("null");
else if ((uintptr_t)x == 1)
puts("one");
else if (x == (char*)2 || x == (char*)3)
puts("two");
else if ((intptr_t)x == 4)
puts("four");
else
puts(x);
}
Now becomes a switch:
define void @f(i8* %x) nounwind ssp {
entry:
%magicptr23 = ptrtoint i8* %x to i64 ; <i64> [#uses=1]
switch i64 %magicptr23, label %if.else16 [
i64 0, label %if.then
i64 1, label %if.then2
i64 2, label %if.then9
i64 3, label %if.then9
i64 4, label %if.then14
]
Note that LLVM's own DenseMap uses magic pointers.
llvm-svn: 95439
2010-02-05 22:03:18 +00:00
Chris Lattner
44965f1107
fix logical-select to invoke filecheck right, and fix hte instcombine
...
xform it is checking to actually pass. There is no need to match
m_SelectCst<0, -1> since instcombine canonicalizes that into not(sext).
Add matches for sext(not(x)) in addition to not(sext(x)).
llvm-svn: 95420
2010-02-05 19:53:02 +00:00
Eric Christopher
f89979ce6a
Remove this code for now. I have a better idea and will rewrite with
...
that in mind.
llvm-svn: 95402
2010-02-05 19:04:06 +00:00
Bill Wendling
c3f4101cc6
Make test more fucused eliminating extraneous bits.
...
llvm-svn: 95384
2010-02-05 11:21:05 +00:00
Evan Cheng
4b03f55de1
Fix test.
...
llvm-svn: 95373
2010-02-05 06:37:00 +00:00
Evan Cheng
81dde4c7f7
Handle tail call with byval arguments.
...
llvm-svn: 95351
2010-02-05 02:21:12 +00:00
Evan Cheng
94fe5501b7
When the scheduler unfold a load folding instruction it move some of the predecessors to the unfolded load. It decides what gets moved to the load by checking whether the new load is using the predecessor as an operand. The check neglects the cases whether the predecessor is a flagged scheduling unit.
...
rdar://7604000
llvm-svn: 95339
2010-02-05 01:27:11 +00:00
Bill Wendling
9761f067f8
An empty global constant (one of size 0) may have a section immediately
...
following it. However, the EmitGlobalConstant method wasn't emitting a body for
the constant. The assembler doesn't like that. Before, we were generating this:
.zerofill __DATA, __common, __cmd, 1, 3
This fix puts us back to that semantic.
llvm-svn: 95336
2010-02-05 00:17:02 +00:00
Jakob Stoklund Olesen
d72e82107d
Fix small bug in handling instructions with more than one implicitly defined operand.
...
ProcessImplicitDefs would only mark one operand per instruction with <undef>.
This fixed PR6086.
llvm-svn: 95319
2010-02-04 18:46:28 +00:00
Benjamin Kramer
707c8c5e00
Get the LLVMC tests working with clang++ by removing the problematic CXXFLAG in lit.
...
llvm-svn: 95318
2010-02-04 18:40:11 +00:00
Chris Lattner
43030eddcd
fix a broken archive that was breaking dejagnu only (not lit)
...
after r95292
llvm-svn: 95296
2010-02-04 07:11:08 +00:00
Evan Cheng
f5ee7fb571
Re-enable x86 tail call optimization.
...
llvm-svn: 95295
2010-02-04 06:47:24 +00:00
Eric Christopher
ee4a176739
Temporarily revert this since it appears to have caused a build
...
failure.
llvm-svn: 95294
2010-02-04 06:41:27 +00:00
Chris Lattner
e43007d443
add support for the sparcv9-*-* target triple to turn on
...
64-bit sparc codegen. Patch by Nathan Keynes!
llvm-svn: 95293
2010-02-04 06:34:01 +00:00
Chris Lattner
eabd2085d7
From PR6228:
...
"Attached patch removes the extra NUL bytes from the output and changes
test/Archive/MacOSX.toc from a binary to a text file (removes
svn:mime-type=application/octet-stream and adds svn:eol-style=native). I can't
figure out how to get SVN to include the new contents of the file in the patch
so I'm attaching it separately."
Patch by James Abbatiello!
llvm-svn: 95292
2010-02-04 06:19:43 +00:00
Eric Christopher
9b3e42f09e
Rework constant expr and array handling for objectsize instcombining.
...
Fix bugs where we would compute out of bounds as in bounds, and where
we couldn't know that the linker could override the size of an array.
Add a few new testcases, change existing testcase to use a private
global array instead of extern.
llvm-svn: 95283
2010-02-04 02:55:34 +00:00
Victor Hernandez
28f795182c
Fix (and test) function-local metadata that occurs before the instruction that it refers to; fix is to not enumerate operands of function-local metadata until after all instructions have been enumerated
...
llvm-svn: 95269
2010-02-04 01:13:08 +00:00
Eric Christopher
fe6ab1518e
If we're dealing with a zero-length array, don't lower to any
...
particular size, we just don't know what the length is yet.
llvm-svn: 95266
2010-02-03 23:56:07 +00:00
Dale Johannesen
c413673047
This test passes now on ppc darwin; if it doesn't pass
...
on some other ppc say something on the list.
llvm-svn: 95265
2010-02-03 22:33:17 +00:00
Dale Johannesen
0a85fd105b
This test passes now on ppc darwin, so reenable it.
...
llvm-svn: 95264
2010-02-03 22:29:02 +00:00
Dale Johannesen
ddc82307fa
Debugging is now reenabled on PPC darwin, so reenable
...
these tests (they pass).
llvm-svn: 95263
2010-02-03 22:24:49 +00:00
Evan Cheng
5c8b1b9164
Speculatively disable x86 automatic tail call optimization while we track down a self-hosting issue.
...
llvm-svn: 95259
2010-02-03 21:40:40 +00:00
Evan Cheng
ccbbdfa8c4
Make test less fragile
...
llvm-svn: 95258
2010-02-03 21:39:04 +00:00
Kevin Enderby
57859abd72
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.
llvm-svn: 95252
2010-02-03 21:04:42 +00:00
Daniel Dunbar
37b3f25e19
Add llvm_supports_darwin_and_target to DejaGNU as well, I'd almost forgotten it
...
ever existed. :)
llvm-svn: 95230
2010-02-03 18:43:46 +00:00
Evan Cheng
e273e42195
Revert 94937 and move the noreturn check to codegen.
...
llvm-svn: 95198
2010-02-03 03:55:59 +00:00