Commit Graph

51645 Commits

Author SHA1 Message Date
Chris Lattner
f4d2f5b565 add support for some missing modifiers on jumptable/constant pool entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81199 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 06:25:12 +00:00
Chris Lattner
5b3d580925 add a bunch more evil lowering code to work around various :subreg32 modifiers
in the .td files.  This gets us down to 18 failures in codegen/x86 with the
new asmprinter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81198 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 06:19:15 +00:00
Daniel Dunbar
f072432e26 lit needs bash for tcl-as-sh execution, we use set -o pipefail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81197 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 06:08:07 +00:00
Chris Lattner
af0b6cdb69 ADd support for "lowering" the X86::MOVZX16rr8/X86::MOVZX16rm8
subreg32 modifiers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81196 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 06:03:07 +00:00
Chris Lattner
7ffa3c8029 add a hack to lower MOV16r0 to MOV32r0 in MCInstLower, eliminating
the problem with subreg32 modifiers.  This gets all of Olden working
with the new asmprinter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81195 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 05:49:25 +00:00
Daniel Dunbar
ba3931b667 Fix typo that worked on python 2.6.
Also, fix unit tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81194 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 05:46:28 +00:00
Nick Lewycky
8f5075b966 Hoist out the test+insert to CheckedTypes. This doesn't seem to affect
performance.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81193 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 05:46:15 +00:00
Daniel Dunbar
2c0a49c8cb Fix a refactoro.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81192 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 05:37:51 +00:00
Daniel Dunbar
70a3b77df8 Add 'lit' support for llvm tests.
- This adds 'make check-lit' from the top-level Makefile.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81191 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 05:31:44 +00:00
Daniel Dunbar
be7ada7181 Add 'lit' testing tool.
- make install && man $(llvm-config --prefix)/share/man/man1/lit.1 for more
   information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81190 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 05:31:18 +00:00
Chris Lattner
3fee6eda1d llvm::cerr is gone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81189 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 05:15:50 +00:00
Chris Lattner
0ce6f93e93 update this to use raw_ostream
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81188 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 05:14:44 +00:00
Chris Lattner
ba3598cb1f fix PR4767, a crash because fp stackifier visited blocks in
depth first order, so it wouldn't process unreachable blocks.
When compiling at -O0, late dead block elimination isn't done
and the bad instructions got to isel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81187 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 04:55:44 +00:00
Chris Lattner
687bc9bfde remove a turd
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81186 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 03:47:41 +00:00
Chris Lattner
4cb81bdd56 instcombine transforms vector loads that are only used by
extractelement operations into a bitcast of the pointer,
then a gep, then a scalar load.  Disable this when the vector
only has one element, because it leads to infinite loops in
instcombine (PR4908).

This transformation seems like a really bad idea to me, as it
will likely disable CSE of vector load/stores etc and can be
better done in the code generator when profitable.  This
goes all the way back to the first days of packed types,
r25299 specifically.

I'll let those people who care about the performance of vector
code decide what to do with this.





git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81185 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 03:44:51 +00:00
Chris Lattner
c8dee3f7ad fix pasto
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81184 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 03:39:55 +00:00
Chris Lattner
9715912978 add getVectorOperand/getIndexOperand accessors to ExtractElementInst.
Fix some const correctness problems in SelectInst.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81183 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 03:32:53 +00:00
Nick Lewycky
4b6af8aa5b Simplify from my last change. Assert1 is a macro that makes its caller return,
so "Assert1(isa<>); cast<>" is a valid idiom.

Actually check the PHI node's odd-numbered operands for BasicBlock-ness, like
the comment said.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81182 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 02:02:39 +00:00
Dan Gohman
ed48caf5e7 Fix an abort on a store of an empty struct member. getValue returns
null in the case of an empty struct, so don't try to call getNumValues
on it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81180 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 01:44:02 +00:00
Nick Lewycky
49072473ba Verify types. Invalid types can be constructed when assertions are off.
Make the verifier more robust by avoiding unprotected cast<> calls. Notably,
Assert1(isa<>); cast<> is not safe as Assert1 does not terminate the program.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81179 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 01:23:52 +00:00
Chris Lattner
45336a6f22 fix PR4915, a crash in -debug mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81177 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 01:22:54 +00:00
Chris Lattner
ff1e98c72a Fix PR4882, by making MemCpyOpt not dereference removed stores to get the
context for the newly created operations.
 
