Evan Cheng
26593a04db
New test case.
...
llvm-svn: 44672
2007-12-07 01:48:46 +00:00
Evan Cheng
5cb41390ab
Fix a bogus test case.
...
llvm-svn: 44668
2007-12-06 22:12:45 +00:00
Evan Cheng
8393dc7378
Turning simple splitting on. Start testing new coalescer heuristics as new llcbeta.
...
llvm-svn: 44660
2007-12-06 08:54:31 +00:00
Chris Lattner
eedaf92fcf
third time around: instead of disabling this completely,
...
only disable it if we don't know it will be obviously profitable.
Still fixme, but less so. :)
llvm-svn: 44658
2007-12-06 07:47:55 +00:00
Chris Lattner
b5fdfb9612
Actually, disable this code for now. More analysis and improvements to
...
the X86 backend are needed before this should be enabled by default.
llvm-svn: 44657
2007-12-06 07:44:31 +00:00
Chris Lattner
7c709a5d08
implement a readme entry, compiling the code into:
...
_foo:
movl $12, %eax
andl 4(%esp), %eax
movl _array(%eax), %eax
ret
instead of:
_foo:
movl 4(%esp), %eax
shrl $2, %eax
andl $3, %eax
movl _array(,%eax,4), %eax
ret
As it turns out, this triggers all the time, in a wide variety of
situations, for example, I see diffs like this in various programs:
- movl 8(%eax), %eax
- shll $2, %eax
- andl $1020, %eax
- movl (%esi,%eax), %eax
+ movzbl 8(%eax), %eax
+ movl (%esi,%eax,4), %eax
- shll $2, %edx
- andl $1020, %edx
- movl (%edi,%edx), %edx
+ andl $255, %edx
+ movl (%edi,%edx,4), %edx
Unfortunately, I also see stuff like this, which can be fixed in the
X86 backend:
- andl $85, %ebx
- addl _bit_count(,%ebx,4), %ebp
+ shll $2, %ebx
+ andl $340, %ebx
+ addl _bit_count(%ebx), %ebp
llvm-svn: 44656
2007-12-06 07:33:36 +00:00
Chris Lattner
dfa39289a5
fix this when run on non x86 hosts.
...
llvm-svn: 44645
2007-12-06 01:05:52 +00:00
Evan Cheng
7fc1d98353
Fix for PR1831: if all defs of an interval are re-materializable, then it's a preferred spill candiate.
...
llvm-svn: 44644
2007-12-06 00:01:56 +00:00
Devang Patel
bd75910fa7
If ExitValue operand is also defined in Loop header then
...
insert new ExitValue after this operand definition.
This fixes PR1828.
llvm-svn: 44539
2007-12-03 19:17:21 +00:00
Gordon Henriksen
e000c6022f
Fix a typo noticed by Alain Frisch.
...
llvm-svn: 44493
2007-12-01 20:59:23 +00:00
Evan Cheng
69fda0a716
Allow some reloads to be folded in multi-use cases. Specifically testl r, r -> cmpl [mem], 0.
...
llvm-svn: 44479
2007-12-01 02:07:52 +00:00
Evan Cheng
b10dc27b20
Do not fold reload into an instruction with multiple uses. It issues one extra load.
...
llvm-svn: 44467
2007-11-30 21:23:43 +00:00
Evan Cheng
37ed3e6320
Update tests.
...
llvm-svn: 44435
2007-11-29 10:03:54 +00:00
Chris Lattner
cee633a873
New testcase for PR1744
...
llvm-svn: 44418
2007-11-28 22:43:34 +00:00
Chris Lattner
f4769da4b3
upgrade this test
...
llvm-svn: 44405
2007-11-28 18:22:12 +00:00
Chris Lattner
d6109cf328
make this test have a deterministic result.
...
llvm-svn: 44404
2007-11-28 18:20:49 +00:00
Duncan Sands
5208d1ab4a
Add some convenience methods for querying attributes, and
...
use them.
llvm-svn: 44403
2007-11-28 17:07:01 +00:00
Duncan Sands
b5452fb829
Revert previous "fix" - the breakage was due to some
...
local changes, not the "not".
llvm-svn: 44402
2007-11-28 16:50:29 +00:00
Duncan Sands
0497916c88
This test somehow got an extra "not" during the
...
recent stderr updates.
llvm-svn: 44401
2007-11-28 15:36:27 +00:00
Chris Lattner
e499816a23
xfail a test
...
llvm-svn: 44395
2007-11-28 05:37:13 +00:00
Chris Lattner
e04dc1fa4d
update this test after the fmrrd fix
...
llvm-svn: 44393
2007-11-28 05:27:07 +00:00
Tanya Lattner
8f342f8ef3
Fix bug in regression tests that ignored stderr output in RUN lines. Updated tests and fixed broken run lines.
...
XFAILed 3 arm regressions (will file bugs)
llvm-svn: 44389
2007-11-28 04:57:00 +00:00
Chris Lattner
f247e27666
commit testcase I forgot to svn add.
...
llvm-svn: 44383
2007-11-27 22:43:37 +00:00
Chris Lattner
79ae9895f6
Fix a crash on invalid code due to memcpy lowering.
...
llvm-svn: 44378
2007-11-27 22:14:42 +00:00
Andrew Lenharth
b960acebde
something wrong with this opt
...
llvm-svn: 44370
2007-11-27 18:31:30 +00:00
Anton Korobeynikov
75445ae2c3
Add testcase for last llvm-gcc tweaks
...
llvm-svn: 44368
2007-11-27 18:21:29 +00:00
Duncan Sands
ad0ea2d430
Fix PR1146: parameter attributes are longer part of
...
the function type, instead they belong to functions
and function calls. This is an updated and slightly
corrected version of Reid Spencer's original patch.
The only known problem is that auto-upgrading of
bitcode files doesn't seem to work properly (see
test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully
a bitcode guru (who might that be? :) ) will fix it.
llvm-svn: 44359
2007-11-27 13:23:08 +00:00
Zhou Sheng
34ffaeeeed
Make this pass for CYGWIN.
...
llvm-svn: 44354
2007-11-27 06:23:59 +00:00
Zhou Sheng
73286d6309
Make this testcase compatible with CYGWIN.
...
llvm-svn: 44353
2007-11-27 06:17:01 +00:00
Dan Gohman
8bba724afc
Change &| to |&.
...
llvm-svn: 44345
2007-11-27 00:50:57 +00:00
Dan Gohman
2dba0788a5
Change grep '' to grep {}.
...
Change 2>&1 | to |&.
llvm-svn: 44344
2007-11-27 00:10:35 +00:00
Dan Gohman
9ab9e9fa03
Don't redirect llvm-as's stderr to llvm-dis.
...
Change grep '' to grep {}.
llvm-svn: 44343
2007-11-27 00:07:33 +00:00
Dan Gohman
f151c8e760
Remove unnecessary && from the RUN lines of this test.
...
llvm-svn: 44342
2007-11-27 00:03:38 +00:00
Dan Gohman
9a69341725
Don't lower srem/urem X%C to X-X/C*C unless the division is actually
...
optimized. This avoids creating illegal divisions when the combiner is
running after legalize; this fixes PR1815. Also, it produces better
code in the included testcase by avoiding the subtract and multiply
when the division isn't optimized.
llvm-svn: 44341
2007-11-26 23:46:11 +00:00
Owen Anderson
4f833c7610
Allow GVN to eliminate read-only function calls when it can detect that they are redundant.
...
llvm-svn: 44323
2007-11-26 02:26:36 +00:00
Nick Lewycky
cdb7e54ca7
Add new SCEV, SCEVSMax. This allows LLVM to analyze do-while loops.
...
llvm-svn: 44319
2007-11-25 22:41:31 +00:00
Chris Lattner
c00e8adfe0
Implement PR1822
...
llvm-svn: 44318
2007-11-25 21:27:53 +00:00
Duncan Sands
185eeac0f8
Fix PR1816. If a bitcast of a function only exists because of a
...
trivial difference in function attributes, allow calls to it to
be converted to direct calls. Based on a patch by Török Edwin.
While there, move the various lists of mutually incompatible
parameters etc out of the verifier and into ParameterAttributes.h.
llvm-svn: 44315
2007-11-25 14:10:56 +00:00
Chris Lattner
5728bdd4db
Fix a long standing deficiency in the X86 backend: we would
...
sometimes emit "zero" and "all one" vectors multiple times,
for example:
_test2:
pcmpeqd %mm0, %mm0
movq %mm0, _M1
pcmpeqd %mm0, %mm0
movq %mm0, _M2
ret
instead of:
_test2:
pcmpeqd %mm0, %mm0
movq %mm0, _M1
movq %mm0, _M2
ret
This patch fixes this by always arranging for zero/one vectors
to be defined as v4i32 or v2i32 (SSE/MMX) instead of letting them be
any random type. This ensures they get trivially CSE'd on the dag.
This fix is also important for LegalizeDAGTypes, as it gets unhappy
when the x86 backend wants BUILD_VECTOR(i64 0) to be legal even when
'i64' isn't legal.
This patch makes the following changes:
1) X86TargetLowering::LowerBUILD_VECTOR now lowers 0/1 vectors into
their canonical types.
2) The now-dead patterns are removed from the SSE/MMX .td files.
3) All the patterns in the .td file that referred to immAllOnesV or
immAllZerosV in the wrong form now use *_bc to match them with a
bitcast wrapped around them.
4) X86DAGToDAGISel::SelectScalarSSELoad is generalized to handle
bitcast'd zero vectors, which simplifies the code actually.
5) getShuffleVectorZeroOrUndef is updated to generate a shuffle that
is legal, instead of generating one that is illegal and expecting
a later legalize pass to clean it up.
6) isZeroShuffle is generalized to handle bitcast of zeros.
7) several other minor tweaks.
This patch is definite goodness, but has the potential to cause random
code quality regressions. Please be on the lookout for these and let
me know if they happen.
llvm-svn: 44310
2007-11-25 00:24:49 +00:00
Chris Lattner
f5dfd15e98
upgrade this test
...
llvm-svn: 44298
2007-11-24 05:39:29 +00:00
Chris Lattner
893fe3bbd1
Fix PR1816, by correcting the broken definition of APInt::countTrailingZeros.
...
llvm-svn: 44296
2007-11-23 22:42:31 +00:00
Duncan Sands
8a3e9d2bee
Ding dong, the DoesntAccessMemoryFns and
...
OnlyReadsMemoryFns tables are dead! We
get more, and more accurate, information
from gcc via the readnone and readonly
function attributes.
llvm-svn: 44288
2007-11-23 19:30:27 +00:00
Chris Lattner
a8fbde3f78
Fix a bug where we'd try to find a scev value for a bitcast operand,
...
even though the bitcast operand did not have integer type. This fixes
PR1814.
llvm-svn: 44286
2007-11-23 08:46:22 +00:00
Chris Lattner
1985d96dc9
Fix PR1817.
...
llvm-svn: 44284
2007-11-22 23:47:13 +00:00
Duncan Sands
a915b538d3
Turn invokes of nounwind functions into ordinary calls.
...
llvm-svn: 44280
2007-11-22 22:24:59 +00:00
Duncan Sands
38a5e82ef4
Teach alias analysis about readnone/readonly functions.
...
Based on a patch by Török Edwin.
llvm-svn: 44279
2007-11-22 21:43:27 +00:00
Duncan Sands
1c97d752df
Readonly/readnone functions are allowed to throw
...
exceptions, so don't turn invokes of them into
calls.
llvm-svn: 44278
2007-11-22 21:40:06 +00:00
Nick Lewycky
016547d226
Create nodes for inline asm so that we don't crash looking for the node later.
...
llvm-svn: 44267
2007-11-22 03:07:37 +00:00
Duncan Sands
b87dde7e8e
Fix a bug in which node A is replaced by node B, but later
...
node A gets back into the DAG again because it was hiding in
one of the node maps: make sure that node replacement happens
in those maps too.
llvm-svn: 44263
2007-11-21 16:43:19 +00:00
Nick Lewycky
5b18bd3368
Be more careful when transforming | to +. Patch from Wojciech Matyjewicz.
...
llvm-svn: 44248
2007-11-20 08:24:44 +00:00
Chris Lattner
6edac0ad1d
Testcase for PR1811
...
llvm-svn: 44244
2007-11-19 21:43:22 +00:00
Dan Gohman
36347a26f9
Add support in SplitVectorOp for remainder operators.
...
llvm-svn: 44233
2007-11-19 15:15:03 +00:00
Chris Lattner
861302e264
fix bogus test that the more strict lexer is finding.
...
llvm-svn: 44216
2007-11-18 18:26:45 +00:00
Nate Begeman
d4d45c268c
Add support for vectors to int <-> float casts.
...
llvm-svn: 44204
2007-11-17 03:58:34 +00:00
Evan Cheng
13e8b022f5
Typo.
...
llvm-svn: 44196
2007-11-16 23:55:08 +00:00
Dale Johannesen
a674612d94
Testcase from PR 1508 (although its's somewhat
...
orthogonal to the main problem there)
llvm-svn: 44194
2007-11-16 23:16:35 +00:00
Chris Lattner
c53b18362a
Fix PR1800 by correcting mistaken logic.
...
llvm-svn: 44188
2007-11-16 06:04:17 +00:00
Anton Korobeynikov
6a7ddfdb8f
Reverted r44163 per request
...
llvm-svn: 44177
2007-11-15 18:33:16 +00:00
Evan Cheng
2c1a50455c
Fix a thinko in post-allocation coalescer.
...
llvm-svn: 44166
2007-11-15 08:13:29 +00:00
Nick Lewycky
fbb24817cc
Fix handling of overflow in loop calculation by adding new UDiv SCEV. This SCEV
...
is disabled in the sense that it will refuse to create one from a UDiv
instruction, until the code is better tested.
llvm-svn: 44163
2007-11-15 06:30:50 +00:00
Duncan Sands
544e64aa96
Un XFAIL these tests, now that Bill has backported
...
the fix from 4.2.
llvm-svn: 44115
2007-11-14 13:40:53 +00:00
Anton Korobeynikov
2c6387803e
Fix PIC jump table codegen on x86-32/linux. In fact, such thing should be applied
...
to all targets uses GOT-relative offsets for PIC (Alpha?)
llvm-svn: 44108
2007-11-14 09:18:41 +00:00
Duncan Sands
9c30fc234c
XFAIL these tests until the fix gets backported
...
from llvm-gcc-4.2 to 4.0.
llvm-svn: 44103
2007-11-14 07:42:50 +00:00
Chris Lattner
a77e74edba
Implement PR1796 and Transforms/SimplifyCFG/noreturn-call.ll
...
by inserting unreachable after no-return calls.
llvm-svn: 44099
2007-11-14 06:19:25 +00:00
Chris Lattner
f150ace6cb
upgrade test
...
llvm-svn: 44067
2007-11-13 21:42:48 +00:00
Chris Lattner
61ce4dff7a
Implement PR1786 by iterating between dead cycle elimination
...
and simplifycfg in the rare cases when it is needed.
llvm-svn: 44044
2007-11-13 07:32:38 +00:00
Arnold Schwaighofer
d2c16ff905
Update tailcall code to include inline attribute operand for memcpy.
...
llvm-svn: 43978
2007-11-10 10:48:01 +00:00
Evan Cheng
05b94b8c13
Fix tests.
...
llvm-svn: 43961
2007-11-09 20:46:00 +00:00
Chris Lattner
f9c0fd7488
Tighten up a check for folding away loads from (newly constant) globals. This
...
fixes a crash on Transforms/GlobalOpt/2007-11-09-GEP-GEP-Crash.ll and
rdar://5585488.
llvm-svn: 43949
2007-11-09 17:33:02 +00:00
Duncan Sands
303a5d6c8b
Thanks to the XTARGET line, this test should still
...
be run on darwin, but I have no way of checking...
llvm-svn: 43945
2007-11-09 13:50:25 +00:00
Duncan Sands
0c7fba914d
Check that the first and third characters, s and u,
...
are accessed with an alignment of 2 not 1.
llvm-svn: 43932
2007-11-09 07:47:29 +00:00
Duncan Sands
1445725759
Check that accesses to the second short, t, have
...
an alignment of 2 rather than 4.
llvm-svn: 43931
2007-11-09 07:46:02 +00:00
Devang Patel
94785aa1c7
Run this test only on darwin.
...
llvm-svn: 43912
2007-11-08 22:26:46 +00:00
Andrew Lenharth
19ca5c7021
Better check
...
llvm-svn: 43897
2007-11-08 18:45:15 +00:00
Andrew Lenharth
8cf11aa330
Fix PR1780
...
llvm-svn: 43893
2007-11-08 17:39:28 +00:00
Lauro Ramos Venancio
f6a67bf700
[ARM] Implement __builtin_thread_pointer.
...
llvm-svn: 43892
2007-11-08 17:20:05 +00:00
Evan Cheng
ece4c68b82
If both parts of smul_lohi, etc. are used, don't simplify. If only one part is used, try simplify it.
...
llvm-svn: 43888
2007-11-08 09:25:29 +00:00
Bill Wendling
6e976915a3
Add testcase
...
llvm-svn: 43839
2007-11-07 19:36:26 +00:00
Tanya Lattner
5de0daf6b1
Implement the XTARGET feature for PR1778
...
This will mark a test as PASS for all targets specified. It will override whatever is in XFAIL.
llvm-svn: 43788
2007-11-06 22:32:17 +00:00
Chris Lattner
d8515f8e80
Implement PR1777 by detecting dependent phis that
...
all compute the same value.
llvm-svn: 43777
2007-11-06 21:52:06 +00:00
Evan Cheng
2dbffa4e76
Add pseudo dependency to force two-address instruction to be scheduled after
...
other uses. There was a overly restricted check that prevented some obvious
cases.
llvm-svn: 43762
2007-11-06 08:44:59 +00:00
Chris Lattner
0fc613b85d
Fix PR1774 and BasicAA/2007-11-05-SizeCrash.ll
...
llvm-svn: 43756
2007-11-06 05:58:42 +00:00
Dan Gohman
08143e397d
Add support for vector remainder operations.
...
llvm-svn: 43744
2007-11-05 23:35:22 +00:00
Dan Gohman
4decbc5002
Fix an abort in instcombine when folding creates a vector rem instruction.
...
llvm-svn: 43743
2007-11-05 23:16:33 +00:00
Dale Johannesen
4646aa3e33
Make labels work in asm blocks; allow labels as
...
parameters. Rename ValueRefList to ParamList
in AsmParser, since its only use is for parameters.
llvm-svn: 43734
2007-11-05 21:20:28 +00:00
Devang Patel
b98d2050a2
If a value is incoming from outside the loop then the value does not need remapping and the value is never tracked through LastValueMap.
...
llvm-svn: 43728
2007-11-05 19:32:30 +00:00
Lauro Ramos Venancio
1a30c18e88
[ARM] Fix code generation for:
...
static __thread struct {
int a;
int b;
} teste = {0, 0};
llvm-svn: 43722
2007-11-05 18:33:37 +00:00
Evan Cheng
17b0e3e1ae
Skip over deleted val#'s.
...
llvm-svn: 43700
2007-11-05 06:46:45 +00:00
Evan Cheng
a406b47f14
Handle cases where a register and one of its super-register are both marked as
...
defined on the same instruction. This fixes PR1767.
llvm-svn: 43699
2007-11-05 03:11:55 +00:00
Evan Cheng
e12363dac5
Fix test case. Chris didn't do make check. :-)
...
llvm-svn: 43698
2007-11-05 03:04:26 +00:00
Evan Cheng
c68023a955
Doh. PR1187 -> PR1766.
...
llvm-svn: 43693
2007-11-05 01:00:44 +00:00
Evan Cheng
a8044084ac
Fix PR1187.
...
llvm-svn: 43692
2007-11-05 00:59:10 +00:00
Chris Lattner
9329e780cd
Fix PR1761 by not printing (rip) suffix when in -static mode.
...
Evan, please review this.
llvm-svn: 43680
2007-11-04 19:23:28 +00:00
Duncan Sands
399d97987b
Change uses of getTypeSize to getABITypeSize, getTypeStoreSize
...
or getTypeSizeInBits as appropriate in ScalarReplAggregates.
The right change to make was not always obvious, so it would
be good to have an sroa guru review this. While there I noticed
some bugs, and fixed them: (1) arrays of x86 long double have
holes due to alignment padding, but this wasn't being spotted
by HasStructPadding (renamed to HasPadding). The same goes
for arrays of oddly sized ints. Vectors also suffer from this,
in fact the problem for vectors is much worse because basic
vector assumptions seem to be broken by vectors of type with
alignment padding. I didn't try to fix any of these vector
problems. (2) The code for extracting smaller integers from
larger ones (in the "int union" case) was wrong on big-endian
machines for integers with size not a multiple of 8, like i1.
Probably this is impossible to hit via llvm-gcc, but I fixed
it anyway while there and added a testcase. I also got rid of
some trailing whitespace and changed a function name which
had an obvious typo in it.
llvm-svn: 43672
2007-11-04 14:43:57 +00:00
Chris Lattner
296160d443
Fix PR1763 by allowing the 'q' constraint to work with 64-bit
...
regs on x86-64.
llvm-svn: 43669
2007-11-04 06:51:12 +00:00
Evan Cheng
66298e226f
There are times when the coalescer would not coalesce away a copy but the copy
...
can be eliminated by the allocator is the destination and source targets the
same register. The most common case is when the source and destination registers
are in different class. For example, on x86 mov32to32_ targets GR32_ which
contains a subset of the registers in GR32.
The allocator can do 2 things:
1. Set the preferred allocation for the destination of a copy to that of its source.
2. After allocation is done, change the allocation of a copy destination (if
legal) so the copy can be eliminated.
This eliminates 443 extra moves from 403.gcc.
llvm-svn: 43662
2007-11-03 07:20:12 +00:00
Evan Cheng
0442889b18
Add run line.
...
llvm-svn: 43645
2007-11-02 17:36:58 +00:00
Evan Cheng
f851163c53
One more extract_subreg coalescing bug.
...
llvm-svn: 43644
2007-11-02 17:35:08 +00:00
Evan Cheng
e453ff4913
Missing a getNumOperands check.
...
llvm-svn: 43630
2007-11-02 01:26:22 +00:00
Owen Anderson
2ed651ace7
Fix test/Transforms/DeadStoreElimination/PartialStore.ll, which had been
...
silently failing because of an incorrect run line for some time.
llvm-svn: 43605
2007-11-01 05:29:16 +00:00
Dale Johannesen
440f9abab4
Test that expand_vector_elt(v2i64) works in 32-bit mode.
...
llvm-svn: 43598
2007-11-01 02:38:24 +00:00
Chris Lattner
6ab19ed78d
Fix InstCombine/2007-10-31-StringCrash.ll by removing an obvious
...
(in hindsight) infinite recursion. Simplify the code.
llvm-svn: 43597
2007-11-01 02:30:35 +00:00
Chris Lattner
74709473ed
Fix InstCombine/2007-10-31-RangeCrash.ll
...
llvm-svn: 43596
2007-11-01 02:18:41 +00:00
Devang Patel
17833d7068
New test.
...
llvm-svn: 43527
2007-10-30 23:07:47 +00:00
Evan Cheng
c2dbfee43f
It's not safe to tell SplitCriticalEdge to merge identical edges. It may delete the phi instruction that's being processed.
...
llvm-svn: 43524
2007-10-30 22:27:26 +00:00
Dan Gohman
9f39660c20
Add support for folding binary operators with vector zero operands.
...
llvm-svn: 43510
2007-10-30 19:00:49 +00:00
Evan Cheng
b024c4c81d
- Bug fixes.
...
- Allow icmp rewrite using an iv / stride of a smaller integer type.
llvm-svn: 43480
2007-10-29 22:07:18 +00:00
Dan Gohman
ae95d72a52
Fix a DAGCombiner abort on a bitcast from a scalar to a vector.
...
llvm-svn: 43470
2007-10-29 20:44:42 +00:00
Evan Cheng
e106e2f142
Enable more fold (sext (load x)) -> (sext (truncate (sextload x)))
...
transformation. Previously, it's restricted by ensuring the number of load uses
is one. Now the restriction is loosened up by allowing setcc uses to be
"extended" (e.g. setcc x, c, eq -> setcc sext(x), sext(c), eq).
llvm-svn: 43465
2007-10-29 19:58:20 +00:00
Chris Lattner
00860d7574
update testcase
...
llvm-svn: 43452
2007-10-29 17:06:35 +00:00
Chris Lattner
c541c3ee15
Model stacksave and stackrestore as both writing memory, since we
...
don't model their dependences on allocas correctly. This fixes
PR1745.
llvm-svn: 43442
2007-10-29 05:47:52 +00:00
Chris Lattner
5e99fd8c0d
Add support for the x86-64 'q' regigster modifier, and add support for the
...
b/h/w/k/q inline asm memory modifiers, which are just ignored. This fixes
PR1748 and CodeGen/X86/2007-10-28-inlineasm-q-modifier.ll
llvm-svn: 43430
2007-10-29 03:09:07 +00:00
Chris Lattner
9a641510bd
Fix PR1749 and InstCombine/2007-10-28-EmptyField.ll by handling
...
zero-length fields better.
llvm-svn: 43427
2007-10-29 02:40:02 +00:00
Chris Lattner
4a15e04aee
Fix PR1752 and LoopSimplify/2007-10-28-InvokeCrash.ll: terminators
...
can have uses too. Wouldn't it be nice if invoke didn't exist? :)
llvm-svn: 43426
2007-10-29 02:30:37 +00:00
Bill Wendling
2305de81a4
Test to make sure that if we have an unaligned memcpy, it will still compile.
...
llvm-svn: 43412
2007-10-26 23:43:35 +00:00
Bill Wendling
b0bfd69684
On second thought. Remove this as it should never be generated in the first
...
place.
llvm-svn: 43400
2007-10-26 20:34:37 +00:00
Bill Wendling
6d15b32c15
- Remove the hacky code that forces a memcpy. Alignment is taken care of in the
...
FE.
- Explicitly pass in the alignment of the load & store.
- XFAIL 2007-10-23-UnalignedMemcpy.ll because llc has a bug that crashes on
unaligned pointers.
llvm-svn: 43398
2007-10-26 20:24:42 +00:00
Evan Cheng
7f3d02471d
Loosen up iv reuse to allow reuse of the same stride but a larger type when truncating from the larger type to smaller type is free.
...
e.g.
Turns this loop:
LBB1_1: # entry.bb_crit_edge
xorl %ecx, %ecx
xorw %dx, %dx
movw %dx, %si
LBB1_2: # bb
movl L_X$non_lazy_ptr, %edi
movw %si, (%edi)
movl L_Y$non_lazy_ptr, %edi
movw %dx, (%edi)
addw $4, %dx
incw %si
incl %ecx
cmpl %eax, %ecx
jne LBB1_2 # bb
into
LBB1_1: # entry.bb_crit_edge
xorl %ecx, %ecx
xorw %dx, %dx
LBB1_2: # bb
movl L_X$non_lazy_ptr, %esi
movw %cx, (%esi)
movl L_Y$non_lazy_ptr, %esi
movw %dx, (%esi)
addw $4, %dx
incl %ecx
cmpl %eax, %ecx
jne LBB1_2 # bb
llvm-svn: 43375
2007-10-26 01:56:11 +00:00
Evan Cheng
133694db06
If a loop termination compare instruction is the only use of its stride,
...
and the compaison is against a constant value, try eliminate the stride
by moving the compare instruction to another stride and change its
constant operand accordingly. e.g.
loop:
...
v1 = v1 + 3
v2 = v2 + 1
if (v2 < 10) goto loop
=>
loop:
...
v1 = v1 + 3
if (v1 < 30) goto loop
llvm-svn: 43336
2007-10-25 09:11:16 +00:00
Owen Anderson
7827a3f366
Fix for PR1741.
...
llvm-svn: 43326
2007-10-25 02:36:18 +00:00
Dale Johannesen
ea839ef1f0
Testcase for PR 1397.
...
llvm-svn: 43323
2007-10-25 00:50:14 +00:00
Dale Johannesen
52bbe1b171
This was failing on Darwin, which defaults to PIC;
...
no lea was generated. I think this follows the intent.
llvm-svn: 43312
2007-10-24 20:58:14 +00:00
Chris Lattner
c62877e9da
Implement a couple of foldings for ordered and unordered comparisons,
...
implementing cases related to PR1738.
llvm-svn: 43289
2007-10-24 05:38:08 +00:00
Bill Wendling
e3b859298a
If there's an unaligned memcpy to/from the stack, don't lower it. Just call the
...
memcpy library function instead.
llvm-svn: 43270
2007-10-23 23:32:40 +00:00
Chris Lattner
07ae732cc4
new testcase
...
llvm-svn: 43252
2007-10-23 18:07:23 +00:00
Chris Lattner
788f0d340a
llvm/test programs should not be execution programs. This
...
will hopefully fix Gabor's Sparc problem.
llvm-svn: 43251
2007-10-23 17:56:04 +00:00
Evan Cheng
ec271b104c
Temporary solution: added a different set of BCTRL_Macho / BCTRL_ELF with right callee-saved defs set for ppc64.
...
llvm-svn: 43248
2007-10-23 06:42:42 +00:00
Evan Cheng
1f2dd35898
Fix memcpy lowering when addresses are 4-byte aligned but size is not multiple of 4.
...
llvm-svn: 43234
2007-10-22 22:11:27 +00:00
Dan Gohman
e0c3d9f338
Strength reduction improvements.
...
- Avoid attempting stride-reuse in the case that there are users that
aren't addresses. In that case, there will be places where the
multiplications won't be folded away, so it's better to try to
strength-reduce them.
- Several SSE intrinsics have operands that strength-reduction can
treat as addresses. The previous item makes this more visible, as
any non-address use of an IV can inhibit stride-reuse.
- Make ValidStride aware of whether there's likely to be a base
register in the address computation. This prevents it from thinking
that things like stride 9 are valid on x86 when the base register is
already occupied.
Also, XFAIL the 2007-08-10-LEA16Use32.ll test; the new logic to avoid
stride-reuse elimintes the LEA in the loop, so the test is no longer
testing what it was intended to test.
llvm-svn: 43231
2007-10-22 20:40:42 +00:00
Dan Gohman
bf474959a3
Fix the folding of multiplication into addresses on x86, which was broken
...
by the recent {U,S}MUL_LOHI changes.
llvm-svn: 43230
2007-10-22 20:22:24 +00:00
Evan Cheng
bdbed66333
Use ptr type in the immediate field of a BxA instruction so we don't end up selecting 32-bit call instruction for ppc64.
...
llvm-svn: 43228
2007-10-22 19:46:19 +00:00
Evan Cheng
f52a6fc50c
New test case.
...
llvm-svn: 43193
2007-10-19 22:05:00 +00:00
Bill Wendling
ac5c93040f
Don't branch fold inline asm statements.
...
llvm-svn: 43191
2007-10-19 21:09:55 +00:00
Bill Wendling
b5bc897864
Removed "-arch i386" by popular demand...
...
llvm-svn: 43186
2007-10-19 18:49:16 +00:00
Bill Wendling
5f1a253a3f
Now with RUN line!
...
llvm-svn: 43185
2007-10-19 18:40:53 +00:00
Bill Wendling
89151b1f0a
Remove the Foundation.h file because not everyone has that.
...
llvm-svn: 43184
2007-10-19 18:36:04 +00:00
Devang Patel
c0ced49a14
This test now passes.
...
llvm-svn: 43183
2007-10-19 17:11:01 +00:00
Rafael Espindola
813a0b1d29
Test byval with a 8 bit aligned struct
...
llvm-svn: 43173
2007-10-19 11:29:21 +00:00
Rafael Espindola
846c19dd70
Add support for byval function whose argument is not 32 bit aligned.
...
To do this it is necessary to add a "always inline" argument to the
memcpy node. For completeness I have also added this node to memmove
and memset. I have also added getMem* functions, because the extra
argument makes it cumbersome to use getNode and because I get confused
by it :-)
llvm-svn: 43172
2007-10-19 10:41:11 +00:00
Devang Patel
e1b7fa3410
New test.
...
llvm-svn: 43162
2007-10-19 01:28:02 +00:00
Chris Lattner
9715d9fb59
Fix PR1735 and Transforms/DeadArgElim/2007-10-18-VarargsReturn.ll by
...
fixing some obviously broken code :(
llvm-svn: 43141
2007-10-18 18:49:29 +00:00
Bill Wendling
5616a608df
Fix the command line.
...
llvm-svn: 43140
2007-10-18 18:26:40 +00:00
Devang Patel
371a5ef1de
Fix test.
...
llvm-svn: 43136
2007-10-18 17:54:49 +00:00
Bill Wendling
070aca5d25
Pointer arithmetic should be done with the index the same size as the pointer.
...
llvm-svn: 43120
2007-10-18 08:32:37 +00:00
Evan Cheng
e6a41c066a
Really fix PR1734. Carefully track which register uses are sub-register uses by
...
traversing inverse register coalescing map.
llvm-svn: 43118
2007-10-18 07:49:59 +00:00
Devang Patel
9497767458
XFAIL for now.
...
llvm-svn: 43111
2007-10-18 00:48:43 +00:00
Bill Wendling
37f888e6e8
Test to make sure we don't generate unwind info for non-64-bit Objective-C.
...
llvm-svn: 43102
2007-10-17 23:14:56 +00:00
Devang Patel
b3dac3f5d9
Do not raise free() call that is called through invoke instruction.
...
llvm-svn: 43083
2007-10-17 20:12:58 +00:00
Dan Gohman
8f518b9875
Add support for ISD::SELECT in SplitVectorOp.
...
llvm-svn: 43072
2007-10-17 14:48:28 +00:00
Devang Patel
91ff13edcc
Apply "Instead of loading small c string constant, use integer constant directly" transformation while processing load instruction.
...
llvm-svn: 43070
2007-10-17 07:24:40 +00:00