Commit Graph

27882 Commits

Author SHA1 Message Date
Reid Spencer
95e6effad2 Get the delegation right for InstVisitor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32025 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 21:37:00 +00:00
Chris Lattner
15eb329dae Fix bug codegen'ing FP constant vectors with integer splats. Make sure the
created intrinsics have the right integer types.  This fixes
PowerPC/2006-11-29-AltivecFPSplat.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32024 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 19:58:49 +00:00
Chris Lattner
7e68724f48 new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32023 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 19:57:55 +00:00
Evan Cheng
6a16c5ab2d Avoid inifinite looping if READCYCLECOUNTER isn't custom lowered.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32022 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 19:13:47 +00:00
Jim Laskey
36729ddd23 Eliminate unnecessary scopes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32020 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 16:55:57 +00:00
Jim Laskey
619965d32e Offset for load of 32-bit arg in 64-bit world was incorrect.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32019 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 13:37:09 +00:00
Evan Cheng
cdc70ce82c Add x86-64 llvm.readcyclecounter test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32018 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 08:29:59 +00:00
Evan Cheng
3fa9dff2c9 Custom lower READCYCLECOUNTER for x86-64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32017 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 08:28:13 +00:00
Evan Cheng
f0b3ba6752 Allow target to custom lower READCYCLECOUNTER (when it doesn't have to be expanded).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32016 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 08:26:18 +00:00
Evan Cheng
b27c480d84 Fix test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32015 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 08:22:59 +00:00
Bill Wendling
a90ba6c2aa Oops! didn't mean to put this in there yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32014 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 07:31:23 +00:00
Chris Lattner
641c523599 done
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32013 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 07:21:46 +00:00
Chris Lattner
71d8f4d84a new bswap idiom
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32012 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 07:21:08 +00:00
Chris Lattner
46b96055cf implement cast.ll:test35. With this, we recognize:
unsigned short swp(unsigned short a) {
       return ((a & 0xff00) >> 8 | (a & 0x00ff) << 8);
}

as an idiom for bswap.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32011 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 07:18:39 +00:00
Chris Lattner
6478b2fcd1 new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32010 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 07:17:32 +00:00
Chris Lattner
6aa5eb19d5 Teach instcombine to turn trunc(srl x, c) -> srl (trunc(x), c) when safe.
This implements InstCombine/cast.ll:test34.  It fires hundreds of times on
176.gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32009 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 07:04:07 +00:00
Chris Lattner
41e2103133 new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32008 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 07:03:00 +00:00
Chris Lattner
f4d4d9adad This fails on mainline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32007 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 05:19:32 +00:00
Chris Lattner
458cf462ef Implement Regression/Transforms/InstCombine/bswap-fold.ll,
folding   seteq (bswap(x)), c -> seteq(x,bswap(c))


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32006 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 05:02:16 +00:00
Chris Lattner
5b4c958100 new testcase, bswaps should be eliminated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32005 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 05:00:14 +00:00
Evan Cheng
b4809b2b8f 16-byte stack alignment for X86-64 ELF. Patch by Dan Gohman.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32004 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 02:00:40 +00:00
Evan Cheng
f3e486e069 Fix for PR1023 by Dan Gohman.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32003 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 01:58:12 +00:00
Evan Cheng
901bf34ae9 Add test cases for PR1022, 1023.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32002 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 01:57:06 +00:00
Chris Lattner
5d52135a14 Upgrade the ugly darwin 64-bit bswap idiom (bswap %eax / bswap %edx /
xchgl %eax, %edx) to llvm.bswap.i64.  This compiles:

long long test2(long long A) {
  return _OSSwapInt64(A);
}

to:

_test2:
        movl 8(%esp), %eax
        movl 4(%esp), %edx
        bswapl %eax
        bswapl %edx
        ret

instead of:

_test2:
        movl 8(%esp), %edx
        movl 4(%esp), %eax
        bswap   %eax
        bswap   %edx
        xchgl   %eax, %edx
        ret

GCC manages (with -fomit-frame-pointer) the uglier:

_test2:
        subl    $4, %esp
        movl    8(%esp), %eax
        movl    12(%esp), %edx
        bswap   %eax
        bswap   %edx
        xchgl   %eax, %edx
        addl    $4, %esp
        ret


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32001 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 01:48:01 +00:00
Evan Cheng
a5a57d66f5 Fix for PR1022 (folding loads of static initializers) by Dan Gohman.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32000 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 01:38:07 +00:00
Chris Lattner
625bd052a3 Trivially lower 'bswap $0' into llvm.bswap. This fixes hexxagon with the
JIT on darwin/x86, which has htonl implemented as inline asm.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31999 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 01:14:06 +00:00
Bill Wendling
8d89281989 WTF? These weird newlines got in there...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31998 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 01:14:00 +00:00
Chris Lattner
3f7927c84c add a hook to allow targets to hack on inline asms to lower them to llvm
when they want to.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31997 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 01:12:32 +00:00
Reid Spencer
de33124aa3 Join a split line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31996 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 01:11:01 +00:00
Bill Wendling
bdc679d564 Converted to using llvm streams instead of <iostream>s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31992 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 00:39:47 +00:00
Bill Wendling
68fe61d6a1 Replacing std::iostreams with llvm iostreams. Some of these changes involve
adding a temporary wrapper around the ostream to make it friendly to
functions expecting an LLVM stream. This should be fixed in the future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31990 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 00:19:40 +00:00
Bill Wendling
a5b31ca856 Convert to using llvm streams instead of iostreams.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31989 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 23:33:06 +00:00
Bill Wendling
d96662360f Support for llvm_ostreams.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31988 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 23:31:42 +00:00
Andrew Lenharth
f45148e113 gcc doesn't like an empty colbber list
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31987 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 23:07:32 +00:00
Bill Wendling
a21900d5a4 Use ostream instead of iostream
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31986 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 22:49:32 +00:00
Bill Wendling
a09362eb97 Use llvm streams instead of <iostream>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31985 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 22:48:48 +00:00
Bill Wendling
3e3bcbf3a0 Removed #include <iostream> and used llvm streams
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31984 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 22:47:12 +00:00
Bill Wendling
6f81b51021 Removed some of the iostream #includes. Moved towards converting to using
llvm streams


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31983 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 22:46:12 +00:00
Bill Wendling
c0ac317f93 Support for llvm streams.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31982 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 22:45:17 +00:00
Chris Lattner
d5b58c239e Add a helper function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31981 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 22:32:35 +00:00
Andrew Lenharth
30579799ed Identities are default now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31980 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 22:28:08 +00:00
Andrew Lenharth
85f2228454 Make identity default, and fix PR1020
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31979 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 22:25:32 +00:00
Bill Wendling
b5ebf15b2b Added a temporary hack to get the llvm-streams to work for future checkins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31978 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 22:21:29 +00:00
Reid Spencer
d4d9ab80b7 Undo the last patch until 253.perlbmk passes with these changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31977 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 20:23:51 +00:00
Evan Cheng
ead1b801e2 New entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31976 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 19:59:25 +00:00
Andrew Lenharth
238581f2bb update comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31975 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 19:56:02 +00:00
Andrew Lenharth
e0cf07584d Get the asminfo for the target most closely matching the module and use that for inline asm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31974 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 19:53:36 +00:00
Andrew Lenharth
6c0695fc5c X86 asm -> gcc asm translation table (incomplete)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31973 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 19:52:49 +00:00
Andrew Lenharth
3655de6873 Add per-target support for asm translation in the cbe
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31972 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 19:52:20 +00:00
Jim Laskey
7fc4a94bdd Remove debug code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31970 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 18:27:02 +00:00