Cameron Zwarich
8c00d690f5
Ignore debug values when performing MachineVerifier liveness checks. Fixes
...
PR8822.
llvm-svn: 122207
2010-12-20 00:08:10 +00:00
Mon P Wang
d3adab7a64
Prevents PerformShuffleCombine from creating a node with an illegal type after legalize types
...
has run, e.g., prevent creating an i64 node from a v2i64 when i64 is not a legal type.
llvm-svn: 122206
2010-12-19 23:55:53 +00:00
Cameron Zwarich
c8dfbe7503
Early clobber operands are allowed to be defined at use indices. This fixes one
...
half of PR8813.
llvm-svn: 122205
2010-12-19 23:50:53 +00:00
Chris Lattner
c8327b2f7c
fix an oversight caught by Frits!
...
llvm-svn: 122204
2010-12-19 23:24:04 +00:00
Bruno Cardoso Lopes
41ed6e3571
Update the Target Feature Matrix for Mips
...
llvm-svn: 122203
2010-12-19 22:41:43 +00:00
Cameron Zwarich
6f5c1021ba
Fix PR8815 by checking for an explicit clobber def tied to a use operand in
...
ConnectedVNInfoEqClasses::Classify().
llvm-svn: 122202
2010-12-19 22:12:45 +00:00
Chris Lattner
297259f6f1
improve the setcc -> setcc_carry optimization to happen more
...
consistently by moving it out of lowering into dag combine.
Add some missing patterns for matching away extended versions of setcc_c.
llvm-svn: 122201
2010-12-19 22:08:31 +00:00
Cameron Zwarich
37aec9c35d
Fix PR8811 by teaching MachineVerifier about optional defs.
...
llvm-svn: 122199
2010-12-19 21:37:23 +00:00
Cameron Zwarich
64fbc5e267
StrongPHIElimination will never run before TwoAddressInstructionPass.
...
llvm-svn: 122197
2010-12-19 21:32:29 +00:00
Chris Lattner
1f31c7fa15
simplify some code to just reuse a setcc if we can instead of
...
going through the CSE maps to get it.
llvm-svn: 122196
2010-12-19 21:23:48 +00:00
Nick Lewycky
de10f6132c
Use the new way of silencing this warning.
...
llvm-svn: 122195
2010-12-19 20:57:14 +00:00
Nick Lewycky
c85935836b
Add missing standard headers. Patch by Joerg Sonnenberger!
...
llvm-svn: 122193
2010-12-19 20:43:38 +00:00
Nick Lewycky
e718af6c63
Add missing std:: prefixes to some calls. C++ doesn't require that <cfoo>
...
headers provide symbols outside namespace std and the LLVM coding standards
state that we should prefix all of them.
llvm-svn: 122192
2010-12-19 20:42:43 +00:00
Chris Lattner
92dcd2af36
teach MaskedValueIsZero how to analyze ADDE. This is
...
enough to teach it that ADDE(0,0) is known 0 except the
low bit, for example.
llvm-svn: 122191
2010-12-19 20:38:28 +00:00
Chris Lattner
45f7e2d4cb
tidy up
...
llvm-svn: 122190
2010-12-19 20:24:28 +00:00
Chris Lattner
2d59eef5fd
now that generic vector types aren't selected onto MMX operations,
...
we don't need -disable-mmx anymore.
llvm-svn: 122189
2010-12-19 20:19:20 +00:00
Chris Lattner
ad85635a93
now that generic vector types aren't selected onto MMX registers, these
...
tests don't need -disable-mmx.
llvm-svn: 122188
2010-12-19 20:12:58 +00:00
Chris Lattner
30438e63c8
reduce copy/paste programming with the power of for loops.
...
llvm-svn: 122187
2010-12-19 20:07:10 +00:00
Chris Lattner
29475c23d0
X86 supports i8/i16 overflow ops (except i8 multiplies), we should
...
generate them.
Now we compile:
define zeroext i8 @X(i8 signext %a, i8 signext %b) nounwind ssp {
entry:
%0 = tail call %0 @llvm.sadd.with.overflow.i8(i8 %a, i8 %b)
%cmp = extractvalue %0 %0, 1
br i1 %cmp, label %if.then, label %if.end
into:
_X: ## @X
## BB#0: ## %entry
subl $12, %esp
movb 16(%esp), %al
addb 20(%esp), %al
jo LBB0_2
Before we were generating:
_X: ## @X
## BB#0: ## %entry
pushl %ebp
movl %esp, %ebp
subl $8, %esp
movb 12(%ebp), %al
testb %al, %al
setge %cl
movb 8(%ebp), %dl
testb %dl, %dl
setge %ah
cmpb %cl, %ah
sete %cl
addb %al, %dl
testb %dl, %dl
setge %al
cmpb %al, %ah
setne %al
andb %cl, %al
testb %al, %al
jne LBB0_2
llvm-svn: 122186
2010-12-19 20:03:11 +00:00
Chris Lattner
2d6a408c4c
add a general coverage test for overflow intrinsics.
...
llvm-svn: 122185
2010-12-19 20:01:13 +00:00
Chris Lattner
7858cb9c08
move a transformation to a more logical place, simplifying it.
...
llvm-svn: 122183
2010-12-19 19:43:52 +00:00
Chris Lattner
3bc741a0d2
recognize an unsigned add with overflow idiom into uadd.
...
This resolves a README entry and technically resolves PR4916,
but we still get poor code for the testcase in that PR because
GVN isn't CSE'ing uadd with add, filed as PR8817.
Previously we got:
_test7: ## @test7
addq %rsi, %rdi
cmpq %rdi, %rsi
movl $42, %eax
cmovaq %rsi, %rax
ret
Now we get:
_test7: ## @test7
addq %rsi, %rdi
movl $42, %eax
cmovbq %rsi, %rax
ret
llvm-svn: 122182
2010-12-19 19:37:52 +00:00
Chris Lattner
faef9b6bfb
optimize uadd(x, cst) into a comparison when the normal
...
result is dead. This is required for my next patch to not
regress the testsuite.
llvm-svn: 122181
2010-12-19 19:35:32 +00:00
Chris Lattner
4ce6f60782
add a version of IRBuilder::SetInsertPoint that takes an instruction.
...
llvm-svn: 122180
2010-12-19 19:16:22 +00:00
Chris Lattner
c5074803db
use IC.ReplaceInstUsesWith instead of a raw RAUW so that uses of
...
the old thing end up on the instcombine worklist. Not doing this
can cause an extra top-level iteration of instcombine, burning
compile time.
llvm-svn: 122179
2010-12-19 18:38:44 +00:00
Chris Lattner
d1f114d8f2
generalize the sadd creation code to not require that the
...
sadd formed is half the size of the original type. We can
now compile this into a sadd.i8:
unsigned char X(char a, char b) {
int res = a+b;
if ((unsigned )(res+128) > 255U)
abort();
return res;
}
llvm-svn: 122178
2010-12-19 18:35:09 +00:00
Chris Lattner
bb0d067691
fix another miscompile in the llvm.sadd formation logic: it wasn't
...
checking to see if the high bits of the original add result were dead.
Inserting a smaller add and zexting back to that size is not good enough.
This is likely to be the fix for 8816.
llvm-svn: 122177
2010-12-19 18:22:06 +00:00
Cameron Zwarich
163792fb1f
Remove some checks for StrongPHIElim. These checks make it impossible to use an
...
alternative register allocator that does not require LiveIntervals by specifying
it on the command-line for a target that has StrongPHIElimination enabled by
default.
These checks are pretty meaningless anyways, since StrongPHIElimination and
PHIElimination are never used at the same time.
llvm-svn: 122176
2010-12-19 18:03:27 +00:00
Chris Lattner
c7876edb16
fix a bug (possibly 8816) in the sadd forming xform: it isn't
...
profitable (or safe) to promote code when the add-with-constant
has other uses.
llvm-svn: 122175
2010-12-19 17:59:02 +00:00
Chris Lattner
cc804862d5
rework the code added in r122072 to pull it out to its own
...
helper function, clean up comments, and reduce indentation.
No functionality change.
llvm-svn: 122174
2010-12-19 17:52:50 +00:00
Chris Lattner
bb93cd80d6
Enhance LICM to promote alias sets whose pointers themselves are stored,
...
which doesn't affect the memory address being promoted.
llvm-svn: 122172
2010-12-19 05:57:25 +00:00
Chris Lattner
71fcecf597
fix PR8602, a bug in an assertion: a volatile store *of* a pointer
...
does not make the alias set for that pointer volatile, just stores
*to* the pointer.
llvm-svn: 122171
2010-12-19 05:51:54 +00:00
Chris Lattner
ac82ea26da
fix PR8642: if a critical edge has a PHI value that can trap,
...
isel is *required* to split the edge. PHI values get evaluated
on the edge, not in their predecessor block.
llvm-svn: 122170
2010-12-19 04:58:57 +00:00
Chris Lattner
70cfded393
remove dead header
...
llvm-svn: 122169
2010-12-19 04:49:11 +00:00
Chris Lattner
0965f3f76d
revert r122164, I'm going to go with a different approach.
...
llvm-svn: 122168
2010-12-19 04:23:03 +00:00
Rafael Espindola
894b34478f
Fixed version of 122160 (the previous one would fold undefined symbols).
...
llvm-svn: 122167
2010-12-19 04:18:56 +00:00
Rafael Espindola
702b7a3b37
Revert 122160 while I debug it.
...
llvm-svn: 122165
2010-12-19 03:22:05 +00:00
Chris Lattner
14a3e26146
first step to fixing PR8642: don't fold away empty basic blocks
...
which have trapping constant exprs in them due to PHI nodes.
Eliminating them can cause the constant expr to be evalutated
on new paths if the input edges are critical.
llvm-svn: 122164
2010-12-19 03:02:34 +00:00
Chris Lattner
1cc35d2472
move this test into the ARM test so that it is only run when the arm backend
...
is enabled.
llvm-svn: 122163
2010-12-19 02:58:14 +00:00
Rafael Espindola
50fd4aa80f
Move all folding to AttemptToFoldSymbolOffsetDifference.
...
llvm-svn: 122160
2010-12-19 02:15:04 +00:00
Michael J. Spencer
0e0c7c269f
Support/PathV1: Clarify deprecation warning.
...
llvm-svn: 122159
2010-12-18 22:23:24 +00:00
Michael J. Spencer
6269cd9426
Fix whitespace.
...
llvm-svn: 122158
2010-12-18 22:23:15 +00:00
Michael J. Spencer
4701f704be
Support/PathV1: Deprecate get{Basename,Dirname,Suffix}.
...
llvm-svn: 122157
2010-12-18 22:23:07 +00:00
Chris Lattner
25d76d1e53
simplify this a bit.
...
llvm-svn: 122156
2010-12-18 20:22:49 +00:00
Anton Korobeynikov
f49c9c02d6
Restore the behavior of frame lowering before my refactoring.
...
It turns out that ppc backend has really weird interdependencies
over different hooks and all stuff is fragile wrt small changes.
This should fix PR8749
llvm-svn: 122155
2010-12-18 19:53:14 +00:00
Benjamin Kramer
84d3e6cfd0
Just rename the functions, relying on matching a instruction that has the same name as a symbol is way too fragile.
...
llvm-svn: 122154
2010-12-18 14:23:57 +00:00
Benjamin Kramer
4d591385d1
Test more than just label names and make test work on non-x86 hosts.
...
llvm-svn: 122153
2010-12-18 14:07:28 +00:00
Eric Christopher
4e2b6c0e28
Header warning patrol.
...
llvm-svn: 122152
2010-12-18 10:54:29 +00:00
Roman Divacky
ed5bb14415
Add support for lexing single quotes like 'c'.
...
This fixed 8615.
llvm-svn: 122150
2010-12-18 08:56:37 +00:00
Owen Anderson
7103acd18e
Revert r122143 through r122140, which collectively broke the LLVMC tests on
...
the buildbots.
llvm-svn: 122149
2010-12-18 07:37:18 +00:00