Duncan Sands
26e54f3570
Teach constant folding that an inttoptr of a
...
ptrtoint can be turned into a bitcast if the
integer is at least as wide as a pointer.
llvm-svn: 54752
2008-08-13 20:20:35 +00:00
Devang Patel
a82e51a430
Check sign to detect overflow before changing compare stride.
...
llvm-svn: 54710
2008-08-13 02:05:14 +00:00
Dan Gohman
37da9e9dbd
Extend ScalarEvolution's executesAtLeastOnce logic to be able to
...
continue past the first conditional branch when looking for a
relevant test. This helps it avoid using MAX expressions in
loop trip counts in more cases.
llvm-svn: 54697
2008-08-12 20:17:31 +00:00
Chris Lattner
ae09ade343
Implement support for simplifying vector comparisons by 0.0 and 1.0 like we
...
do for scalars. Patch contributed by Nicolas Capens
This also generalizes the previous xforms to work on long double, now that
isExactlyValue works for long double.
llvm-svn: 54653
2008-08-11 22:06:05 +00:00
Dan Gohman
6789ef32d7
Improve the grep commands for this test to be tolerant of ABI
...
differences, and to be more specific.
llvm-svn: 54648
2008-08-11 20:10:41 +00:00
Dan Gohman
a27ed39f05
Take the FrameOffset into account when computing the alignment
...
of stack objects. This fixes PR2656.
llvm-svn: 54646
2008-08-11 18:27:03 +00:00
Gordon Henriksen
b3806a3386
[PR-2610] Adding Ocaml bindings for Switch::addCase.
...
llvm-svn: 54571
2008-08-09 01:55:52 +00:00
Dan Gohman
ac992cdc1c
Add an EXTRACTPSmr pattern to match the pattern that
...
X86ISelLowering creates.
llvm-svn: 54544
2008-08-08 18:30:21 +00:00
Nick Lewycky
732ffeba9e
Testcase for r54520.
...
llvm-svn: 54521
2008-08-08 07:00:26 +00:00
Evan Cheng
4708df4776
It's not legal to output a GV in a coalesced section if it's used in an ARM PIC relative constantpool.
...
llvm-svn: 54519
2008-08-08 06:56:16 +00:00
Nick Lewycky
19a341cf57
Don't crash printing the asm for a ConstantExpr PtrToInt just because the int
...
is narrower than the pointer. This testcase emits:
.byte (((17) - 16) & 255)
llvm-svn: 54517
2008-08-08 06:34:07 +00:00
Bruno Cardoso Lopes
f8906a40ab
Support added for ctlz intrinsic, test case added.
...
llvm-svn: 54516
2008-08-08 06:16:31 +00:00
Bruno Cardoso Lopes
91abeb9458
[Last] Batch 7 of Mips CodeGen tests
...
llvm-svn: 54512
2008-08-08 04:12:42 +00:00
Bruno Cardoso Lopes
c4f524b9d1
Batch 6 of Mips CodeGen tests
...
llvm-svn: 54511
2008-08-08 04:11:30 +00:00
Bruno Cardoso Lopes
772cf1643c
Batch 5 of Mips CodeGen tests
...
llvm-svn: 54510
2008-08-08 04:09:57 +00:00
Bruno Cardoso Lopes
7d4b844ee8
Batch 4 of Mips CodeGen tests
...
llvm-svn: 54509
2008-08-08 04:08:30 +00:00
Bruno Cardoso Lopes
06380b7221
Batch 3 of Mips CodeGen tests
...
llvm-svn: 54508
2008-08-08 04:05:51 +00:00
Bruno Cardoso Lopes
96efb82258
Batch 2 of Mips CodeGen tests
...
llvm-svn: 54507
2008-08-08 04:03:25 +00:00
Bruno Cardoso Lopes
42b4e15d50
Batch 1 of Mips CodeGen tests, more coming...
...
I had a lot of simple local codegen tests and they are now ready to be placed
in test/CodeGen.
llvm-svn: 54506
2008-08-08 03:58:34 +00:00
Dale Johannesen
5eb500cbdd
Testcases for 54503. One derived from PR 2533, the
...
other from Python.
llvm-svn: 54505
2008-08-08 03:37:11 +00:00
Duncan Sands
71f59d9ee9
Use correct compiler component names for objc
...
and objc++.
llvm-svn: 54474
2008-08-07 17:59:54 +00:00
Duncan Sands
99bb8eeb13
Move tests of the ObjC++ front-end to their own
...
directory: some people (guess who!) may build llvm-gcc
with support for objc but not with support for objc++.
llvm-svn: 54471
2008-08-07 17:48:08 +00:00
Matthijs Kooijman
cb2af3cd69
Add a basic test for the SRETPromotion pass.
...
llvm-svn: 54466
2008-08-07 15:55:18 +00:00
Matthijs Kooijman
7f32ea1320
Move two tests from SRETPromotion to Inline, since they only call opt -inline.
...
llvm-svn: 54465
2008-08-07 15:36:46 +00:00
Anton Korobeynikov
52d0ff92cc
Print section flags ok on platforms, which use '@' as comment string. Fix test.
...
llvm-svn: 54460
2008-08-07 09:55:06 +00:00
Dan Gohman
74fa421281
Re-enable elimination of unnecessary SUBREG_TO_REG instructions in
...
LowerSubregs, and fix an x86-64 isel bug that this exposed.
SUBREG_TO_REG for x86-64 implicit zero extension is only safe for
isel to generate when the source is known to always have zeros in
the high 32 bits. The EXTRACT_SUBREG instruction does not clear
the high 32 bits.
llvm-svn: 54444
2008-08-07 02:54:50 +00:00
Dan Gohman
1674a7c2f3
Add an extra example that shouldn't get an and instruction.
...
llvm-svn: 54443
2008-08-07 02:23:06 +00:00
Dan Gohman
cc784f1662
Re-introduce the 8-bit subreg zext-inreg patterns for x86-32,
...
this time using MOV32to32_ and MOV16to16_. Thanks to Evan for
suggesting this.
llvm-svn: 54418
2008-08-06 18:27:21 +00:00
Dan Gohman
4ad77e1ca2
Fix a shufflevector instcombine that was emitting invalid masks indices
...
when it meant to be emitting undef indices.
llvm-svn: 54417
2008-08-06 18:17:32 +00:00
Evan Cheng
cbb33fb6e8
PR2535, not PR2355.
...
llvm-svn: 54416
2008-08-06 18:06:48 +00:00
Evan Cheng
c5cc2cb4aa
Fix PR2355: bug in ChangeCompareStride. When the loop termination compare is the only use of its iv stride, the stride can be eliminated by moving it to another stride. If the scale is negative, swap the predicate instead of using a inverse predicate.
...
llvm-svn: 54415
2008-08-06 18:04:43 +00:00
Chris Lattner
55b99a6739
optimize a common idiom generated by clang for bitfield access, PR2638.
...
llvm-svn: 54408
2008-08-06 07:35:52 +00:00
Chris Lattner
cae04940bd
Zap sitofp/fptoui pairs. In all cases when the sign difference
...
matters, the result is undefined anyway.
llvm-svn: 54396
2008-08-06 05:13:06 +00:00
Nick Lewycky
0bf3c812d2
Reinstate this optimization, but without the miscompile. Thanks to Bill for
...
tracking down that this was breaking llvm-gcc bootstrap on Linux.
llvm-svn: 54394
2008-08-06 04:54:03 +00:00
Bill Wendling
1854852a75
Just grep for through the LL code instead of the ASM code
...
llvm-svn: 54389
2008-08-06 00:10:32 +00:00
Bill Wendling
aea14c2dfe
Add default architecture.
...
llvm-svn: 54384
2008-08-05 23:36:00 +00:00
Bill Wendling
f69c83e554
Testcase for PR2629.
...
llvm-svn: 54377
2008-08-05 22:23:59 +00:00
Evan Cheng
f4d1119fbd
Fix PR2620: Fix X86cmppd selection code so it expects operands to be v2f64.
...
llvm-svn: 54376
2008-08-05 22:19:15 +00:00
Evan Cheng
a07795a0c3
Fix PR2596: out of bound reference.
...
llvm-svn: 54375
2008-08-05 21:51:46 +00:00
Bill Wendling
3882f060ef
Revert r53282. This was causing a miscompile on Linux. Also, the transformation
...
looks bogus. Please see PR2629 for details on why this is breaking things.
llvm-svn: 54372
2008-08-05 21:23:45 +00:00
Owen Anderson
d1185e4da3
Update the remaining tests not to use -disable-correct-folding, and remove two
...
that couldn't be updated.
llvm-svn: 54359
2008-08-05 18:19:14 +00:00
Owen Anderson
117b0e405d
One more -disable-correct-folding case removed.
...
llvm-svn: 54358
2008-08-05 18:08:56 +00:00
Owen Anderson
c5fd801d85
Remove another -disable-correct-folding use.
...
llvm-svn: 54357
2008-08-05 18:05:58 +00:00
Owen Anderson
f845ea8d52
Eliminate another use of -disable-correct-folding.
...
llvm-svn: 54356
2008-08-05 18:03:01 +00:00
Owen Anderson
4c7ea0c270
This check is unnecessary, and getting rid of it removes a use of -disable-correct-folding.
...
llvm-svn: 54355
2008-08-05 17:52:54 +00:00
Owen Anderson
7fca48d0bd
Remove the need for -disable-correct-folding from this test.
...
llvm-svn: 54354
2008-08-05 17:49:52 +00:00
Dan Gohman
51a5eb52c5
Fix the AsmWriter to not print extra spaces after parameter attributes.
...
llvm-svn: 54351
2008-08-05 15:51:44 +00:00
Evan Cheng
754148a2ec
Fix PR2568: Fix bug that cause redudant kill marker after its live interval has been extended due to coalescing.
...
llvm-svn: 54346
2008-08-05 07:10:38 +00:00
Owen Anderson
231111faf9
Update these tests to work by disabling the new correct CFG generation. This flag should ONLY be used to for tests like these.
...
llvm-svn: 54334
2008-08-04 23:55:29 +00:00
Eli Friedman
ef366a16a2
PR2621: Improvements to the SCEV AddRec binomial expansion. This
...
version uses a new algorithm for evaluating the binomial coefficients
which is significantly more efficient for AddRecs of more than 2 terms
(see the comments in the code for details on how the algorithm works).
It also fixes some bugs: it removes the arbitrary length restriction for
AddRecs, it fixes the silent generation of incorrect code for AddRecs
which require a wide calculation width, and it fixes an issue where we
were incorrectly truncating the iteration count too far when evaluating
an AddRec expression narrower than the induction variable.
There are still a few related issues I know of: I think there's
still an issue with the SCEVExpander expansion of AddRec in terms of
the width of the induction variable used. The hack to avoid generating
too-wide integers shouldn't be necessary; instead, the callers should be
considering the cost of the expansion before expanding it (in addition
to not expanding too-wide integers, we might not want to expand
expressions that are really expensive, especially when optimizing for
size; calculating an length-17 32-bit AddRec currently generates about 250
instructions of straight-line code on X86). Also, for long 32-bit
AddRecs on X86, CodeGen really sucks at scheduling the code. I'm planning on
filing follow-up PRs for these issues.
llvm-svn: 54332
2008-08-04 23:49:06 +00:00