1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

23132 Commits

Author SHA1 Message Date
Chris Lattner
7a7da4f9c3 Implement PR2370: memmove(x,x,size) -> noop.
llvm-svn: 51636
2008-05-28 05:30:41 +00:00
Chris Lattner
857e1e9cab Add chain inputs for loads.
llvm-svn: 51635
2008-05-28 04:25:57 +00:00
Chris Lattner
93047192f3 Fix CodeGen/Generic/2005-10-21-longlonggtu.ll on ia64.
llvm-svn: 51634
2008-05-28 04:14:30 +00:00
Chris Lattner
294b436abf loads should get chains. THis helps but does not solve CodeGen/Generic/2003-05-27-phifcmpd.ll
on ia64.

llvm-svn: 51633
2008-05-28 04:06:52 +00:00
Chris Lattner
d33dececf3 Fix 2006-04-28-Sign-extend-bool.ll for ia64.
llvm-svn: 51632
2008-05-28 04:00:06 +00:00
Chris Lattner
569e867c01 reindent.
llvm-svn: 51631
2008-05-28 03:59:32 +00:00
Dan Gohman
a5549a2f9c Fix the encoding for two more "rm" instructions that were using MRMSrcReg.
llvm-svn: 51630
2008-05-28 01:50:19 +00:00
Mon P Wang
8e37b2d13e Fixed X86 encoding error CVTPS2PD and CVTPD2PS when the source operand
is a memory location

llvm-svn: 51626
2008-05-28 00:42:27 +00:00
Nate Begeman
23dd264da6 Don't attempt to create VZEXT_LOAD out of an extload. This an issue where the
code generator would do something like this:

f64 = load f32 <anyext>, f32mem
v2f64 = insertelt undef, %0, 0
v2f64 = insertelt %1, 0.0, 1

into 

v2f64 = vzext_load f32mem

which on x86 is movsd, when you really wanted a cvtss2sd/movsd pair.

llvm-svn: 51624
2008-05-28 00:24:25 +00:00
Dan Gohman
4b11213552 Use Function::getEntryBlock instead of Function::begin, for clarity.
llvm-svn: 51613
2008-05-27 20:55:29 +00:00
Dan Gohman
327d2c6167 Print debug output when any edge becomes executable, including
the first visited edge.

llvm-svn: 51612
2008-05-27 20:47:30 +00:00
Bill Wendling
e5d738e779 Incorporated feedback: Check that the implicitly defined operands aren't used
before deleting the instruction.

llvm-svn: 51609
2008-05-27 20:40:52 +00:00
Dan Gohman
92d5dff525 Tidy up whitespace in ConstantRange::print output.
llvm-svn: 51606
2008-05-27 20:29:07 +00:00
Gabor Greif
2abf6ec2e5 back out last commit: The .cpp file for a module should include its corresponding header first, even if redundant.
llvm-svn: 51598
2008-05-27 17:26:02 +00:00
Duncan Sands
4757a8dd76 Fix some constructs that gcc-4.4 warns about.
llvm-svn: 51591
2008-05-27 11:50:51 +00:00
Gabor Greif
0b9cf0d491 prune unneeded #includes
llvm-svn: 51590
2008-05-27 11:06:03 +00:00
Gabor Greif
0fb81af839 remove unneeded reinterpret_casts
llvm-svn: 51589
2008-05-27 11:03:29 +00:00
Gabor Greif
b93cb3dc6f We have the correct headers included to know that BB isa Value. No reinterpret_cast necessary.
llvm-svn: 51588
2008-05-27 10:48:39 +00:00
Nick Lewycky
230db50d91 InequalityGraph::node() can create new nodes, invalidating iterators across
the set of nodes. Fix makeEqual to handle this by creating the new node first
then iterating across them second.

llvm-svn: 51573
2008-05-27 00:59:05 +00:00
Nick Lewycky
bc54ac9d10 Grammaro.
llvm-svn: 51572
2008-05-26 22:49:36 +00:00
Gabor Greif
e052a42a62 eliminate calls to deprecated Use::init() interface
llvm-svn: 51570
2008-05-26 21:33:52 +00:00
Duncan Sands
fa995d7cc5 Factor code to copy global value attributes like
the section or the visibility from one global
value to another: copyAttributesFrom.  This is
particularly useful for duplicating functions:
previously this was done by explicitly copying
each attribute in turn at each place where a
new function was created out of an old one, with
the result that obscure attributes were regularly
forgotten (like the collector or the section).
Hopefully now everything is uniform and nothing
is forgotten.

llvm-svn: 51567
2008-05-26 19:58:59 +00:00
Owen Anderson
15d473d75a Use a DenseMap instead of an std::map, speeding up the testcase in PR2368 by about a third.
llvm-svn: 51565
2008-05-26 10:07:43 +00:00
Bill Wendling
87ca2e8a41 The enabling of remat in 2-address conversion breaks this test:
Running /Users/void/llvm/llvm.src/test/CodeGen/X86/dg.exp ...
FAIL: /Users/void/llvm/llvm.src/test/CodeGen/X86/2007-11-30-LoadFolding-Bug.ll
Failed with exit(1) at line 1
while running: llvm-as < /Users/void/llvm/llvm.src/test/CodeGen/X86/2007-11-30-LoadFolding-Bug.ll | llc -march=x86 -mattr=+sse2 -stats |&  grep {1 .*folded into instructions}
child process exited abnormally

Make this conditional for now.

llvm-svn: 51563
2008-05-26 05:49:49 +00:00
Bill Wendling
62fae6aeee A problem that's exposed when machine LICM is enabled. Consider this code:
LBB1_3:   # bb
...
        xorl    %ebp, %ebp
        subl    (%ebx), %ebp
