Evan Cheng
36b1f5476e
Instructions with unique labels or embedded jumptables cannot be duplicated during ifcvt.
...
llvm-svn: 37606
2007-06-15 21:15:00 +00:00
Evan Cheng
297d43be00
Added CanBeDuplicated(). It returns true if an instruction can be safely duplicated (e.g. during ifcvt).
...
llvm-svn: 37605
2007-06-15 21:13:54 +00:00
Tanya Lattner
a575a7dfda
test case for annotate attribute
...
llvm-svn: 37604
2007-06-15 20:52:47 +00:00
Tanya Lattner
cb1b96047d
Add local var annotation intrinsic.
...
llvm-svn: 37603
2007-06-15 20:50:54 +00:00
Dan Gohman
00cb117b07
Fold a binary operator with constant operands when expanding code for a SCEV.
...
llvm-svn: 37602
2007-06-15 19:21:55 +00:00
Chris Lattner
f852e339b6
Fix CodeGen/X86/inline-asm-x-scalar.ll:test4, by retaining regclass info
...
for tied register constraints.
llvm-svn: 37601
2007-06-15 19:11:01 +00:00
Chris Lattner
2d7f447a7a
make this test harder, include a tied register.
...
llvm-svn: 37600
2007-06-15 19:09:53 +00:00
Evan Cheng
234a90e83e
MachineInstr::isPredicable() is no longer needed.
...
llvm-svn: 37599
2007-06-15 19:06:07 +00:00
Evan Cheng
32312ad370
No longer needed.
...
llvm-svn: 37598
2007-06-15 19:05:13 +00:00
Duncan Sands
92bf2c628c
Workaround for PR1508.
...
llvm-svn: 37597
2007-06-15 19:04:19 +00:00
Dan Gohman
203a035251
Use SCEVConstant::get instead of SCEVUnknown::get to create an
...
integer constant SCEV.
llvm-svn: 37596
2007-06-15 18:00:55 +00:00
Owen Anderson
acaed06827
Fix test/Transforms/GVNPRE/2007-06-15-Looping.ll
...
llvm-svn: 37595
2007-06-15 17:55:15 +00:00
Owen Anderson
ad9743225e
Add a testcase where GVNPRE what getting confused by a loop.
...
llvm-svn: 37594
2007-06-15 17:54:05 +00:00
Evan Cheng
cd5f5e3ecd
Extra edges are deleted later if needed.
...
llvm-svn: 37593
2007-06-15 17:34:48 +00:00
Duncan Sands
8e21e69efb
Use "ignore" rather than grep tricks.
...
llvm-svn: 37592
2007-06-15 17:13:53 +00:00
Dan Gohman
cb9e09ad57
Add a SCEV class and supporting code for sign-extend expressions.
...
This created an ambiguity for expandInTy to decide when to use
sign-extension or zero-extension, but it turns out that most of its callers
don't actually need a type conversion, now that LLVM types don't have
explicit signedness. Drop expandInTy in favor of plain expand, and change
the few places that actually need a type conversion to do it themselves.
llvm-svn: 37591
2007-06-15 14:38:12 +00:00
Evan Cheng
92fb5453c3
Allow small blocks to be duplicated to enable if-conversion.
...
llvm-svn: 37590
2007-06-15 07:36:12 +00:00
Chris Lattner
373389260f
Generalize many transforms to work on ~ of vectors in addition to ~ of
...
integer ops. This implements Transforms/InstCombine/and-or-not.ll
test3/test4, and finishes off PR1510
llvm-svn: 37589
2007-06-15 06:23:19 +00:00
Chris Lattner
9923af42cf
add vector versions of this test
...
llvm-svn: 37588
2007-06-15 06:22:32 +00:00
Chris Lattner
ce4d2dd644
m_not should match vector not
...
llvm-svn: 37587
2007-06-15 06:13:47 +00:00
Chris Lattner
72e3958003
add a Constant::getAllOnesValue helper function, which works on integers
...
AND vectors.
llvm-svn: 37586
2007-06-15 06:10:53 +00:00
Chris Lattner
1edec381a5
Enhance BinaryOperator::isNot to support vector not.
...
llvm-svn: 37585
2007-06-15 06:04:24 +00:00
Chris Lattner
481e28b1f5
Implement two xforms:
...
1. ~(~X | Y) === (X & ~Y)
2. (A|B) & ~(A&B) -> A^B
This allows us to transform ~(~(a|b) | (a&b)) -> a^b.
This implements PR1510 for scalar values.
llvm-svn: 37584
2007-06-15 05:58:24 +00:00
Chris Lattner
a8de4cccd9
testcase for PR1510
...
llvm-svn: 37583
2007-06-15 05:57:20 +00:00
Chris Lattner
f14e5175ed
delete some obviously dead vector operations, which deletes a few thousand
...
operations from Duraids example.
llvm-svn: 37582
2007-06-15 05:26:55 +00:00
Evan Cheng
add977670f
No really, clear predcessors states.
...
llvm-svn: 37581
2007-06-14 23:34:09 +00:00
Evan Cheng
9fc56c079d
If BB is predicated, invalidate its predecessor(s) which would if-convert it. It needs to be re-analyzed.
...
llvm-svn: 37580
2007-06-14 23:13:19 +00:00
Dan Gohman
5c4413120f
Rename MVT::getVectorBaseType to MVT::getVectorElementType.
...
llvm-svn: 37579
2007-06-14 22:58:02 +00:00
Dale Johannesen
616627b002
Do not treat FP_REG_KILL as terminator in branch analysis (X86).
...
llvm-svn: 37578
2007-06-14 22:03:45 +00:00
Evan Cheng
e08f0eefa6
Fix typo.
...
llvm-svn: 37577
2007-06-14 21:26:08 +00:00
Dan Gohman
4a4a8eb00e
Add a target hook to allow loads from constant pools to be rematerialized, and an
...
implementation for x86.
llvm-svn: 37576
2007-06-14 20:50:44 +00:00
Evan Cheng
1e6f08b2a2
Fix some stupid bugs that have effectively disabled if-conversion.
...
llvm-svn: 37575
2007-06-14 20:28:52 +00:00
Dan Gohman
3a8e2a8b2f
Eliminate some redundant newlines in asm output.
...
llvm-svn: 37574
2007-06-14 15:00:27 +00:00
Duncan Sands
40f775bf67
Fix typos.
...
llvm-svn: 37573
2007-06-14 11:27:07 +00:00
Christopher Lamb
f274efef9f
Add support to tablegen for specifying subregister classes on a per register class basis.
...
llvm-svn: 37572
2007-06-13 22:20:15 +00:00
Dale Johannesen
c68554683d
Handle blocks with 2 unconditional branches in AnalyzeBranch.
...
llvm-svn: 37571
2007-06-13 17:59:52 +00:00
Duncan Sands
7413736a7e
Only correctly lower exception handing intrinsics if exception handling is
...
turned on. Likewise for scanning of invokes to mark landing pads.
llvm-svn: 37570
2007-06-13 16:53:21 +00:00
Dan Gohman
26455c4ae0
Introduce new SelectionDAG node opcodes VEXTRACT_SUBVECTOR and
...
VCONCAT_VECTORS. Use these for CopyToReg and CopyFromReg legalizing in
the case that the full register is to be split into subvectors instead
of scalars. This replaces uses of VBIT_CONVERT to present values as
vector-of-vector types in order to make whole subvectors accessible via
BUILD_VECTOR and EXTRACT_VECTOR_ELT.
This is in preparation for adding extended ValueType values, where
having vector-of-vector types is undesirable.
llvm-svn: 37569
2007-06-13 15:12:02 +00:00
Dan Gohman
cbd51c8b60
When creating CopyFromReg nodes, always use legal types. And use the
...
correct types for the result vector, even though it is currently bitcasted
to a different type immediately.
llvm-svn: 37568
2007-06-13 14:55:16 +00:00
Duncan Sands
97f7236e70
The fix that was applied for PR1224 stops the compiler
...
crashing but breaks exception handling. The problem
described in PR1224 is that invoke is a terminator that
can produce a value. The value may be needed in other
blocks. The code that writes to registers values needed
in other blocks runs before terminators are lowered (in
this case invoke) so asserted because the value was not
yet available. The fix that was applied was to do invoke
lowering earlier, before writing values to registers.
The problem this causes is that the code to copy values
to registers can be output after the invoke call. If
an exception is raised and control is passed to the
landing pad then this copy-code will never execute. If
the value is needed in some code path reached via the
landing pad then that code will get something bogus.
So revert the original fix and simply skip invoke values
in the general copying to registers code. Instead copy
the invoke value to a register in the invoke lowering code.
llvm-svn: 37567
2007-06-13 05:51:31 +00:00
Evan Cheng
cbaaff58bf
Typo
...
llvm-svn: 37566
2007-06-13 00:04:00 +00:00
Evan Cheng
9acfa7b063
Now if-converting all 4 variants of triangles.
...
llvm-svn: 37565
2007-06-12 23:54:05 +00:00
Owen Anderson
4036ad485f
Fix test/Transforms/GVNPRE/2007-06-12-PhiTranslate.ll
...
llvm-svn: 37564
2007-06-12 22:43:57 +00:00
Owen Anderson
b1c82db828
Add a test where phi translation was producing a null result.
...
llvm-svn: 37563
2007-06-12 22:42:35 +00:00
Devang Patel
149a7616dc
isReachableFromEntry() is not suitable for post dominator.
...
llvm-svn: 37562
2007-06-12 17:50:25 +00:00
Devang Patel
47419ee142
Remove redundant check.
...
llvm-svn: 37561
2007-06-12 17:35:20 +00:00
Devang Patel
2f9d2bcb19
Protect updateDFSNumbers()
...
llvm-svn: 37560
2007-06-12 17:30:56 +00:00
Devang Patel
dcf0c03ff7
Check A dominates B and vise versa first while searching for nearest
...
common dominator.
llvm-svn: 37559
2007-06-12 17:17:57 +00:00
Chris Lattner
2150cde0e4
one final bugfix
...
llvm-svn: 37558
2007-06-12 17:01:15 +00:00
Chris Lattner
2b0bf4fc3b
modernize example
...
llvm-svn: 37557
2007-06-12 17:00:26 +00:00