Dale Johannesen
f367ef04af
Make a transformation added in 63266 a bit less aggressive.
...
It was transforming (x&y)==y to (x&y)!=0 in the case where
y is variable and known to have at most one bit set (e.g. z&1).
This is not correct; the expressions are not equivalent when y==0.
I believe this patch salvages what can be salvaged, including
all the cases in bt.ll. Dan, please review.
Fixes gcc.c-torture/execute/20040709-[12].c
llvm-svn: 64314
2009-02-11 19:19:41 +00:00
Evan Cheng
cfa084930b
Implement PR3495: local spiller optimization. The local spiller can now keep availability information over BB boundaries. It visits BB's in depth first order. After visiting a BB if it find a successor which has a single predecessor it visits the successor next without clearing the availability information. This allows the successor to omit reloads or change them into copies.
...
llvm-svn: 64298
2009-02-11 08:24:21 +00:00
Evan Cheng
cdb35e3f0f
Handle llvm.x86.sse2.maskmov.dqu in 64-bit.
...
llvm-svn: 64240
2009-02-10 22:06:28 +00:00
Evan Cheng
5be1afd928
Fix PR3457: Ignore control successors when looking for closest scheduled successor. A control successor doesn't read result(s) produced by the scheduling unit being evaluated.
...
llvm-svn: 64210
2009-02-10 08:30:11 +00:00
Evan Cheng
3b84024598
Implement FpSET_ST1_*.
...
llvm-svn: 64186
2009-02-09 23:32:07 +00:00
Evan Cheng
44e58653af
Make sure constant subscript is truncated to ptr size if it may not fit.
...
llvm-svn: 64163
2009-02-09 20:54:38 +00:00
Evan Cheng
3f98669da2
Re-enable machine sinking pass now that the coalescer bugs and the AnalyzeBrnach bug are fixed.
...
llvm-svn: 64126
2009-02-09 08:45:39 +00:00
Evan Cheng
a7287a61fb
Fix PR3486. Fix a bug in code that manually patch physical register live interval after its sub-register is coalesced with a virtual register.
...
llvm-svn: 64082
2009-02-08 11:04:35 +00:00
Evan Cheng
7d46312873
(no commit message)
...
llvm-svn: 64073
2009-02-08 07:48:37 +00:00
Bill Wendling
4ed0306d6f
Revert r63999. It was breaking self-hosting builds.
...
llvm-svn: 64062
2009-02-08 00:58:05 +00:00
Evan Cheng
62694a52fe
Enable machine sinking pass in non-fast mode.
...
llvm-svn: 63999
2009-02-07 01:57:46 +00:00
Evan Cheng
74f909616b
Fix test. It produces unexpected code if sse4.1 is on.
...
llvm-svn: 63906
2009-02-06 01:49:19 +00:00
Evan Cheng
6a938dd9e7
isAsCheapAsMove instructions can have register src operands. Check if they are really re-materializable.
...
This fixes sse.expandfft and sse.stepfft.
llvm-svn: 63890
2009-02-05 22:24:17 +00:00
Evan Cheng
b36e3e34e7
Turn on machine LICM in non-fast mode.
...
llvm-svn: 63855
2009-02-05 08:46:33 +00:00
Chris Lattner
d8f77bbc07
if we have a large GEP offset on a 32-bit or other target, make
...
sure to print the value properly sext'd to the right pointer size.
This fixes PR3481.
llvm-svn: 63843
2009-02-05 06:55:21 +00:00
Mon P Wang
3596488f90
Add test case for r63760.
...
llvm-svn: 63774
2009-02-04 21:10:56 +00:00
Mon P Wang
430525dc4f
Fixes a case where we generate an incorrect mask for pshfhw in the presence
...
of undefs and incorrectly determining if we have punpckldq.
llvm-svn: 63702
2009-02-04 01:16:59 +00:00
Duncan Sands
87db26ad2c
Fix PR3411. When replacing values, nodes are analyzed
...
in any old order. Since analyzing a node analyzes its
operands also, this can mean that when we pop a node
off the list of nodes to be analyzed, it may already
have been analyzed.
llvm-svn: 63632
2009-02-03 10:23:33 +00:00
Chris Lattner
2dae393299
rearrange how SRoA handles promotion of allocas to vectors.
...
With the new world order, it can handle cases where the first
store into the alloca is an element of the vector, instead of
requiring the first analyzed store to have the vector type
itself. This allows us to un-xfail
test/CodeGen/X86/vec_ins_extract.ll.
llvm-svn: 63590
2009-02-03 01:30:09 +00:00
Dan Gohman
7b176db971
Add explicit -march=x86 to these tests so that they don't
...
default to -march=x86-64 on 64-bit hosts.
llvm-svn: 63579
2009-02-03 00:20:22 +00:00
Dan Gohman
9bc7148556
Fix another test to not use -mcpu=yonah with 64-bit code.
...
llvm-svn: 63572
2009-02-02 23:43:59 +00:00
Dan Gohman
8a2fa9ded4
Yonah does not support x86-64. Change the -mcpu value to one that does.
...
llvm-svn: 63561
2009-02-02 22:50:08 +00:00
Chris Lattner
eeeba2abe9
xfail this for now, will fix shortly.
...
llvm-svn: 63533
2009-02-02 18:15:33 +00:00
Evan Cheng
483bbd1643
Teach LowerBRCOND to recognize (xor (setcc x), 1). The xor inverts the condition. It's normally transformed by the dag combiner, unless the condition is set by a arithmetic op with overflow.
...
llvm-svn: 63505
2009-02-02 08:07:36 +00:00
Torok Edwin
110a24e43e
add 2 more testcases for -mattr=-sse (r63495).
...
--This line, and those below, will be ignaored--
A test/CodeGen/X86/nosse-error1.ll
A test/CodeGen/X86/nosse-error2.ll
llvm-svn: 63496
2009-02-01 18:24:20 +00:00
Torok Edwin
b4c9a6097f
Implement -mno-sse: if SSE is disabled on x86-64, don't store XMM on stack for
...
var-args, and don't allow FP return values
llvm-svn: 63495
2009-02-01 18:15:56 +00:00
Duncan Sands
cac6cf74f9
Fix PR3453 and probably a bunch of other potential
...
crashes or wrong code with codegen of large integers:
eliminate the legacy getIntegerVTBitMask and
getIntegerVTSignBit methods, which returned their
value as a uint64_t, so couldn't handle huge types.
llvm-svn: 63494
2009-02-01 18:06:53 +00:00
Duncan Sands
74179a9dde
Fix PR3401: when using large integers, the type
...
returned by getShiftAmountTy may be too small
to hold shift values (it is an i8 on x86-32).
Before and during type legalization, use a large
but legal type for shift amounts: getPointerTy;
afterwards use getShiftAmountTy, fixing up any
shift amounts with a big type during operation
legalization. Thanks to Dan for writing the
original patch (which I shamelessly pillaged).
llvm-svn: 63482
2009-01-31 15:50:11 +00:00
Mon P Wang
1cc0fd54b7
Used "-enable-unsafe-fp-math" to allow this transformation - (a * b -c) = c - a *b.
...
llvm-svn: 63475
2009-01-31 06:50:54 +00:00
Mon P Wang
2a0cce6b1c
If unsafe FP optimization is not set, don't allow -(A-B) => B-A because
...
when A==B, -0.0 != +0.0.
llvm-svn: 63474
2009-01-31 06:07:45 +00:00
Owen Anderson
fe46e52119
XFAIL this test. It only worked before because of a bug in the spill point selection code. Not deleting because
...
it should be possible to enhance the selection code to handle this in the future.
llvm-svn: 63340
2009-01-29 22:27:56 +00:00
Evan Cheng
1ffb8d20e8
Local register allocator shouldn't assume only the entry and landing pad basic blocks have live-ins.
...
llvm-svn: 63323
2009-01-29 18:37:30 +00:00
Dan Gohman
14959cba72
In the case of an extractelement on an insertelement value,
...
the element indices may be equal if either one is not a
constant.
llvm-svn: 63311
2009-01-29 16:10:46 +00:00
Evan Cheng
1346d22223
Exit with nice warnings when register allocator run out of registers.
...
llvm-svn: 63267
2009-01-29 02:20:59 +00:00
Dan Gohman
9d120d6d8f
Make x86's BT instruction matching more thorough, and add some
...
dagcombines that help it match in several more cases. Add
several more cases to test/CodeGen/X86/bt.ll. This doesn't
yet include matching for BT with an immediate operand, it
just covers more register+register cases.
llvm-svn: 63266
2009-01-29 01:59:02 +00:00
Mon P Wang
8abb07a527
Fixed lowering of v816 shuffles.
...
llvm-svn: 63252
2009-01-28 23:11:14 +00:00
Bill Wendling
ab2b1d7629
Make test platform agnostic.
...
llvm-svn: 63247
2009-01-28 22:20:56 +00:00
Evan Cheng
2a965124b7
The memory alignment requirement on some of the mov{h|l}p{d|s} patterns are 16-byte. That is overly strict. These instructions read / write f64 memory locations without alignment requirement.
...
llvm-svn: 63195
2009-01-28 08:35:02 +00:00
Mon P Wang
f089df40b5
Added sse test patterns for r62979 and r63193.
...
llvm-svn: 63194
2009-01-28 08:13:56 +00:00
Bill Wendling
6c7c632a21
Add testcase for r63142.
...
llvm-svn: 63149
2009-01-27 23:00:53 +00:00
Evan Cheng
a05436f739
Implement multiple with overflow by 2 with an add instruction.
...
llvm-svn: 63090
2009-01-27 03:30:42 +00:00
Dan Gohman
2c06ee586b
Add a regression test for x86-64 red zone usage.
...
llvm-svn: 63075
2009-01-27 00:40:27 +00:00
Duncan Sands
276b736496
Fix PR3393, which amounts to a bug in the expensive
...
checking logic. Rather than make the checking more
complicated, I've tweaked some logic to make things
conform to how the checking thought things ought to
be, since this results in a simpler "mental model".
llvm-svn: 63048
2009-01-26 21:54:18 +00:00
Dan Gohman
4613b5e807
At Nick Lewycky's request, rename this test with a more informative name.
...
llvm-svn: 63042
2009-01-26 21:36:31 +00:00
Evan Cheng
ec03e0cd3b
Enhance logic in X86DAGToDAGISel::PreprocessForRMW which move load inside callseq_start to allow it to be folded into a call. It was not considering the cases where a token factor is between the load and the callseq_start.
...
llvm-svn: 63022
2009-01-26 18:43:34 +00:00
Scott Michel
da9360e77e
CellSPU:
...
- Rename fcmp.ll test to fcmp32.ll, start adding new double tests to fcmp64.ll
- Fix select_bits.ll test
- Capitulate to the DAGCombiner and move i64 constant loads to instruction
selection (SPUISelDAGtoDAG.cpp).
<rant>DAGCombiner will insert all kinds of 64-bit optimizations after
operation legalization occurs and now we have to do most of the work that
instruction selection should be doing twice (once to determine if v2i64
build_vector can be handled by SelectCode(), which then runs all of the
predicates a second time to select the necessary instructions.) But,
CellSPU is a good citizen.</rant>
llvm-svn: 62990
2009-01-26 03:31:40 +00:00
Nate Begeman
92efc4f0ce
Map address space 256 to gs; similar mappings could be supported for the
...
other x86 segments. address space 0 is stack/default, 1-255 are reserved for
client use.
llvm-svn: 62980
2009-01-26 01:24:32 +00:00
Torok Edwin
3f54410405
revert this patch for now, because Codegen does still want to generate SSE code,
...
for example in the case of va-args. XFAIL associated tests.
llvm-svn: 62972
2009-01-25 20:21:24 +00:00
Torok Edwin
49b1d3e3cc
If user explicitly asks not to use SSE, don't force it. This fixes LLVM part of PR3402.
...
llvm-svn: 62967
2009-01-25 17:58:56 +00:00
Evan Cheng
71ca3e2bdb
Private linkage support for PPC / Darwin.
...
llvm-svn: 62955
2009-01-25 06:32:01 +00:00