Commit Graph

27906 Commits

Author SHA1 Message Date
Reid Spencer
44c030a7ee Remove 4 FIXMEs to hack around cast-to-bool problems which no longer exist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32051 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 23:13:36 +00:00
Anton Korobeynikov
7784ebc239 Factor out GVRequiresExtraLoad() from .h to .cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32048 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 22:42:55 +00:00
Evan Cheng
a5cb564655 Add X86-64 load / store codegen tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32047 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 22:07:00 +00:00
Evan Cheng
0085a28d13 - Use a different wrapper node for RIP-relative GV, etc.
- Proper support for both small static and PIC modes under X86-64
- Some (non-optimal) support for medium modes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32046 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 21:55:46 +00:00
Jim Laskey
2bbff6d173 better check for version
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32045 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 18:29:23 +00:00
Chris Lattner
d0a6a7a030 make it clear that this is always a zext
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32044 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 17:35:08 +00:00
Chris Lattner
6e8fbad675 One more bugfix, 3 cases of making casts explicit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32043 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 17:32:29 +00:00
Chris Lattner
9a989f0f97 Fix a bug in globalopt due to the recent cast patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32042 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 17:26:08 +00:00
Reid Spencer
96839be87f Allow llvm-upgrade to read from stdin. Configure the lexer for reading
from C++ std::istream.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32041 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 16:50:26 +00:00
Jim Laskey
56918c82de Add compile unit size test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32040 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 15:36:44 +00:00
Jim Laskey
ef455294f8 Correct comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32039 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 15:31:49 +00:00
Jim Laskey
dd347eb87e Pubnames test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32038 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 15:25:59 +00:00
Jim Laskey
fe793815e0 Update docs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32037 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 14:36:22 +00:00
Jim Laskey
2172f966ca Change global descriptor names to provide name, full name and linkage name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32036 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 14:35:45 +00:00
Jim Laskey
749b01d5ff Temp fix to deal gdb issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32035 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 11:09:42 +00:00
Evan Cheng
12a447898a MachineInstr::setOpcode -> MachineInstr::setInstrDescriptor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32034 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 07:12:03 +00:00
Evan Cheng
6430bf0449 Remove the ugly SPARCV9 TargetInstrDescriptors hack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32033 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 07:10:43 +00:00
Evan Cheng
67f660cb08 - MachineInstr now keeps a ptr to TargetInstrDescriptor instead of Opcode.
- Remove the ugly TargetInstrDescriptors hack.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32032 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 07:08:44 +00:00
Reid Spencer
e8776d81f9 Ignore generated files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32031 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 06:37:43 +00:00
Reid Spencer
e7c3c60d86 Initial, non-functional, version of llvm-upgrade. This version just echos
its input. Committed for safekeeping purposes. Don't use this yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32030 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 06:36:44 +00:00
Evan Cheng
20833e33fd New LSR test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32029 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 23:48:37 +00:00
Evan Cheng
c8306bde15 In PIC mode, GV not requiring an extra load can be used as address immediate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32028 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 23:48:14 +00:00
Evan Cheng
4946399b64 Clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32027 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 23:46:27 +00:00
Evan Cheng
d0ff02cf6f Fix for PR1018 - Better support for X86-64 Linux in small code model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32026 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 23:19:46 +00:00
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