1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

5244 Commits

Author SHA1 Message Date
Chris Lattner
8871489ae7 remove empty file?
llvm-svn: 51225
2008-05-18 04:10:18 +00:00
Nick Lewycky
46e3a168c0 Revert constant-folding change that will miscompile in some cases.
llvm-svn: 51223
2008-05-17 19:00:05 +00:00
Nick Lewycky
1df40102a9 Constant fold inttoptr and ptrtoint.
llvm-svn: 51216
2008-05-17 09:03:26 +00:00
Evan Cheng
76aaaf62e8 Fix test.
llvm-svn: 51191
2008-05-16 17:08:51 +00:00
Owen Anderson
55b78bc887 Move this test from ADCE to loop deletion, where it is more appropriate.
llvm-svn: 51181
2008-05-16 04:34:19 +00:00
Owen Anderson
79a25ff8ec Use loop deletion instead of ADCE in these tests.
llvm-svn: 51180
2008-05-16 04:33:37 +00:00
Owen Anderson
d282184d18 Use loop deletion instead of ADCE for removing loops.
llvm-svn: 51178
2008-05-16 04:27:38 +00:00
Owen Anderson
3e607df2f8 Fix this test. It was testing broken behavior in that it required ADCE to eliminate
a potentially infinite loop, which is undesirable.  Instead, test the LICM behavior
that we're really interested in.

llvm-svn: 51177
2008-05-16 04:25:09 +00:00
Chris Lattner
00e8e1e258 implement PR2328.
llvm-svn: 51176
2008-05-16 02:59:42 +00:00
Dale Johannesen
4e46c5601d Use common where we mean common, not weak.
llvm-svn: 51173
2008-05-16 00:52:30 +00:00
Dan Gohman
fe7f6bc9ce Revert the change from r51157 in
test/Verifier/2002-11-05-GetelementptrPointers.ll, which was incorrect.
Instead, fix getIndexedType to not follow pointer types, as
PointerType is a subclass of CompositeType.

llvm-svn: 51171
2008-05-16 00:16:32 +00:00
Dan Gohman
2da4145cd8 Fix a bug in LoopStrengthReduce that caused it to emit IR with
use-before-def. The problem comes up in code with multiple PHIs where
one PHI is being rewritten in terms of the other, but the other needs
to be casted first. LLVM rules requre the cast instruction to be
inserted after any PHI instructions, but when instructions were
inserted to replace the second PHI value with a function of the first,
they were ended up going before the cast instruction. Avoid this
problem by remembering the location of the cast instruction, when one
is needed, and inserting the expansion of the new value after it.

This fixes a bug that surfaced in 255.vortex on x86-64 when
instcombine was removed from the middle of the loop optimization
passes. 

llvm-svn: 51169
2008-05-15 23:26:57 +00:00
Dale Johannesen
247e20c532 Remove the S92 code, which really has nothing to do
with what the test is testing; makes it pass again on ppc32.

llvm-svn: 51167
2008-05-15 22:23:54 +00:00
Dale Johannesen
f464bece2d Evan has implemented this on ppc, so run the test there.
llvm-svn: 51166
2008-05-15 22:22:37 +00:00
Dan Gohman
821bf58428 IR support for extractvalue and insertvalue instructions. Also, begin
moving toward making structs and arrays first-class types.

llvm-svn: 51157
2008-05-15 19:50:34 +00:00
Bill Wendling
c1d9f9604b Situations can arise when you have a function called that returns a 'void', but
is bitcast to return a floating point value. The result of the instruction may
not be used by the program afterwards, and LLVM will happily remove all
instructions except the call. But, on some platforms, if a value is returned as
a floating point, it may need to be removed from the stack (like x87). Thus, we
can't get rid of the bitcast even if there isn't a use of the value.

llvm-svn: 51134
2008-05-14 22:45:20 +00:00
Devang Patel
047ba6df54 Simplify internalize pass. Add test case.
Patch by Matthijs Kooijman!

llvm-svn: 51114
2008-05-14 20:01:01 +00:00
Dan Gohman
cd29e1fa60 When bit-twiddling CondCode values for integer comparisons produces
SETOEQ, is it does with (SETEQ & SETULE), map it to SETEQ.

llvm-svn: 51112
2008-05-14 18:17:09 +00:00
Tanya Lattner
ecd5a9390a Check if llvm-gcc is available before running tests. Patch by Matthijs Kooijman!
llvm-svn: 51108
2008-05-14 16:32:44 +00:00
Duncan Sands
d1ee8534e8 Make this test pass on x86-32 linux.
llvm-svn: 51099
2008-05-14 09:46:01 +00:00
Dale Johannesen
676a1d026b Fix for PR 2323, infinite loop in tail dup.
llvm-svn: 51063
2008-05-13 20:06:43 +00:00
Evan Cheng
9e15622879 Instead of a vector load, shuffle and then extract an element. Load the element from address with an offset.
pshufd $1, (%rdi), %xmm0
        movd %xmm0, %eax
=>
        movl 4(%rdi), %eax

