Commit Graph

26579 Commits

Author SHA1 Message Date
Chris Lattner
2b41b8e870 Fix UnitTests/2005-05-12-Int64ToFP.c with llc-beta. In particular, do not
allow it to go into an infinite loop, filling up the disk!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30494 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-19 18:02:01 +00:00
Rafael Espindola
4d4c021758 fix header
add comments
untabify


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30486 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-19 16:41:40 +00:00
Rafael Espindola
71f3b94fa8 Implement a MachineFunctionPass to fix the mul instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30485 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-19 15:49:25 +00:00
Chris Lattner
d0b9983d27 number test right
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30484 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-19 06:19:19 +00:00
Chris Lattner
f529b08c0d item done
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30483 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-19 06:19:03 +00:00
Chris Lattner
733f576d29 implement select.ll:test19-22
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30482 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-19 06:18:21 +00:00
Chris Lattner
298c7e303d make this harder
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30481 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-19 06:17:55 +00:00
Chris Lattner
935a10d5dc new testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30480 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-19 06:16:46 +00:00
Chris Lattner
cf9d0acfef Fold the PPCISD shifts when presented with 0 inputs. This occurs for code
like:
long long test(long long X, int Y) {
  return 1ULL << Y;
}
long long test2(long long X, int Y) {
  return -1LL << Y;
}

which we used to compile to:

_test:
        li r2, 1
        subfic r3, r5, 32
        li r4, 0
        addi r6, r5, -32
        srw r3, r2, r3
        slw r4, r4, r5
        slw r6, r2, r6
        or r3, r4, r3
        slw r4, r2, r5
        or r3, r3, r6
        blr
_test2:
        li r2, -1
        subfic r3, r5, 32
        addi r6, r5, -32
        srw r3, r2, r3
        slw r4, r2, r5
        slw r2, r2, r6
        or r3, r4, r3
        or r3, r3, r2
        blr

Now we produce:

_test:
        li r2, 1
        addi r3, r5, -32
        subfic r4, r5, 32
        slw r3, r2, r3
        srw r4, r2, r4
        or r3, r4, r3
        slw r4, r2, r5
        blr
_test2:
        li r2, -1
        subfic r3, r5, 32
        addi r6, r5, -32
        srw r3, r2, r3
        slw r4, r2, r5
        slw r2, r2, r6
        or r3, r4, r3
        or r3, r3, r2
        blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30479 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-19 05:22:59 +00:00
Chris Lattner
863ac769b8 Fold extract_element(cst) to cst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30478 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-19 05:02:39 +00:00
Chris Lattner
5c6621c3bc Minor speedup for legalize by avoiding some malloc traffic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30477 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-19 04:51:23 +00:00
Chris Lattner
bc7fa5277f If multiple predicates are listed, they must all pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30476 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-19 00:41:36 +00:00
Nick Lewycky
b46de1b0c0 Enable dejagnu tests for predicate simplifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30475 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-19 00:31:54 +00:00
Evan Cheng
6b5578f052 Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30474 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 23:28:33 +00:00
Chris Lattner
47a7e2681e There!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30473 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 22:41:07 +00:00
Chris Lattner
a4503de431 Fix Regression/TableGen/2006-09-18-LargeInt.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30472 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 22:28:27 +00:00
Chris Lattner
02982501a7 new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30471 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 22:28:07 +00:00
Evan Cheng
52cc1ea2a1 Allow i32 UDIV, SDIV, UREM, SREM to be expanded into libcalls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30470 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 21:49:04 +00:00
Nick Lewycky
025f4c0fad Walk down the dominator tree instead of the control flow graph. That means
that we can't modify the CFG any more, at least not until it's possible
to update the dominator tree (PR217).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30469 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 21:09:35 +00:00
Nick Lewycky
d791544c9f Fix findCaseDest to return null when BB is both the default dest and one
of the numeric cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30468 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 20:44:37 +00:00
Andrew Lenharth
2ab804c607 A pass to remove the worst of the replay trap offenders, and as a bonus, align basic blocks when it is free to do so
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30467 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 19:44:29 +00:00
Nick Lewycky
011f184601 Add a new helper method to SwitchInst. Useful when you've got a BB from
somewhere (like the dominator graph) and would like to know which case it
came from.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30466 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 19:03:59 +00:00
Chris Lattner
6d7ca92bbf Fix an infinite loop building the CFE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30465 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 18:27:05 +00:00
Chris Lattner
5e14bca4fd new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30464 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 18:07:51 +00:00
Andrew Lenharth
ea4f9d5801 Jump tables on Alpha
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30463 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 18:01:03 +00:00
Andrew Lenharth
303c6222a4 oops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30462 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 18:00:18 +00:00
Andrew Lenharth
3fbd67898e absolute addresses must match pointer size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30461 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 17:59:35 +00:00
Jim Laskey
e85fb6719a Sort out mangled names for globals
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30460 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 14:47:26 +00:00
Chris Lattner
4af90abc13 Implement a trivial optzn: of vastart is never called in a function that takes
... args, remove the '...'.

