Dan Gohman
2171f5aeec
Reposition the DebugLoc field to reduce padding space
...
on LP64 hosts.
llvm-svn: 63530
2009-02-02 18:04:24 +00:00
Chris Lattner
18eba4f211
Fix a bug which caused us to miscompile a couple of Ada
...
tests. Thanks for the beautiful reduced testcase Duncan!
llvm-svn: 63529
2009-02-02 18:02:59 +00:00
Douglas Gregor
7946ef9fe0
Slim down the specific_decl_iterator, since NULL denotes the end of the range. Good eyes, Chris
...
llvm-svn: 63528
2009-02-02 17:56:05 +00:00
Devang Patel
97ba824ad9
Do not add redundant arguments in a method definition DIE.
...
llvm-svn: 63527
2009-02-02 17:51:41 +00:00
Devang Patel
e7a112111a
Make this test case smaller.
...
llvm-svn: 63526
2009-02-02 17:50:43 +00:00
Douglas Gregor
a5c9e1ae93
Check value-initializations that occur when an initializer list
...
provides too few elements.
llvm-svn: 63525
2009-02-02 17:43:21 +00:00
Sanjiv Gupta
8e56d1898b
Duncan's patch. Further to 64382. Takes care of illegal types for shift amount.
...
llvm-svn: 63523
2009-02-02 17:19:39 +00:00
Steve Naroff
f26a1d4ef7
RewriteObjC::RewriteBlockDeclRefExpr(): Add parens to enforce precedence. This fixes <rdar://problem/6529468> clang ObjC rewriter: Need parenthesis around dereferences in rewritten Blocks.
...
Also changed RewriteObjC::SynthesizeBlockFunc() to declare a pointer to the block argument even when there are no user-supplied arguments to the block.
llvm-svn: 63522
2009-02-02 17:19:26 +00:00
Sanjiv Gupta
50aeb12d80
Made the common case of default address space directive as non-virtual for performance reasons. Provide a single virtual interface for directives of all sizes in non-default address spaces.
...
llvm-svn: 63521
2009-02-02 16:53:06 +00:00
Nuno Lopes
598afdcfe7
allow cast from array to int to be considered as constant
...
llvm-svn: 63519
2009-02-02 16:07:41 +00:00
Nuno Lopes
0c92d25f2b
avoid creating tmp files elsewhere
...
llvm-svn: 63518
2009-02-02 15:33:56 +00:00
Nuno Lopes
8877f99f9d
fix PR3459: improve compatibility with gcc when checking for constant exprs
...
llvm-svn: 63517
2009-02-02 15:00:55 +00:00
Duncan Sands
6f361ff345
Fix a comment (bytes -> bits), reformat a comment
...
and remove trailing whitespace. No functionality
change.
llvm-svn: 63511
2009-02-02 10:06:20 +00:00
Duncan Sands
33d6e97e33
Fix an obvious thinko.
...
llvm-svn: 63510
2009-02-02 09:53:14 +00:00
Evan Cheng
dc636c4080
ADD / SUB / SMUL / UMUL with overflow second result top bits must be zero.
...
llvm-svn: 63509
2009-02-02 09:15:04 +00:00
Duncan Sands
7e4cb0a1cf
This passes on x86-32 linux at least.
...
llvm-svn: 63508
2009-02-02 09:10:57 +00:00
Duncan Sands
dca376ff07
Make the XFAIL line actually match x86-32 targets.
...
llvm-svn: 63507
2009-02-02 09:07:13 +00:00
Evan Cheng
4988c597b3
Add comment.
...
llvm-svn: 63506
2009-02-02 08:19:07 +00:00
Evan Cheng
50e15bdf81
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
Chris Lattner
b2b177393c
reject things like: zext <4 x i32> %tmp to i256
...
llvm-svn: 63504
2009-02-02 07:40:17 +00:00
Chris Lattner
5e66858152
validation error fix.
...
llvm-svn: 63503
2009-02-02 07:33:15 +00:00
Chris Lattner
cf7a584341
Document type upreferences (PR3380), patch by Stein Roger Skafløtten
...
with enhancements and corrections by me.
llvm-svn: 63502
2009-02-02 07:32:36 +00:00
Chris Lattner
1f386b8ec8
Fix PR3372
...
llvm-svn: 63501
2009-02-02 07:24:28 +00:00
Chris Lattner
1aafe4cece
reduce indentation, (~XorCST->getValue()).isSignBit() -> isMaxSignedValue()
...
llvm-svn: 63500
2009-02-02 07:15:30 +00:00
Chris Lattner
c4eb63d412
reduce testcase.
...
llvm-svn: 63499
2009-02-02 06:55:45 +00:00
Mon P Wang
cc866c955c
Preserve more SourceValue information.
...
llvm-svn: 63498
2009-02-02 06:37:55 +00:00
Torok Edwin
c418287974
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
a2d1f35e9a
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
3ed768868d
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
Bill Wendling
a6c75ffd73
Forgot some more DebugLoc propagations.
...
llvm-svn: 63493
2009-02-01 11:19:36 +00:00
Owen Anderson
19616c08a0
Fix test failures causes by my previous commit.
...
llvm-svn: 63492
2009-02-01 08:41:54 +00:00
Eli Friedman
1f90fe17f9
Fix for PR3447: use padded sizes for computations on struct/union
...
constants.
llvm-svn: 63491
2009-02-01 08:12:19 +00:00
Owen Anderson
66838e9a27
Fix an issue in PHI construction that was exposed by GCC 4.2 producing a different set iteration order for the reg_iterator.
...
llvm-svn: 63490
2009-02-01 07:06:00 +00:00
Evan Cheng
676130f2e1
Fix PR3423: Link llvm on ARM EABI machines. Patch by Robert Schuster.
...
llvm-svn: 63489
2009-02-01 06:42:27 +00:00
Dale Johannesen
dfbb6a1a9a
DebugLoc propagation.
...
llvm-svn: 63488
2009-01-31 22:04:51 +00:00
Nick Lewycky
f23908151a
Reinstate this optimization to fold icmp of xor when possible. Don't try to
...
turn icmp eq a+x, b+x into icmp eq a, b if a+x or b+x has other uses. This
may have been increasing register pressure leading to the bzip2 slowdown.
llvm-svn: 63487
2009-01-31 21:30:05 +00:00
Dale Johannesen
5f98ea28ca
DebugLoc propagation. Done with file.
...
llvm-svn: 63486
2009-01-31 21:04:24 +00:00
Dale Johannesen
4d9fa9e71d
DebugLoc propagation. Done with file.
...
llvm-svn: 63485
2009-01-31 20:01:02 +00:00
Anders Carlsson
12beab7085
Forgot to add this test.
...
llvm-svn: 63484
2009-01-31 19:07:49 +00:00
Chris Lattner
9e2b9f3234
Fix PR3452 (an infinite loop bootstrapping) by disabling the recent
...
improvements to the EvaluateInDifferentType code. This code works
by just inserted a bunch of new code and then seeing if it is
useful. Instcombine is not allowed to do this: it can only insert
new code if it is useful, and only when it is converging to a more
canonical fixed point. Now that we iterate when DCE makes progress,
this causes an infinite loop when the code ends up not being used.
llvm-svn: 63483
2009-01-31 19:05:27 +00:00
Duncan Sands
41826036b1
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
Chris Lattner
76a63ed099
now that all the pieces are in place, teach instcombine's
...
simplifydemandedbits to simplify instructions with *multiple
uses* in contexts where it can get away with it. This allows
it to simplify the code in multi-use-or.ll into a single 'add
double'.
This change is particularly interesting because it will cover
up for some common codegen bugs with large integers created due
to the recent SROA patch. When working on fixing those bugs,
this should be disabled.
llvm-svn: 63481
2009-01-31 08:40:03 +00:00
Chris Lattner
3e2cb66c56
simplify/clarify control flow and improve comments, no functionality change.
...
llvm-svn: 63480
2009-01-31 08:24:16 +00:00
Chris Lattner
83c6a141b8
make some fairly meaty internal changes to how SimplifyDemandedBits works.
...
Now, if it detects that "V" is the same as some other value,
SimplifyDemandedBits returns the new value instead of RAUW'ing it immediately.
This has two benefits:
1) simpler code in the recursive SimplifyDemandedBits routine.
2) it allows future fun stuff in instcombine where an operation has multiple
uses and can be simplified in one context, but not all.
#2 isn't implemented yet, this patch should have no functionality change.
llvm-svn: 63479
2009-01-31 08:15:18 +00:00
Chris Lattner
19efe30264
add accessors
...
llvm-svn: 63478
2009-01-31 07:34:19 +00:00
Chris Lattner
585cfb2ce7
minor cleanups
...
llvm-svn: 63477
2009-01-31 07:26:06 +00:00
Chris Lattner
94cfb281c3
make sure to set Changed=true when instcombine hacks on the code,
...
not doing so prevents it from properly iterating and prevents it
from deleting the entire body of dce-iterate.ll
llvm-svn: 63476
2009-01-31 07:04:22 +00:00
Mon P Wang
b6080cf943
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
cf9ba82324
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
Bill Wendling
3b585af0ec
Don't use DebugLoc::getUnknownLoc(). Default to something hopefully sensible.
...
llvm-svn: 63473
2009-01-31 03:12:48 +00:00