Commit Graph

1402 Commits

Author SHA1 Message Date
Devang Patel
28ae151c48 Update dominator info for the middle blocks created while spliting
exit edge to preserve LCSSA.

Fix dominance frontier update during loop unswitch. This fixes PR 1589.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40695 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-01 22:23:50 +00:00
Owen Anderson
268479f454 Forgot to update these files for the FastDSE changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40674 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-01 16:53:51 +00:00
Owen Anderson
f6a05f949f Rename FastDSE to just DSE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40668 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-01 06:36:51 +00:00
Owen Anderson
b95f9d565f Fix a failure I accidentally caused in my last commit by mishandling the
removal of redundant phis.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40650 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-31 20:18:28 +00:00
Lauro Ramos Venancio
c7d1114ade Fix a bug in GetKnownAlignment of packed structs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40649 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-31 20:13:21 +00:00
Dan Gohman
b1576f56c8 Change the x86 assembly output to use tab characters to separate the
mnemonics from their operands instead of single spaces. This makes the
assembly output a little more consistent with various other compilers
(f.e. GCC), and slightly easier to read. Also, update the regression
tests accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40648 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-31 20:11:57 +00:00
Owen Anderson
054ab94bff Fix a misoptimization in aha.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40642 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-31 17:43:14 +00:00
Devang Patel
fee0a9c7ef Bunch of tests to check loop passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40629 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-31 08:04:17 +00:00
Owen Anderson
4f9ba7c40c Fix a bug caused by indiscriminantly asking for the dominators of a predecessor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40595 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-30 16:57:08 +00:00
Owen Anderson
a377a24771 Fix a bug introduced in my last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40542 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-26 18:57:04 +00:00
Owen Anderson
45537917ee Fix a couple more bugs in the phi construction by pulling in code that does
almost the same things from LCSSA.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40540 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-26 18:26:51 +00:00
Owen Anderson
febc7e3613 Fix what is _hopefully_ the last corner case for loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40503 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-25 23:54:42 +00:00
Owen Anderson
9f435740b1 My last commit was not correct for nested loops. Fix it, and add a testcase for it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40498 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-25 22:19:40 +00:00
Owen Anderson
0d16988690 Fix an infinite loop on 300.twolf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40497 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-25 22:03:06 +00:00
Owen Anderson
3dfcf33cf8 Fix a bug in non-local memdep that was causing an infinite loop on 175.vpr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40495 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-25 21:26:36 +00:00
Owen Anderson
2e3d6b4a27 Fix a bug that was causing GVN to crash on 252.eon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40494 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-25 21:13:41 +00:00
Owen Anderson
0cd320362e Add basic support for performing whole-function RLE.
Note: This has not yet been thoroughly tested.  Use at your own risk.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40489 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-25 19:57:03 +00:00
Owen Anderson
1ad2cb7555 Add a GVN pass, using the value numbering code I developed for GVNPRE and the
load elimination code from RedundantLoadElimination.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40469 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-24 17:55:58 +00:00
Devang Patel
62e279bbdb Unreachable block is not a root node in post dominator tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40458 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-24 01:02:25 +00:00
Owen Anderson
a7f98e2919 Rename a lot of things to change FastDLE to RedundantLoadElimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40457 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-24 00:17:04 +00:00
Owen Anderson
f309070ca4 Add testcases for FastDLE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40449 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-23 22:18:05 +00:00
Owen Anderson
33d137f90a Move these tests to use FastDSE instead of old DSE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40444 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-23 20:49:13 +00:00
Chris Lattner
e29459e3b5 This xform isn't safe, removing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40378 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-21 21:27:27 +00:00
Dan Gohman
9941f7426d Optimize alignment of loads and stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40102 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-20 16:34:21 +00:00
Reid Spencer
9445e9aaa0 For PR1553:
Change the keywords for the zext and sext parameter attributes to be 
zeroext and signext so they don't conflict with the keywords for the
instructions of the same name. This gets around the ambiguity.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40069 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-19 23:13:04 +00:00
Devang Patel
a8d507d970 New test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40023 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-18 23:47:02 +00:00
Chris Lattner
e2ece3f479 rename function to avoid llvm-upgrade warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39895 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-16 04:09:00 +00:00
Chris Lattner
4241e4da85 Implement shift-simplify.ll:test[45].
First teach instcombine that sign bit checks only demand the 
sign bit, this allows simplify demanded bits to hack on 
expressions better.

Second, teach instcombine that ashr is useless if only the
sign bit is demanded.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39880 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-15 20:54:51 +00:00
Chris Lattner
a0141b90a3 Implement shift-simplify.ll:test3, turning:
(X << 31) <s 0  --> (X&1) != 0

This happens dozens of times in the CFE.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39879 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-15 20:42:37 +00:00
Devang Patel
680171f210 New test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39768 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-11 23:54:25 +00:00
Owen Anderson
36a07daabd Fix an error where ANTIC_OUT was ending up with more than one expression of
the same value number.  This fixes an infinite loop on 444.namd.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37967 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-07 20:13:57 +00:00
Owen Anderson
2a5c9d8aac Fix a bunch of issues found in a testcase from 400.perlbench.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37929 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-05 23:11:26 +00:00
Owen Anderson
ec3ed5f8e4 Fix another bug, this time in PREing select instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37878 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-04 22:33:23 +00:00
Owen Anderson
df30b63663 Fix a typo that was killing GVNPRE of select instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37871 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-04 18:26:18 +00:00
Owen Anderson
9eee94c5f7 Fix an error in phi translation of GEPs that was causing failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37868 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-04 04:51:16 +00:00
Owen Anderson
5653322e72 Add support for performing GVNPRE on GEP instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37862 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-03 23:51:19 +00:00
Owen Anderson
216394f9b3 Add support for performing GVNPRE on cast instructions, and add a testcase for this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37856 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-03 18:37:08 +00:00
Zhou Sheng
0142677fe2 Test case for recent patch for IndVarSimplify.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37838 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-02 08:02:14 +00:00
John Criswell
e644ef7b09 Convert .cvsignore files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37801 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-29 16:35:07 +00:00
Owen Anderson
1dd035d64f Add a test for performing GVNPRE on select instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37782 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-28 23:50:31 +00:00
Owen Anderson
cc389e016c Add tests for performing GVNPRE on the three vector-specific instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37744 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-27 04:06:32 +00:00
Chris Lattner
4939debe2a new testcase, the inliner shouldn't inline this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37722 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-25 21:49:53 +00:00
Owen Anderson
f107befaf1 Rename variables to expose the fact that this test is failing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37711 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-24 08:17:41 +00:00
Chris Lattner
e47f30f5e6 new testcase miscompiled by instcombine, reduced from perl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37691 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-21 18:09:25 +00:00
Owen Anderson
831dab360f Testcase for instances where a constant only occurs as an operand to a phi node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37653 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 05:55:01 +00:00
Owen Anderson
5b689c3a28 Add a new testcase for memory corruption issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37648 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 05:41:22 +00:00
Owen Anderson
981746b4d0 Testcase where GVNPRE was getting confused by invoke instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37609 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-16 00:25:10 +00:00
Owen Anderson
0bee3f44ca Add a testcase where GVNPRE what getting confused by a loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37594 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-15 17:54:05 +00:00
Chris Lattner
3dcf510ba1 add vector versions of this test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37588 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-15 06:22:32 +00:00
Chris Lattner
546fdae370 testcase for PR1510
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37583 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-15 05:57:20 +00:00