...
        incl    %ecx
        cmpl    %edi, %ecx
        jl      LBB1_3  # bb

Whe using machine LICM, LLVM converts it into:

        xorl %esi, %esi
LBB1_3: # bb
...
        movl    %esi, %ebp
        subl    (%ebx), %ebp
...
        incl    %ecx
        cmpl    %edi, %ecx
        jl      LBB1_3  # bb

Two address conversion inserts the copy instruction. However, it's cheaper to
rematerialize it, and remat helps reduce register pressure.

llvm-svn: 51562
2008-05-26 05:18:34 +00:00
Nick Lewycky
f24743a6bb Don't treat values as signed when looking at loop steppings in HowForToNonZero.
llvm-svn: 51560
2008-05-25 23:43:32 +00:00
Nick Lewycky
744dad8004 "ret (constexpr)" can't be folded into a Constant. Add a method to
Analysis/ConstantFolding to fold ConstantExpr's, then make instcombine use it
to try to use targetdata to fold constant expressions on void instructions.

Also extend the icmp(inttoptr, inttoptr) folding to handle the case where
int size != ptr size.

llvm-svn: 51559
2008-05-25 20:56:15 +00:00
Owen Anderson
72cb477348 Create archives with the same permissions are ar.
Patch by Mikael Lepistö.

llvm-svn: 51540
2008-05-24 05:42:29 +00:00
Chris Lattner
a9c89da681 Add FreeBSD/PPC support, patch by Marcel Moolenaar!
llvm-svn: 51538
2008-05-24 04:58:48 +00:00
Chris Lattner
3def8b4e53 Fix a serious brain-o. Obviously no-one reviewed my patch :(
This fixes PR2359

llvm-svn: 51536
2008-05-24 04:06:28 +00:00
Chris Lattner
bde5fd685d Fix PR2358 by resolving calls with undef arguments to overdefined.
llvm-svn: 51535
2008-05-24 03:59:33 +00:00
Evan Cheng
e5e0b4660d Eliminate x86.sse2.punpckh.qdq and x86.sse2.punpckl.qdq.
llvm-svn: 51533
2008-05-24 02:56:30 +00:00
Evan Cheng
564238c841 Eliminate x86.sse2.movs.d, x86.sse2.shuf.pd, x86.sse2.unpckh.pd, and x86.sse2.unpckl.pd intrinsics. These will be lowered into shuffles.
llvm-svn: 51531
2008-05-24 02:14:05 +00:00
Duncan Sands
69bebf19a7 Tweak how ConstantFP80Ty constants are output
so that gcc doesn't warn about them.

llvm-svn: 51529
2008-05-24 01:00:52 +00:00
Dale Johannesen
2704d9e1bc Put initialized const weak objects into correct
sections on ppc32 darwin.  g++.dg/abi/key2.C

llvm-svn: 51527
2008-05-24 00:10:20 +00:00
Evan Cheng
d312ced1cf This is done.
llvm-svn: 51526
2008-05-24 00:10:13 +00:00
Evan Cheng
365e0f3932 Autoupgrade x86.sse2.loadh.pd and x86.sse2.loadl.pd.
llvm-svn: 51523
2008-05-24 00:08:39 +00:00
Evan Cheng
98a292a302 Remove x86.sse2.loadh.pd and x86.sse2.loadl.pd. These will be lowered into load and shuffle instructions.
llvm-svn: 51522
2008-05-24 00:07:29 +00:00
Evan Cheng
47bd4b07a8 Remove x86.sse2.loadh.pd and x86.sse2.loadl.pd. These will be lowered into load and shuffle instructions.
llvm-svn: 51521
2008-05-24 00:07:06 +00:00
Evan Cheng
50abc2a7f1 Revert 51440 as it breaks a bunch of PIC tests.
llvm-svn: 51513
2008-05-23 23:00:04 +00:00
Dan Gohman
abbe3d47ab Don't silently truncate array extents to 32 bits.
llvm-svn: 51505
2008-05-23 21:40:55 +00:00
Dale Johannesen
0c2dcb3cb0 Add a missed CommonLinkage check.
llvm-svn: 51503
2008-05-23 21:33:27 +00:00
Evan Cheng
4f660778f0 Use movlps / movhps to modify low / high half of 16-byet memory location.
llvm-svn: 51501
2008-05-23 21:23:16 +00:00
Dan Gohman
8b6f4366ae Tidy up BasicBlock::getFirstNonPHI, and change a bunch of places to
use it instead of duplicating its functionality.

llvm-svn: 51499
2008-05-23 21:05:58 +00:00
Dan Gohman
c877140168 Add #includes to make some dependencies explicit.
llvm-svn: 51496
2008-05-23 20:40:06 +00:00
Dan Gohman
d3610b38ac Issue errors in several situations instead of aborting.
llvm-svn: 51493
2008-05-23 18:23:11 +00:00
Dan Gohman
e8422fc112 Elaborate on the entry on integer vector multiplication by constants.
llvm-svn: 51491
2008-05-23 18:05:39 +00:00
Evan Cheng
ec8bd19399 Fix a duplicated pattern.
llvm-svn: 51490
2008-05-23 18:00:18 +00:00
Dan Gohman
6cc0b4f262 Use PMULDQ for v2i64 multiplies when SSE4.1 is available. And add
load-folding table entries for PMULDQ and PMULLD.

llvm-svn: 51489
2008-05-23 17:49:40 +00:00
Evan Cheng
e7ec4690e1 New entry.
llvm-svn: 51487
2008-05-23 17:28:11 +00:00