llvm-svn: 51026
2008-05-13 08:35:03 +00:00
Owen Anderson
f67c06279b Add a testcase for non-local CSE of read-only calls.
llvm-svn: 51025
2008-05-13 08:17:44 +00:00
Evan Cheng
e4ee4c2870 On x86, it's safe to treat i32 load anyext as a normal i32 load. Ditto for i8 anyext load to i16.
llvm-svn: 51019
2008-05-13 00:54:02 +00:00
Evan Cheng
fcbdc8bd6e Xform bitconvert(build_pair(load a, load b)) to a single load if the load locations are at the right offset from each other.
llvm-svn: 51008
2008-05-12 23:04:07 +00:00
Dale Johannesen
b54491d31a New test for tail merging
llvm-svn: 51007
2008-05-12 22:59:44 +00:00
Mikhail Glushenkov
18508c5df4 Filter option names to escape symbols not allowed as C++ identifiers.
Makes it possible to use options with names like "Wa,".
Also fixes the -Wall option handling as a side-effect.

llvm-svn: 50973
2008-05-12 16:33:06 +00:00
Duncan Sands
45b1810980 Testcase for PR2264.
llvm-svn: 50965
2008-05-12 13:01:19 +00:00
Duncan Sands
15622620d3 Testcase for PR2303.
llvm-svn: 50951
2008-05-10 16:43:10 +00:00
Evan Cheng
c19c639ad7 When transforming a vector_shuffle to a load, the base address must not be an undef.
llvm-svn: 50940
2008-05-10 06:46:49 +00:00
Evan Cheng
fc4b8e1d96 Add nounwind.
llvm-svn: 50931
2008-05-10 02:22:25 +00:00
Evan Cheng
cf4d5567d5 If all sources of a PHI node are defined by an implicit_def, just emit an implicit_def instead of a copy.
llvm-svn: 50927
2008-05-10 00:17:50 +00:00
Evan Cheng
2adea48f7e Add a pattern to do move the low element of a v4f32 and zero extend the rest.
llvm-svn: 50922
2008-05-09 23:37:55 +00:00
Evan Cheng
3493e43afd Handle a few more cases of folding load i64 into xmm and zero top bits.
Note, some of the code will be moved into target independent part of DAG combiner in a subsequent patch.

llvm-svn: 50918
2008-05-09 21:53:03 +00:00
Evan Cheng
a0688bf1cb Simplify test.
llvm-svn: 50911
2008-05-09 19:56:32 +00:00
Chris Lattner
02ca137915 Implement PR2298. This transforms:
~x < ~y --> y < x
   -x == -y --> x == y

llvm-svn: 50882
2008-05-09 05:19:28 +00:00
Evan Cheng
f824b47188 Use movq to move low half of XMM register and zero-extend the rest.
llvm-svn: 50874
2008-05-08 22:35:02 +00:00
Chris Lattner
4c1ef3628b More than just loads can read from memory: readonly calls like strlen
also need to be checked for memory modifying instructions before we
can sink them.  THis fixes the second half of PR2297.

llvm-svn: 50860
2008-05-08 17:37:37 +00:00
Chris Lattner
cba8b4c7e8 Make instcombine's DSE respect loads as well as stores. It is not safe to
delete the first store in:

store x -> p
load p
store y -> p

This is for PR2297.

llvm-svn: 50859
2008-05-08 17:20:30 +00:00
Chris Lattner
9bf499a8b9 new testcase.
llvm-svn: 50841
2008-05-08 04:55:51 +00:00
Evan Cheng
f97e716511 Handle vector move / load which zero the destination register top bits (i.e. movd, movq, movss (addr), movsd (addr)) with X86 specific dag combine.
llvm-svn: 50838
2008-05-08 00:57:18 +00:00
Evan Cheng
7ff000c175 Add nounwind.
llvm-svn: 50837
2008-05-07 22:59:08 +00:00
Evan Cheng
c86c035346 Yet another nasty spiller bug.
%ecx = op
store %cl<kill>, (addr)
(addr) = op %al

It's not safe to unfold the last operand and eliminate store even though %cl is marked kill. It's a sub-register use which means one of its super-register(s) may be used below.

llvm-svn: 50794
2008-05-07 00:49:28 +00:00
Dan Gohman
6ea87fa437 Fix a bug in the ComputeMaskedBits logic for multiply.
llvm-svn: 50793
2008-05-07 00:35:55 +00:00
Bill Wendling
3cb8ee3c80 Removing.
llvm-svn: 50786
2008-05-06 23:56:22 +00:00
Anton Korobeynikov
a9ff11ea5f Use target triple in tests, not 'realign-stack=0' option. Per request.
llvm-svn: 50778
2008-05-06 23:09:29 +00:00
Owen Anderson
2dccdcf2f2 Testcase for r50770.
llvm-svn: 50771
2008-05-06 21:01:34 +00:00
Mikhail Glushenkov
5a403195b3 Move test files around a bit - fixes the reported number of test cases.
llvm-svn: 50761
2008-05-06 18:16:20 +00:00
Mikhail Glushenkov
3534026221 Use edge weights to choose the right linker based on input language names.
llvm-svn: 50759
2008-05-06 18:15:12 +00:00
Mikhail Glushenkov
78aa308f84 Add a --linker command-line option, make all tests pass.
llvm-svn: 50755
2008-05-06 18:13:00 +00:00