Chris Lattner
e72dff706e
done
...
llvm-svn: 32013
2006-11-29 07:21:46 +00:00
Chris Lattner
941474486f
new bswap idiom
...
llvm-svn: 32012
2006-11-29 07:21:08 +00:00
Chris Lattner
2fd5719f50
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.
llvm-svn: 32011
2006-11-29 07:18:39 +00:00
Chris Lattner
0fe0a11839
new testcase
...
llvm-svn: 32010
2006-11-29 07:17:32 +00:00
Chris Lattner
03fdea2e74
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.
llvm-svn: 32009
2006-11-29 07:04:07 +00:00
Chris Lattner
bedba50acf
new testcase
...
llvm-svn: 32008
2006-11-29 07:03:00 +00:00
Chris Lattner
5188a27d52
This fails on mainline.
...
llvm-svn: 32007
2006-11-29 05:19:32 +00:00
Chris Lattner
0409f2c48d
Implement Regression/Transforms/InstCombine/bswap-fold.ll,
...
folding seteq (bswap(x)), c -> seteq(x,bswap(c))
llvm-svn: 32006
2006-11-29 05:02:16 +00:00
Chris Lattner
ff4e213d2d
new testcase, bswaps should be eliminated.
...
llvm-svn: 32005
2006-11-29 05:00:14 +00:00
Evan Cheng
52f30d0ff2
16-byte stack alignment for X86-64 ELF. Patch by Dan Gohman.
...
llvm-svn: 32004
2006-11-29 02:00:40 +00:00
Evan Cheng
0be56fab68
Fix for PR1023 by Dan Gohman.
...
llvm-svn: 32003
2006-11-29 01:58:12 +00:00
Evan Cheng
f26e88cfa4
Add test cases for PR1022, 1023.
...
llvm-svn: 32002
2006-11-29 01:57:06 +00:00
Chris Lattner
4e07e4aa24
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
llvm-svn: 32001
2006-11-29 01:48:01 +00:00
Evan Cheng
f38588a1cd
Fix for PR1022 (folding loads of static initializers) by Dan Gohman.
...
llvm-svn: 32000
2006-11-29 01:38:07 +00:00
Chris Lattner
50d2db3b77
Trivially lower 'bswap $0' into llvm.bswap. This fixes hexxagon with the
...
JIT on darwin/x86, which has htonl implemented as inline asm.
llvm-svn: 31999
2006-11-29 01:14:06 +00:00
Bill Wendling
a5c00d4c4f
WTF? These weird newlines got in there...
...
llvm-svn: 31998
2006-11-29 01:14:00 +00:00
Chris Lattner
d00734a230
add a hook to allow targets to hack on inline asms to lower them to llvm
...
when they want to.
llvm-svn: 31997
2006-11-29 01:12:32 +00:00
Reid Spencer
a866877d2f
Join a split line.
...
llvm-svn: 31996
2006-11-29 01:11:01 +00:00
Bill Wendling
a29e6c5ec9
Converted to using llvm streams instead of <iostream>s
...
llvm-svn: 31992
2006-11-29 00:39:47 +00:00
Bill Wendling
4effa38086
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.
llvm-svn: 31990
2006-11-29 00:19:40 +00:00
Bill Wendling
2477c0ac3d
Convert to using llvm streams instead of iostreams.
...
llvm-svn: 31989
2006-11-28 23:33:06 +00:00
Bill Wendling
5def3648f4
Support for llvm_ostreams.
...
llvm-svn: 31988
2006-11-28 23:31:42 +00:00
Andrew Lenharth
e46a408fb9
gcc doesn't like an empty colbber list
...
llvm-svn: 31987
2006-11-28 23:07:32 +00:00
Bill Wendling
c942df4921
Use ostream instead of iostream
...
llvm-svn: 31986
2006-11-28 22:49:32 +00:00
Bill Wendling
d8c0883f20
Use llvm streams instead of <iostream>
...
llvm-svn: 31985
2006-11-28 22:48:48 +00:00
Bill Wendling
35041c7c45
Removed #include <iostream> and used llvm streams
...
llvm-svn: 31984
2006-11-28 22:47:12 +00:00
Bill Wendling
040a60d22d
Removed some of the iostream #includes. Moved towards converting to using
...
llvm streams
llvm-svn: 31983
2006-11-28 22:46:12 +00:00
Bill Wendling
4688855715
Support for llvm streams.
...
llvm-svn: 31982
2006-11-28 22:45:17 +00:00
Chris Lattner
339c732e0b
Add a helper function
...
llvm-svn: 31981
2006-11-28 22:32:35 +00:00
Andrew Lenharth
aee28a6544
Identities are default now
...
llvm-svn: 31980
2006-11-28 22:28:08 +00:00
Andrew Lenharth
a32f3e30b3
Make identity default, and fix PR1020
...
llvm-svn: 31979
2006-11-28 22:25:32 +00:00
Bill Wendling
4157840bd6
Added a temporary hack to get the llvm-streams to work for future checkins.
...
llvm-svn: 31978
2006-11-28 22:21:29 +00:00
Reid Spencer
c48fe0fd4d
Undo the last patch until 253.perlbmk passes with these changes.
...
llvm-svn: 31977
2006-11-28 20:23:51 +00:00
Evan Cheng
27408161df
New entries.
...
llvm-svn: 31976
2006-11-28 19:59:25 +00:00
Andrew Lenharth
7669b3acc5
update comments
...
llvm-svn: 31975
2006-11-28 19:56:02 +00:00
Andrew Lenharth
d93af28924
Get the asminfo for the target most closely matching the module and use that for inline asm
...
llvm-svn: 31974
2006-11-28 19:53:36 +00:00
Andrew Lenharth
c0ee1250ad
X86 asm -> gcc asm translation table (incomplete)
...
llvm-svn: 31973
2006-11-28 19:52:49 +00:00
Andrew Lenharth
c51f451af5
Add per-target support for asm translation in the cbe
...
llvm-svn: 31972
2006-11-28 19:52:20 +00:00
Jim Laskey
7b0a74da3c
Remove debug code.
...
llvm-svn: 31970
2006-11-28 18:27:02 +00:00
Jim Laskey
737f53b6aa
Prime text sections to improve branch locality in large object files.
...
llvm-svn: 31969
2006-11-28 18:21:52 +00:00
Jim Laskey
a5c5ceb212
32-bit int space was not accounted for properly in lowerCall.
...
llvm-svn: 31966
2006-11-28 14:53:52 +00:00
Reid Spencer
2e6a2775db
Regenerate.
...
llvm-svn: 31965
2006-11-28 07:29:44 +00:00
Reid Spencer
05a440d447
Implement signedness caching for values, value lists, constants and
...
constant lists. This is just an internal change to the parser in
preparation for some backwards compatibility code that is to follow.
This will allow things like "uint 4000000000" to retain the unsignedness
of the integer constant as the value moves through the parser. In the
future, all integer types will be signless but parsing "uint" and friends
will be retained for backwards compatibility.
llvm-svn: 31964
2006-11-28 07:28:14 +00:00
Reid Spencer
8587322e79
Remove 4 FIXME's from the CAST patch now that the back end is correctly
...
producing code for "trunc to bool". This passes all tests on Linux.
llvm-svn: 31963
2006-11-28 07:23:01 +00:00
Reid Spencer
b7f47f0420
Add an -append-exit-code option to bugpoint. This will cause bugpoint to
...
append "exit <retcode>" to the end of the output file. This is used by
the nightly tester to make bugpoint match the output generated by the
RunSafely.sh script so it doesn't find false positives.
llvm-svn: 31960
2006-11-28 07:04:10 +00:00
Reid Spencer
3d65b7aef6
Fix a typo.
...
llvm-svn: 31959
2006-11-28 06:14:06 +00:00
Bill Wendling
a80e3dc0c0
Put the #include for a module first.
...
llvm-svn: 31958
2006-11-28 03:31:29 +00:00
Evan Cheng
e176869ec0
Clean up.
...
llvm-svn: 31957
2006-11-28 02:25:34 +00:00
Evan Cheng
40044ef4b0
Fix indentation.
...
llvm-svn: 31956
2006-11-28 02:22:51 +00:00
Bill Wendling
aa02717a76
Changed to using LLVM streams.
...
llvm-svn: 31955
2006-11-28 02:09:03 +00:00