This is Transforms/DeadArgElim/dead_vaargs.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30459 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 07:02:31 +00:00
Chris Lattner
87b1232d81 new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30458 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 07:01:39 +00:00
Chris Lattner
f73fb88688 add a note. Our 64-bit shifts are ~30% slower than gcc's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30457 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 05:36:54 +00:00
Chris Lattner
e695a3bd32 Implement InstCombine/cast.ll:test31. This speeds up 462.libquantum by 26%.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30456 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 05:27:43 +00:00
Chris Lattner
e04deb9914 new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30455 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 05:25:10 +00:00
Chris Lattner
0ec0b539a7 Add support for pattern matching cast operations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30454 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 05:17:11 +00:00
Chris Lattner
6c6b6a77c0 fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30453 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 04:58:06 +00:00
Chris Lattner
79bc332ddb add a helper method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30452 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 04:54:57 +00:00
Chris Lattner
b33a42a21f This is closer to what we really want.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30451 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 04:54:35 +00:00
Chris Lattner
b7363791ed Implement Transforms/InstCombine/shift-sra.ll:test0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30450 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 04:31:40 +00:00
Chris Lattner
2f88a1bbbe New testcase, can be an srl instead of sra
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30449 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 04:31:18 +00:00
Chris Lattner
65b72baa59 Rewrite shift/and/compare sequences to promote better licm of the RHS.
Use isLogicalShift/isArithmeticShift to simplify code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30448 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 04:22:48 +00:00
Reid Spencer
20fdab6fbf Make the LLVM Publications link point to /pubs/ since this has moved to
its own page on the LLVM web site.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30447 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-17 23:05:15 +00:00
Anton Korobeynikov
bcb9770efe Added some eye-candy for Subtarget type checking
Added X86 StdCall & FastCall calling conventions. Codegen will follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30446 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-17 20:25:45 +00:00
Chris Lattner
2f463865c2 Add ShiftInst::isLogical/ArithmeticShift methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30445 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-17 19:29:56 +00:00
Chris Lattner
a5b07404f7 Add new SetCondInst::isRelational/isEquality methods. Rename
Instruction::isRelational to Instruction::isComparison.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30444 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-17 19:14:47 +00:00
Nick Lewycky
e81f725b3a Explain change with a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30443 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-17 17:51:00 +00:00
Nick Lewycky
38c7c42a32 Fix PR912. The input to erase() must not be a reference to the data
being erased.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30442 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-17 16:23:36 +00:00
Anton Korobeynikov
93c2b37340 Small fixes for supporting dll* linkage types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30441 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-17 13:06:18 +00:00
Chris Lattner
7ed96abc09 add a note noticed through source inspection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30418 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-16 23:57:51 +00:00
Chris Lattner
8829dc88a8 Oh yeah, this is needed too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30407 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-16 05:08:34 +00:00
Chris Lattner
88640b5ecd add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30406 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-16 03:30:19 +00:00