Patch by Jakub Staszak!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81175 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 00:27:14 +00:00
Chris Lattner
b9a4ddbbcd fix ComputeMaskedBits handling of zext/sext/trunc to work with vectors.
This fixes PR4905


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81174 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 00:13:52 +00:00
Chris Lattner
cf5128ec01 add some comments to describe the invariants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81173 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 00:06:16 +00:00
Dan Gohman
f8dbee7cea Reappy r80998, now that the GlobalOpt bug that it exposed on MiniSAT is fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81172 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 23:54:19 +00:00
Dan Gohman
fd06aa7c07 Fix a thinko: When lowering fneg with xor, bitcast the operands
from floating-point to integer first, and bitcast the result
back to floating-point. Previously, this test was passing by
falling back to SelectionDAG lowering. The resulting code isn't
as nice, but it's correct and CodeGen now stays on the fast path.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81171 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 23:47:14 +00:00
Chris Lattner
6e9057b0ef add some more notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81170 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 23:33:52 +00:00
Dan Gohman
2a6f57763f Add a testcase for the GlobalOpt inbounds fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81168 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 23:04:59 +00:00
Chris Lattner
48a109c36c describe undef semantics in some more detail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81167 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 22:52:39 +00:00
Dan Gohman
ef17e24aee Add inbounds to these getelementptrs, now that GlobalOpt requires this,
to preserve the meaning of these tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81166 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 22:45:41 +00:00
Dan Gohman
80bdc967e9 Don't commit stores with addresses that have indices that are not
compile-time constant integers or that are out of bounds for their
corresponding static array types. These can cause aliasing that
GlobalOpt assumes won't happen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81165 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 22:44:55 +00:00
Dan Gohman
ce5de5b527 Don't commit addresses of aggregate values. This avoids problems with
an aggregate store overlapping a different aggregate store, despite
the stores having distinct addresses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81164 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 22:42:05 +00:00
Dan Gohman
c62482d4ed Fix GlobalOpt to avoid committing a store if the address getelementptr
is missing the inbounds flag. This is slightly conservative, but it
avoids problems with two constants pointing to the same address but
getting distinct entries in the Memory DenseMap.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81163 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 22:40:13 +00:00
Dan Gohman
4a7e6b7a15 Preserve the InBounds flag when evaluating a getelementptr instruction
into a getelementptr ConstantExpr.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81162 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 22:34:43 +00:00
Dan Gohman
fd54a898be Simplify this code by using hasDefinitiveInitializer().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81161 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 22:31:26 +00:00
Chris Lattner
b73e4aec2e tighten test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81159 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 22:15:23 +00:00
Chris Lattner
150be808e1 tweak test, add PR#
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81158 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 22:14:41 +00:00
Nick Lewycky
a9b7738d13 Express this in the canonical way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81157 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 21:50:24 +00:00
Nick Lewycky
29ef6599ee Homogenize whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81156 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 20:44:51 +00:00
Daniel Dunbar
e0ae2b2503 Use -output-prefix in bugpoint tests so that outputs go in temp directory (and
we don't race on them).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81155 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 19:26:18 +00:00
Daniel Dunbar
68ccdaa849 Add -output-prefix option to bugpoint (to change the default output name).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81154 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 19:26:11 +00:00
Daniel Dunbar
59e8efdd59 Don't depend on Tcl behavior of redirecting stderr for all commands in a
pipeline.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81153 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 19:26:02 +00:00
Daniel Dunbar
b25f32bab8 Avoid Tcl substitution, introduced %llvmgcc_only for this one little test
(%llvmgcc includes a '-w' argument, and this test looks for warnings).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81152 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 19:25:54 +00:00
Duncan Sands
3429c5e153 Using a signal handler that does nothing should be
equivalent to SIG_IGN.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81144 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 05:58:25 +00:00
Daniel Dunbar
7b26b581cf Update unittests for MDNode uniquing disable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81142 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 04:19:02 +00:00
Daniel Dunbar
d34b0b1cda Disable MDNode uniquing.
- Hopefully this unbreaks some llvm-gcc bootstraps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81141 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 04:05:49 +00:00
Daniel Dunbar
53a99f9cda Document opt -S argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81140 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 04:03:44 +00:00
Eric Christopher
f61f89ae14 Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81138 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-06 22:20:54 +00:00
Anton Korobeynikov
6c4025773a Do not create calls via PLT in compilation callback - this is higly platform
dependent. Hopefully, this will fix PR3801.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81132 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-06 20:21:48 +00:00
Duncan Sands
f7f4ba6c1f Do not try to override non-virtual methods, especially
when the new method gives the same result as the original
(as far as I can see).  This will hopefully pacify icc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81131 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-06 20:02:00 +00:00